Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/drivers/kdp.lst
There are no other files named kdp.lst in the archive.
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   1
								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	  0001	module KDP (	! DDM driver for KMC11/DUP11
;	  0002			ident = 'X04230',
;	  0003			language (bliss16)
;	  0004			) =
;	  0005	begin
;	  0006	
;	  0007	!
;	  0008	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0009	!                    DIGITAL EQUIPMENT CORPORATION
;	  0010	!                        Maynard, Massachusetts
;	  0011	!
;	  0012	!     This software is furnished under a license and may  be  used
;	  0013	!     and copied only in accordance with the terms of such license
;	  0014	!     and with the inclusion of the above copyright notice.   This
;	  0015	!     software  or any other copies thereof may not be provided or
;	  0016	!     otherwise made available to any other person.  No  title  to
;	  0017	!     and ownership of the software is hereby transferred.
;	  0018	!
;	  0019	!     The information  in  this  software  is  subject  to  change
;	  0020	!     without  notice  and should not be construed as a commitment
;	  0021	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0022	!
;	  0023	!     DIGITAL assumes no responsibility for the use or reliability
;	  0024	!     of  its  software  on  equipment  which  is  not supplied by
;	  0025	!     DIGITAL.
;	  0026	!
;	  0027	
;	  0028	!++
;	  0029	!
;	  0030	! FACILITY: MCB KDP Driver
;	  0031	!
;	  0032	! ABSTRACT:
;	  0033	!
;	  0034	!	This is the DDM process which services the KMC11 microprocessor
;	  0035	!	which controls DUP11 synchronous line devices.
;	  0036	!
;	  0037	! ENVIRONMENT: MCB V3.0
;	  0038	!
;	  0039	! AUTHOR: Alan D. Peckham	CREATION DATE: 10-Jan-81
;	  0040	!
;	  0041	! MODIFIED BY:
;	  0042	!
;	  0043	!	S. I. GOLDFARB, 25-MAR-1977
;	  0044	!	R. H. ROSENBAUM, 30-AUG-1977
;	  0045	!	L. J. TWAITS, 10-SEP-1977
;	  0046	!	D. B. TUTTLE, 10-OCT-1977
;	  0047	!
;	  0048	!	Alan D. Peckham, 16-APR-80: Version 4
;	  0049	! 01	- Update to operate under MCB V3.0
;	  0050	! 02	- Update for MCB V3.1
;	  0051	! 03	- Rewrite in BLISS
;	  0052	! 04	- Only initialize KMC once during process initialization calls.
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   2
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	  0053	! 05	- Add Network Management event logging.
;	  0054	! 06	- Correct DDCMP data message bug in CITBA.
;	  0055	! 07	- Mark transmit buffer chain on transmitter underrun
;	  0056	!	  and return if finished.
;	  0057	! 08	- Optimize BDADR routine in MACRO-11.
;	  0058	!	  Fix buffer descriptor mapping bug.
;	  0059	! 09	- Split off Network Management code.
;	  0060	! 10	- Change SET_DESCRIPTOR to BDADR in transmit underrun error in COCTL.
;	  0061	! 11	- Change abort-DLXCP to DDXCP in KDPXME.
;	  0062	! 12	- Add control of DUPLEX, CLOCK, and LOOPBACK.
;	  0063	! 13	- Adapt to using new UNIBUS address converion routines.
;	  0064	! 14	- Fix signal bug in KDPNMX.
;	  0065	! 15	- Correct DSR event logging.
;	  0066	! 16	- Keep count of transmit/receive buffers to the KMC
;	  0067	!	  so that kills are done properly.
;	  0068	! 17	- Fix CTLGET to pass NM parameters to higher layer.
;	  0069	! 18	- Eliminate SIGNAL_STOP conditions and maintain error counters.
;	  0070	! 19	- Stop assign loop on RDB-get failure in GET_RECEIVE_BUFFERS.
;	  0071	! 20	- Use new microcode (X1.4) to set maintenance mode
;	  0072	!	  during control-in and eliminate SET_DUP_MODE.
;	  0073	! 21	- Optimize code in TIMPIN.
;	  0074	!	  If killing receives or transmits,
;	  0075	!	  do not increment DF_ASSIGNABLE_*_COUNT.
;	  0076	!	  Added RETURNED_RECEIVE_BUFFER routine to centralize accounting.
;	  0077	!	  Handle stack overflow problem of CALL$P overruns:
;	  0078	!	   Change COMPLETE to continue control processing indirectly
;	  0079	!	   by scheduling the CTL CCB to ourselves.
;	  0080	! 22	- Still haven't found our receive_BA bug.
;	  0081	!	  Centralize receive BA checking into RECEIVE_CCB.
;	  0082	!	  Remove RETURNED_RECEIVE_BUFFER.
;	  0083	! 23	- Found bug!  It is interaction between unfinished KILCRA
;	  0084	!	  and CTLSTP.  Solution:
;	  0085	!	    If D_PENDING_CONTROL_CCBS is non-empty (kill in progress),
;	  0086	!	    then queue CTLSTP CCB on it and go away.
;	  0087	!	    When kill completes, COMPLETE all CCBs on this queue.
;	  0088	!	    This continues the CTLSTP.   Yay!!!!!
;	  0089	!--
;	  0090	!
;	  0091	! INCLUDE FILES:
;	  0092	!
;	  0093	
;	  0094	library 'MCBLIB';
;	  0095	
;	  0096	library 'XPORT';
;	  0097	
;	  0098	library 'NMXLIB';
;	  0099	
;	  0100	library 'KDPDAT';
;	  0101	
;	  0102	!
;	  0103	! TABLE OF CONTENTS:
;	  0104	!
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   3
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	  0105	
;	  0106	linkage
;	  0107	    LINKAGE_CCB_DESC = jsr (register = 4, register = 1),
;	  0108	    LINKAGE_CSR = jsr (register = 1),
;	  0109	    LINKAGE_CSR_MC_LNG = jsr (register = 1, register = 2, register = 3),
;	  0110	    LINKAGE_DESC_STS = jsr (register = 1, register = 3),
;	  0111	    LINKAGE_PORT = jsr (register = 1),
;	  0112	    LINKAGE_RING_POOL_COUNT = jsr (register = 2, register = 3,register = 4),
;	  0113	    LINKAGE_STS = jsr (register = 3),
;	  0114	    KDP_CCB = jsr (register = 4) : preserve (0) nopreserve (1, 3),
;	  0115	    KDP_EDB = jsr (; register = 3),
;	  0116	    KDP_LKG_DB_DESC_CCB = jsr (register = 5, register = 1; register = 4);
;	  0117	
;	  0118	forward routine
;	  0119	    ASSIGN_RECEIVE_BUFFER : LINKAGE_CCB novalue,
;	  0120	    ASSIGN_TRANSMIT_BUFFER : novalue,
;	  0121	    CIBAS : CALL$,
;	  0122	    CICTL : CALL$,
;	  0123	    CIRBA : CALL$,
;	  0124	    CIRBK : CALL$,
;	  0125	    CITBA : CALL$,
;	  0126	    CITBK : CALL$,
;	  0127	    COBAD : CALL$ novalue,
;	  0128	    COCTL : CALL$ novalue,
;	  0129	    COMPLETE : LINKAGE_DB_CCB novalue,
;	  0130	    CORBA : CALL$ novalue,
;	  0131	    COTBA : CALL$ novalue,
;	  0132	    CTLGET : MCB_DB_CCB novalue,
;	  0133	    CTLSET : MCB_DB_CCB novalue,
;	  0134	    CTLSTP : MCB_DB_CCB novalue,
;	  0135	    CTLSTR : MCB_DB_CCB novalue,
;	  0136	    DEVICE_BROKEN : LINKAGE_DB novalue,
;	  0137	    GET_RECEIVE_BUFFERS : novalue,
;	  0138	    GIVE_TO_KMC : KDP_CCB novalue,
;	  0139	    INITIALIZE_CHARACTERISTICS : novalue,
;	  0140	    INITIALIZE_DESCRIPTOR_LIST : LINKAGE_RING_POOL_COUNT novalue,
;	  0141	    KDPCTL : MCB_DB_CCB_MOD novalue,
;	  0142	    KDPKIL : MCB_DB_CCB_MOD novalue,
;	  0143	    KDPTIM : MCB_DB_MOD novalue,
;	  0144	    KDPXME : MCB_DB_CCB_MOD novalue,
;	  0145	    KILCRA : MCB_DB_CCB novalue,
;	  0146	    KILKIL : MCB_DB_CCB novalue,
;	  0147	    KILXKL : MCB_DB_CCB novalue,
;	  0148	    PARAMETER_DEVICE_REGISTERS : KDP_REG novalue,
;	  0149	    POLLING_FAILURE : novalue,
;	  0150	    RECEIVE_CCB : KDP_LKG_DB_DESC_CCB,
;	  0151	    RECEIVE_DONE : LINKAGE_DESC_STS novalue,
;	  0152	    RECEIVE_KILLED : novalue,
;	  0153	    SET_DESCRIPTOR : LINKAGE_CCB_DESC,
;	  0154	    TIMLTM : MCB_DB novalue,
;	  0155	    TIMPIN : MCB_DB novalue,
;	  0156	    TIMPWF : MCB_DB novalue,
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   4
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	  0157	    TIMRDB : MCB_DB_CCB novalue,
;	  0158	    TRANSMIT_DONE : LINKAGE_DESC_STS novalue,
;	  0159	    TRANSMIT_KILLED : novalue;
;	  0160	
;	  0161	!
;	  0162	! MACROS:
;	  0163	!
;	  0164	
;	  0165	macro
;	M 0166	    BDADR (LOW, HIGH) =
;	M 0167		begin
;	M 0168	
;	M 0169		local
;	M 0170		    ADDR;
;	M 0171	
;	M 0172		$MCB_CONVERT_FROM_UBA_ADDRESS (LOW, HIGH, ADDR);
;	M 0173		.ADDR
;	  0174		end %;
;	  0175	
;	  0176	!
;	  0177	! EQUATED SYMBOLS:
;	  0178	!
;	  0179	
;	  0180	literal
;	  0181	    FALSE = 1 EQL 0,
;	  0182	    NO_OPERATION = 0,
;	  0183	    POLLING_THRESHOLD = 4,
;	  0184	    TRUE = 1 EQL 1;
;	  0185	
;	  0186	global literal
;	  0187	    %name ('D.LEN') = D_LEN*%upval,
;	  0188	    %name ('E.LEN') = E_LEN*%upval;
;	  0189	
;	  0190	!+
;	  0191	! POLLING CLASS TABLE FOR DETERMINING LIMITS FOR GIVEN SPEED
;	  0192	!
;	  0193	! ENTRIES ARE SET FOR THE STANDARD SPEED ENTRIES:
;	  0194	!
;	  0195	!	NUM	BAUD	NUM	BAUD	NUM	BAUD
;	  0196	!	0	50.	1	75.	2	110.
;	  0197	!	3	134.5	4	150.	5	300.
;	  0198	!	6	600.	7	1200.	10	1800.
;	  0199	!	11	2000.	12	2400.	13	3600.
;	  0200	!	14	4800.	15	7200.	16	9600.
;	  0201	!	17	EXT
;	  0202	!-
;	  0203	
;	  0204	macro
;	M 0205	    HIPOL (index) =
;	  0206		ch$rchar (ch$ptr (HIPOL_STRING, index)) %,
;	M 0207	    LOPOL (index) =
;	  0208		ch$rchar (ch$ptr (LOPOL_STRING, index)) %;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   5
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	  0209	
;	  0210	bind
;	L 0211	    HIPOL_STRING = uplit (%char (
;	L 0212		4, 4, 4,
;	L 0213		4, 4, 4,
;	L 0214		4, 4, 4,
;	L 0215		4, 4, 3,
;	L 0216		2, 1, 1,
;	  0217		0)),
;	L 0218	    LOPOL_STRING = uplit (%char (
;	L 0219		12, 12, 12,
;	L 0220		12, 12, 12,
;	L 0221		12, 12, 12,
;	L 0222		12, 12, 8,
;	L 0223		6, 5, 3,
;	  0224		0));
;	  0225	
;	  0226	!
;	  0227	! OWN STORAGE:
;	  0228	!
;	  0229	
;	  0230	external routine
;	  0231	    $DSPCR : novalue,
;	  0232	    $RDBRT : novalue;
;	  0233	
;	P 0234	$MCB_PROCESS (
;	P 0235	    NAME = KDP,					! Process name
;	P 0236	    DDM_DISPATCH = TABLE$ ($DSPCR, FC_CCP,	! DDM dispatch vector:
;	P 0237		(FC_XME, KDPXME),			!  Transmit enable
;	P 0238		(FC_RCE, $RDBRT),			!  Receive enable
;	P 0239		(FC_KIL, KDPKIL),			!  Kill enable
;	P 0240		(FC_CTL, KDPCTL),			!  Control enable
;	  0241		(FC_TIM, KDPTIM)))			!  Timeout
;	  0242	
;	  0243	!
;	  0244	! EXTERNAL REFERENCES:
;	  0245	!
;	  0246	
;	  0247	external routine
;	  0248	    REGISTER_NXM : KDP_CSR_NUM,
;	  0249	    KDPNMI : novalue;
;	  0250	
;	  0251	external
;	  0252	    MCB$GAW_PROCESS_DATA_BASE : vector [2],
;	  0253	    MCB$GW_PROCESS_HANDLE,
;	  0254	    MCB$GW_RDB_SIZE;		! Size of RDB buffer.
;	  0255	
;	  0256	bind
;	  0257	    DB_BIAS = MCB$GAW_PROCESS_DATA_BASE [0];
;	  0258	
;	  0259	macro
;	M 0260	    GET_DUP_DATA_BASE (NAME) =
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   6
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (1)

;	M 0261		%if %declared (NAME)
;	M 0262		%then map NAME : ref DUP_DATA_BASE
;	M 0263		%else bind NAME = .MCB$GAW_PROCESS_DATA_BASE [1] : DUP_DATA_BASE
;	  0264		%fi %;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   7
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (2)

;	  0265	routine ASSIGN_RECEIVE_BUFFER (CCB) : LINKAGE_CCB novalue =
;	  0266	
;	  0267	!++
;	  0268	! FUNCTIONAL DESCRIPTION:
;	  0269	!
;	  0270	!
;	  0271	! FORMAL PARAMETERS:
;	  0272	!	CCB = available RDB.
;	  0273	!
;	  0274	! IMPLICIT INPUTS:
;	  0275	!	None
;	  0276	!
;	  0277	! IMPLICIT OUTPUTS:
;	  0278	!	None
;	  0279	!
;	  0280	! ROUTINE VALUE:
;	  0281	! COMPLETION CODES:
;	  0282	!	None
;	  0283	!
;	  0284	! SIDE EFFECTS:
;	  0285	!	None
;	  0286	!--
;	  0287	
;	  0288	    begin
;	  0289	
;	  0290	    map
;	  0291		CCB : ref block field (C_FIELDS);
;	  0292	
;	  0293	    GET_DUP_DATA_BASE (DB);
;	  0294	    DB [D_ASSIGNABLE_RECEIVE_COUNT] = .DB [D_ASSIGNABLE_RECEIVE_COUNT] - 1;
;	  0295	    DB [D_ASSIGNED_RECEIVE_COUNT] = .DB [D_ASSIGNED_RECEIVE_COUNT] + 1;
;	  0296	    CCB [C_CNT] = .MCB$GW_RDB_SIZE;
;	  0297	    CCB [C_STS] = CIRBA;
;	  0298	    GIVE_TO_KMC (.CCB);
;	  0299	    end;			!of routine ASSIGN_RECEIVE_BUFFER


						.TITLE	KDP
						.IDENT	/X04230/


000000						.PSECT	......,  D  
000000	042560 				HEADER: .RAD50	/KDP/
000002	000403 					.WORD	403
000004	000000 					.WORD	0
000006	000000 					.WORD	0
000010	000000 					.WORD	0
000012	000000G					.WORD	.DSPCR
000014	000000G					.WORD	.DSPCR
000016	000040'					.WORD	P.AAC
000020	000000G					.WORD	MCB$V0
000022	000000G					.WORD	MCB$V1
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   8
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (2)

000024	140310 					.WORD	140310
000026	143716 					.WORD	143716
000030	001400 					.WORD	1400
000032	000000 					.WORD	0
000034	000000 					.WORD	0
000036	000000 					.WORD	0



000000						.PSECT	$PLIT$,  RO ,  D  
000000	   004     004     004 		P.AAA:	.ASCII	<04><04><04>
000003	   004     004     004 			.ASCII	<04><04><04>
000006	   004     004     004 			.ASCII	<04><04><04>
000011	   004     004     003 			.ASCII	<04><04><03>
000014	   002     001     001 			.ASCII	<02><01><01>
000017	   000 					.ASCII	<00>
000020	   014     014     014 		P.AAB:	.ASCII	<14><14><14>
000023	   014     014     014 			.ASCII	<14><14><14>
000026	   014     014     014 			.ASCII	<14><14><14>
000031	   014     014     010 			.ASCII	<14><14><10>
000034	   006     005     003 			.ASCII	<06><05><03>
000037	   000 					.ASCII	<00>
000040	000000G				P.AAC:	.WORD	$DSPCR
000042	000000V					.WORD	KDPXME
000044	000000G					.WORD	$RDBRT
000046	000000V					.WORD	KDPKIL
000050	000000V					.WORD	KDPCTL
000052	000000V					.WORD	KDPTIM
000054	000000G					.WORD	$DSPCR
000056	000000G					.WORD	$DSPCR
000060	000000G					.WORD	$DSPCR
000062	000000G					.WORD	$DSPCR


						.GLOBL	$DSPCR, $RDBRT, .DSPCR, MCB$V0
						.GLOBL	MCB$V1, KMCNXM, KDPNMI, .CRDAT
						.GLOBL	.CRPIX, .RDBSZ


	000042 				D.LEN==		    42
	000030 				E.LEN==		    30
	000000'				HIPOL.STRING=	    P.AAA
	000020'				LOPOL.STRING=	    P.AAB


						.SBTTL	ASSIGN.RECEIVE.BUFFER
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			ASSIGN.RECEIVE.BUFFER:
						JSR	R1,$SAVE3			;					0265
000004	016700  000002G				MOV	.CRDAT+2,R0			;					0294
000010	105360  000025 				DECB	25(R0)
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page   9
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (2)

000014	105260  000024 				INCB	24(R0)				;					0295
000020	016764  000000G 000022 			MOV	.RDBSZ,22(R4)			; *,*(CCB)				0296
000026	012764  000000V 000014 			MOV	#CIRBA,14(R4)			; *,*(CCB)				0297
000034	004767  000000V				JSR	PC,GIVE.TO.KMC			;					0298
000040	000207 					RTS	PC				;					0265

; Routine Size:  17 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  5 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  10
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (3)

;	  0300	routine ASSIGN_TRANSMIT_BUFFER : novalue =
;	  0301	
;	  0302	!++
;	  0303	! FUNCTIONAL DESCRIPTION:
;	  0304	!
;	  0305	!
;	  0306	! FORMAL PARAMETERS:
;	  0307	!	None
;	  0308	!
;	  0309	! IMPLICIT INPUTS:
;	  0310	!	None
;	  0311	!
;	  0312	! IMPLICIT OUTPUTS:
;	  0313	!	None
;	  0314	!
;	  0315	! ROUTINE VALUE:
;	  0316	! COMPLETION CODES:
;	  0317	!	None
;	  0318	!
;	  0319	! SIDE EFFECTS:
;	  0320	!	None
;	  0321	!--
;	  0322	
;	  0323	    begin
;	  0324	
;	  0325	    local
;	  0326		CCB : ref block field (C_FIELDS);
;	  0327	
;	  0328	    GET_DUP_DATA_BASE (DB);
;	  0329	
;	  0330	    if .DB [D_ASSIGNABLE_TRANSMIT_COUNT] neq 0
;	  0331	    then
;	  0332	
;	  0333		if $MCB_DEQUEUE_CCB (DB [D_ASSIGNABLE_TRANSMIT_CCBS], CCB)
;	  0334		then
;	  0335		    begin
;	  0336		    DB [D_ASSIGNABLE_TRANSMIT_COUNT] = .DB [D_ASSIGNABLE_TRANSMIT_COUNT] - 1;
;	  0337		    DB [D_ASSIGNED_TRANSMIT_COUNT] = .DB [D_ASSIGNED_TRANSMIT_COUNT] + 1;
;	  0338		    CCB [C_STS] = CITBA;
;	  0339		    GIVE_TO_KMC (.CCB);
;	  0340		    end;
;	  0341	
;	  0342	    end;			!of routine ASSIGN_TRANSMIT_BUFFER


						.GLOBL	$CMQRM


						.SBTTL	ASSIGN.TRANSMIT.BUFFER
000000	004167  000000G			ASSIGN.TRANSMIT.BUFFER:
						JSR	R1,$SAVE4			;					0300
000004	016703  000002G				MOV	.CRDAT+2,R3			;					0323
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  11
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (3)

000010	012700  000022 				MOV	#22,R0				;					0330
000014	060300 					ADD	R3,R0
000016	105760  000001 				TSTB	1(R0)
000022	001415 					BEQ	1$
000024	062703  000004 				ADD	#4,R3				;					0333
000030	004767  000000G				JSR	PC,$CMQRM
000034	103410 					BCS	1$
000036	105360  000001 				DECB	1(R0)				;					0336
000042	105210 					INCB	(R0)				;					0337
000044	012764  000000V 000014 			MOV	#CITBA,14(R4)			; *,*(CCB)				0338
000052	004767  000000V				JSR	PC,GIVE.TO.KMC			;					0339
000056	000207 				1$:	RTS	PC				;					0300

; Routine Size:  24 words,	Routine Base:  $CODE$ + 0042
; Maximum stack depth per invocation:  6 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  12
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (4)

;	  0343	routine CIBAS (CCB, PORT) : CALL$ =
;	  0344	
;	  0345	!++
;	  0346	! FUNCTIONAL DESCRIPTION:
;	  0347	!
;	  0348	!
;	  0349	! FORMAL PARAMETERS:
;	  0350	!	PORT = address of KMC data port buffer.
;	  0351	!	CCB = address of request CCB.
;	  0352	!
;	  0353	! IMPLICIT INPUTS:
;	  0354	!	None
;	  0355	!
;	  0356	! IMPLICIT OUTPUTS:
;	  0357	!	None
;	  0358	!
;	  0359	! ROUTINE VALUE:
;	  0360	! COMPLETION CODES:
;	  0361	!	None
;	  0362	!
;	  0363	! SIDE EFFECTS:
;	  0364	!	None
;	  0365	!--
;	  0366	
;	  0367	    begin
;	  0368	
;	  0369	    map
;	  0370		CCB : ref block field (C_FIELDS),
;	  0371		PORT : ref vector [2];
;	  0372	
;	  0373	    local
;	  0374		EDB : ref block field (E_FIELDS),
;	  0375		SAVE_MAP;
;	  0376	
;	  0377	    GET_DUP_DATA_BASE (DB);
;	  0378	    SMAP$ (SAVE_MAP);
;	  0379	    MAP$ (.DB_BIAS);
;	  0380	    EDB = .DB [D_EXT_ADDR];
;	  0381	    PORT [0] = 0;
;	  0382	    PORT [1] = .EDB [E_REGISTER] and %o'017770';
;	  0383	    DB [DF_DUP_CSR_SET] = TRUE;
;	  0384	    COMPLETE (DB [D_TIM], .CCB);
;	  0385	    MAP$ (.SAVE_MAP);
;	  0386	    BAS
;	  0387	    end;			!of routine CIBAS


						.GLOBL	KISAR6


						.SBTTL	CIBAS
000000	016702  000002G			CIBAS:	MOV	.CRDAT+2,R2			;					0367
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  13
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (4)

000004	016701  000000G				MOV	KISAR6,R1			; *,SAVE.MAP				0378
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0379
000016	016204  000040 				MOV	40(R2),R4			; *,EDB					0380
000022	005075  000004 				CLR	@4(R5)				; PORT(.AP.)				0381
000026	016500  000004 				MOV	4(R5),R0			; PORT(.AP.),*				0382
000032	016460  000016  000002 			MOV	16(R4),2(R0)			; *(EDB),*
000040	042760  160007  000002 			BIC	#160007,2(R0)
000046	152762  000100  000002 			BISB	#100,2(R2)			;					0383
000054	016504  000002 				MOV	2(R5),R4			; CCB(.AP.),*				0384
000060	010205 					MOV	R2,R5
000062	004767  000000V				JSR	PC,COMPLETE
000066	010167  000000G				MOV	R1,KISAR6			; SAVE.MAP,*				0385
000072	012700  000003 				MOV	#3,R0				;					0343
000076	000207 					RTS	PC

; Routine Size:  32 words,	Routine Base:  $CODE$ + 0122
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  14
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (5)

;	  0388	routine CICTL (CCB, PORT) : CALL$ =
;	  0389	
;	  0390	!++
;	  0391	! FUNCTIONAL DESCRIPTION:
;	  0392	!
;	  0393	!
;	  0394	! FORMAL PARAMETERS:
;	  0395	!	PORT = address of KMC data port buffer.
;	  0396	!	CCB = address of request CCB.
;	  0397	!
;	  0398	! IMPLICIT INPUTS:
;	  0399	!	None
;	  0400	!
;	  0401	! IMPLICIT OUTPUTS:
;	  0402	!	None
;	  0403	!
;	  0404	! ROUTINE VALUE:
;	  0405	! COMPLETION CODES:
;	  0406	!	None
;	  0407	!
;	  0408	! SIDE EFFECTS:
;	  0409	!	None
;	  0410	!--
;	  0411	
;	  0412	    begin
;	  0413	
;	  0414	    map
;	  0415		CCB : ref block field (C_FIELDS),
;	  0416		PORT : ref vector [2];
;	  0417	
;	  0418	    local
;	  0419		SAVE_MAP;
;	  0420	
;	  0421	    SMAP$ (SAVE_MAP);
;	  0422	    begin
;	  0423	
;	  0424	    local
;	  0425		EDB : ref block field (E_FIELDS);
;	  0426	
;	  0427	    GET_DUP_DATA_BASE (DB);
;	  0428	    MAP$ (.DB_BIAS);
;	  0429	    EDB = .DB [D_EXT_ADDR];
;	  0430	    PORT [0] = .EDB [E_POLLING_RATE];
;	  0431	    PORT [1] = .EDB [E_CTL];
;	  0432	    DB [DF_ENABLED] = .EDB [$SUB_FIELD (E_CTL, CT_ENB)];
;	  0433	    COMPLETE (DB [D_TIM], .CCB);
;	  0434	    end;
;	  0435	    MAP$ (.SAVE_MAP);
;	  0436	    CTL
;	  0437	    end;			!of routine CICTL
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  15
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (5)

						.SBTTL	CICTL
000000	016701  000000G			CICTL:	MOV	KISAR6,R1			; *,SAVE.MAP				0421
000004	016702  000002G				MOV	.CRDAT+2,R2			;					0422
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0428
000016	016204  000040 				MOV	40(R2),R4			; *,EDB					0429
000022	116400  000026 				MOVB	26(R4),R0			; *(EDB),*				0430
000026	010075  000004 				MOV	R0,@4(R5)			; *,PORT(.AP.)
000032	016500  000004 				MOV	4(R5),R0			; PORT(.AP.),*				0431
000036	016460  000024  000002 			MOV	24(R4),2(R0)			; *(EDB),*
000044	016400  000024 				MOV	24(R4),R0			; *(EDB),*				0432
000050	142762  000040  000002 			BICB	#40,2(R2)
000056	032700  000400 				BIT	#400,R0
000062	001403 					BEQ	1$
000064	152762  000040  000002 			BISB	#40,2(R2)
000072	016504  000002 			1$:	MOV	2(R5),R4			; CCB(.AP.),*				0433
000076	010205 					MOV	R2,R5
000100	004767  000000V				JSR	PC,COMPLETE
000104	010167  000000G				MOV	R1,KISAR6			; SAVE.MAP,*				0435
000110	012700  000001 				MOV	#1,R0				;					0388
000114	000207 					RTS	PC

; Routine Size:  39 words,	Routine Base:  $CODE$ + 0222
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  16
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (6)

;	  0438	routine CIRBA (CCB, PORT) : CALL$ =
;	  0439	
;	  0440	!++
;	  0441	! FUNCTIONAL DESCRIPTION:
;	  0442	!
;	  0443	!
;	  0444	! FORMAL PARAMETERS:
;	  0445	!	CCB = address of request CCB.
;	  0446	!	PORT = address of KMC data port buffer.
;	  0447	!
;	  0448	! IMPLICIT INPUTS:
;	  0449	!	None
;	  0450	!
;	  0451	! IMPLICIT OUTPUTS:
;	  0452	!	None
;	  0453	!
;	  0454	! ROUTINE VALUE:
;	  0455	! COMPLETION CODES:
;	  0456	!	None
;	  0457	!
;	  0458	! SIDE EFFECTS:
;	  0459	!	None
;	  0460	!--
;	  0461	
;	  0462	    begin
;	  0463	
;	  0464	    map
;	  0465		CCB : ref block field (C_FIELDS),
;	  0466		PORT : ref vector [2];
;	  0467	
;	  0468	    local
;	  0469		DESC : ref vector,
;	  0470		EDB : ref block field (E_FIELDS),
;	  0471		SAVE_MAP;
;	  0472	
;	  0473	    GET_DUP_DATA_BASE (DB);
;	  0474	    SMAP$ (SAVE_MAP);
;	  0475	    MAP$ (.DB_BIAS);
;	  0476	    EDB = .DB [D_EXT_ADDR];
;	  0477	    DESC = .EDB [E_NEXT_RECEIVE_DESCRIPTOR];
;	  0478	    EDB [E_NEXT_RECEIVE_DESCRIPTOR] = .DESC [0];
;	  0479	    PORT [0] = .DESC [1];
;	  0480	    PORT [1] = .DESC [2];
;	  0481	    DESC = DESC [3];
;	  0482	    CCB [C_STS] = SET_DESCRIPTOR (.CCB, .DESC);
;	  0483	    EDB = EDB [E_ASSIGNED_RECEIVE_CCBS];
;	  0484	    $MCB_QUEUE_CCB (.EDB, .CCB);
;	  0485	    MAP$ (.SAVE_MAP);
;	  0486	    RBA
;	  0487	    end;			!of routine CIRBA
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  17
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (6)

						.GLOBL	$CMQIN


						.SBTTL	CIRBA
000000	016702  000000G			CIRBA:	MOV	KISAR6,R2			; *,SAVE.MAP				0474
000004	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0475
000012	016700  000002G				MOV	.CRDAT+2,R0			;					0476
000016	016003  000040 				MOV	40(R0),R3			; *,EDB
000022	016301  000002 				MOV	2(R3),R1			; *(EDB),DESC				0477
000026	012163  000002 				MOV	(R1)+,2(R3)			; DESC,*(EDB)				0478
000032	012175  000004 				MOV	(R1)+,@4(R5)			; DESC,PORT(.AP.)			0479
000036	016500  000004 				MOV	4(R5),R0			; PORT(.AP.),*				0480
000042	012160  000002 				MOV	(R1)+,2(R0)			; DESC,*
000046	016504  000002 				MOV	2(R5),R4			; CCB(.AP.),*				0482
000052	004767  000000V				JSR	PC,SET.DESCRIPTOR
000056	010064  000014 				MOV	R0,14(R4)
000062	062703  000010 				ADD	#10,R3				; *,EDB					0483
000066	004767  000000G				JSR	PC,$CMQIN			;					0484
000072	010267  000000G				MOV	R2,KISAR6			; SAVE.MAP,*				0485
000076	012700  000004 				MOV	#4,R0				;					0438
000102	000207 					RTS	PC

; Routine Size:  34 words,	Routine Base:  $CODE$ + 0340
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  18
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (7)

;	  0488	routine CIRBK (CCB, PORT) : CALL$ =
;	  0489	
;	  0490	!++
;	  0491	! FUNCTIONAL DESCRIPTION:
;	  0492	!
;	  0493	!
;	  0494	! FORMAL PARAMETERS:
;	  0495	!	PORT = address of KMC data port buffer.
;	  0496	!	CCB = address of request CCB.
;	  0497	!
;	  0498	! IMPLICIT INPUTS:
;	  0499	!	None
;	  0500	!
;	  0501	! IMPLICIT OUTPUTS:
;	  0502	!	None
;	  0503	!
;	  0504	! ROUTINE VALUE:
;	  0505	! COMPLETION CODES:
;	  0506	!	None
;	  0507	!
;	  0508	! SIDE EFFECTS:
;	  0509	!	None
;	  0510	!--
;	  0511	
;	  0512	    begin
;	  0513	
;	  0514	    map
;	  0515		CCB : ref block field (C_FIELDS),
;	  0516		PORT : ref vector [2];
;	  0517	
;	  0518	    local
;	  0519		SAVE_MAP;
;	  0520	
;	  0521	    GET_DUP_DATA_BASE (DB);
;	  0522	    SMAP$ (SAVE_MAP);
;	  0523	    MAP$ (.DB_BIAS);
;	  0524	    PORT [0] = 0;
;	  0525	    PORT [1] = BIT_MASK [BA_KIL];
;	  0526	    $MCB_QUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], .CCB);
;	  0527	
;	  0528	    if not .DB [DF_DUP_CSR_SET] then RECEIVE_KILLED ();
;	  0529	
;	  0530	    MAP$ (.SAVE_MAP);
;	  0531	    RBA
;	  0532	    end;			!of routine CIRBK


						.SBTTL	CIRBK
000000	016700  000002G			CIRBK:	MOV	.CRDAT+2,R0			;					0512
000004	016701  000000G				MOV	KISAR6,R1			; *,SAVE.MAP				0522
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0523
000016	005075  000004 				CLR	@4(R5)				; PORT(.AP.)				0524
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  19
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (7)

000022	016503  000004 				MOV	4(R5),R3			; PORT(.AP.),*				0525
000026	012763  010000  000002 			MOV	#10000,2(R3)
000034	016504  000002 				MOV	2(R5),R4			; CCB(.AP.),*				0526
000040	010003 					MOV	R0,R3
000042	062703  000010 				ADD	#10,R3
000046	004767  000000G				JSR	PC,$CMQIN
000052	132760  000100  000002 			BITB	#100,2(R0)			;					0528
000060	001002 					BNE	1$
000062	004767  000000V				JSR	PC,RECEIVE.KILLED
000066	010167  000000G			1$:	MOV	R1,KISAR6			; SAVE.MAP,*				0530
000072	012700  000004 				MOV	#4,R0				;					0488
000076	000207 					RTS	PC

; Routine Size:  32 words,	Routine Base:  $CODE$ + 0444
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  20
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (8)

;	  0533	routine CITBA (CCB, PORT) : CALL$ =
;	  0534	
;	  0535	!++
;	  0536	! FUNCTIONAL DESCRIPTION:
;	  0537	!
;	  0538	!
;	  0539	! FORMAL PARAMETERS:
;	  0540	!	CCB = address of request CCB.
;	  0541	!	PORT = address of KMC data port buffer.
;	  0542	!
;	  0543	! IMPLICIT INPUTS:
;	  0544	!	None
;	  0545	!
;	  0546	! IMPLICIT OUTPUTS:
;	  0547	!	None
;	  0548	!
;	  0549	! ROUTINE VALUE:
;	  0550	! COMPLETION CODES:
;	  0551	!	None
;	  0552	!
;	  0553	! SIDE EFFECTS:
;	  0554	!	None
;	  0555	!--
;	  0556	
;	  0557	    begin
;	  0558	
;	  0559	    map
;	  0560		CCB : ref block field (C_FIELDS),
;	  0561		PORT : ref vector [2];
;	  0562	
;	  0563	    local
;	  0564		DESC : ref vector,
;	  0565		EDB : ref block field (E_FIELDS),
;	  0566		SAVE_MAP;
;	  0567	
;	  0568	    GET_DUP_DATA_BASE (DB);
;	  0569	    SMAP$ (SAVE_MAP);
;	  0570	    MAP$ (.DB_BIAS);
;	  0571	    EDB = .DB [D_EXT_ADDR];
;	  0572	    DESC = .EDB [E_NEXT_TRANSMIT_DESCRIPTOR];
;	  0573	    EDB [E_NEXT_TRANSMIT_DESCRIPTOR] = .DESC [0];
;	  0574	    PORT [0] = .DESC [1];
;	  0575	    PORT [1] = .DESC [2];
;	  0576	    DESC = DESC [3];
;	  0577	    CCB [C_STS] = SET_DESCRIPTOR (.CCB, .DESC);
;	  0578	    $MCB_QUEUE_CCB (EDB [E_ASSIGNED_TRANSMIT_CCBS], .CCB);
;	  0579	    block [DESC [0], BD_SOM] = 1;
;	  0580	    block [.CCB [C_STS], BD_EOM] = 1;
;	  0581	
;	  0582	    if .EDB [$SUB_FIELD (E_CTL, CT_DEC)]
;	  0583	    then
;	  0584		begin
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  21
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (8)

;	  0585	
;	  0586		if .block [DESC [0], BD_LBD] eql 0
;	  0587		then
;	  0588		    begin
;	  0589		    block [DESC [0], BD_EOM] = 1;
;	  0590		    block [DESC [3], BD_SOM] = 1;
;	  0591		    end;
;	  0592	
;	  0593		end;
;	  0594	
;	  0595	    if .CCB [C_MOD] eql FM_SYN
;	  0596	    then
;	  0597		block [DESC [0], BD_SYN] = 1;
;	  0598	
;	  0599	    DB [D_TIM] = .DB [D_TRANSMIT_TIMEOUT];
;	  0600	    ASSIGN_TRANSMIT_BUFFER ();
;	  0601	    MAP$ (.SAVE_MAP);
;	  0602	    TBA
;	  0603	    end;			!of routine CITBA


						.SBTTL	CITBA
000000	016702  000002G			CITBA:	MOV	.CRDAT+2,R2			;					0557
000004	016746  000000G				MOV	KISAR6,-(SP)			; *,SAVE.MAP				0569
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0570
000016	016246  000040 				MOV	40(R2),-(SP)			; *,EDB					0571
000022	017601  000000 				MOV	@0(SP),R1			; EDB,DESC				0572
000026	012176  000000 				MOV	(R1)+,@0(SP)			; DESC,EDB				0573
000032	012175  000004 				MOV	(R1)+,@4(R5)			; DESC,PORT(.AP.)			0574
000036	016500  000004 				MOV	4(R5),R0			; PORT(.AP.),*				0575
000042	012160  000002 				MOV	(R1)+,2(R0)			; DESC,*
000046	016504  000002 				MOV	2(R5),R4			; CCB(.AP.),*				0577
000052	004767  000000V				JSR	PC,SET.DESCRIPTOR
000056	010064  000014 				MOV	R0,14(R4)
000062	012700  000004 				MOV	#4,R0				;					0578
000066	061600 					ADD	(SP),R0				; EDB,*
000070	010003 					MOV	R0,R3
000072	004767  000000G				JSR	PC,$CMQIN
000076	012703  000004 				MOV	#4,R3				;					0579
000102	060103 					ADD	R1,R3				; DESC,*
000104	052713  000400 				BIS	#400,(R3)
000110	016400  000014 				MOV	14(R4),R0			;					0580
000114	052760  001000  000004 			BIS	#1000,4(R0)
000122	011600 					MOV	(SP),R0				; EDB,*					0582
000124	005760  000024 				TST	24(R0)				; *(EDB)
000130	100010 					BPL	1$
000132	032713  100000 				BIT	#100000,(R3)			;					0586
000136	001005 					BNE	1$
000140	052713  001000 				BIS	#1000,(R3)			;					0589
000144	052761  000400  000012 			BIS	#400,12(R1)			; *,*(DESC)				0590
000152	126427  000013  000004 		1$:	CMPB	13(R4),#4			;					0595
000160	001002 					BNE	2$
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  22
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (8)

000162	052713  010000 				BIS	#10000,(R3)			;					0597
000166	116212  000026 			2$:	MOVB	26(R2),(R2)			;					0599
000172	004767  177100 				JSR	PC,ASSIGN.TRANSMIT.BUFFER	;					0600
000176	016667  000002  000000G			MOV	2(SP),KISAR6			; SAVE.MAP,*				0601
000204	005000 					CLR	R0				;					0533
000206	022626 					CMP	(SP)+,(SP)+
000210	000207 					RTS	PC

; Routine Size:  69 words,	Routine Base:  $CODE$ + 0544
; Maximum stack depth per invocation:  3 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  23
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (9)

;	  0604	routine CITBK (CCB, PORT) : CALL$ =
;	  0605	
;	  0606	!++
;	  0607	! FUNCTIONAL DESCRIPTION:
;	  0608	!
;	  0609	!
;	  0610	! FORMAL PARAMETERS:
;	  0611	!	PORT = address of KMC data port buffer.
;	  0612	!	CCB = address of request CCB.
;	  0613	!
;	  0614	! IMPLICIT INPUTS:
;	  0615	!	None
;	  0616	!
;	  0617	! IMPLICIT OUTPUTS:
;	  0618	!	None
;	  0619	!
;	  0620	! ROUTINE VALUE:
;	  0621	! COMPLETION CODES:
;	  0622	!	None
;	  0623	!
;	  0624	! SIDE EFFECTS:
;	  0625	!	None
;	  0626	!--
;	  0627	
;	  0628	    begin
;	  0629	
;	  0630	    map
;	  0631		CCB : ref block field (C_FIELDS),
;	  0632		PORT : ref vector [2];
;	  0633	
;	  0634	    local
;	  0635		SAVE_MAP;
;	  0636	
;	  0637	    GET_DUP_DATA_BASE (DB);
;	  0638	    SMAP$ (SAVE_MAP);
;	  0639	    MAP$ (.DB_BIAS);
;	  0640	    PORT [0] = 0;
;	  0641	    PORT [1] = BIT_MASK [BA_KIL];
;	  0642	    $MCB_QUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], .CCB);
;	  0643	
;	  0644	    if not .DB [DF_DUP_CSR_SET] then TRANSMIT_KILLED ();
;	  0645	
;	  0646	    MAP$ (.SAVE_MAP);
;	  0647	    TBA
;	  0648	    end;			!of routine CITBK


						.SBTTL	CITBK
000000	016700  000002G			CITBK:	MOV	.CRDAT+2,R0			;					0628
000004	016701  000000G				MOV	KISAR6,R1			; *,SAVE.MAP				0638
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0639
000016	005075  000004 				CLR	@4(R5)				; PORT(.AP.)				0640
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  24
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (9)

000022	016503  000004 				MOV	4(R5),R3			; PORT(.AP.),*				0641
000026	012763  010000  000002 			MOV	#10000,2(R3)
000034	016504  000002 				MOV	2(R5),R4			; CCB(.AP.),*				0642
000040	010003 					MOV	R0,R3
000042	062703  000010 				ADD	#10,R3
000046	004767  000000G				JSR	PC,$CMQIN
000052	132760  000100  000002 			BITB	#100,2(R0)			;					0644
000060	001002 					BNE	1$
000062	004767  000000V				JSR	PC,TRANSMIT.KILLED
000066	010167  000000G			1$:	MOV	R1,KISAR6			; SAVE.MAP,*				0646
000072	005000 					CLR	R0				;					0604
000074	000207 					RTS	PC

; Routine Size:  31 words,	Routine Base:  $CODE$ + 0756
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  25
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (10)

;	  0649	global routine COBAD (REG) : CALL$ novalue =
;	  0650	
;	  0651	!++
;	  0652	! FUNCTIONAL DESCRIPTION:
;	  0653	!
;	  0654	!
;	  0655	! FORMAL PARAMETERS:
;	  0656	!	REG = address of KMC register buffer.
;	  0657	!
;	  0658	! IMPLICIT INPUTS:
;	  0659	!	None
;	  0660	!
;	  0661	! IMPLICIT OUTPUTS:
;	  0662	!	None
;	  0663	!
;	  0664	! ROUTINE VALUE:
;	  0665	! COMPLETION CODES:
;	  0666	!	None
;	  0667	!
;	  0668	! SIDE EFFECTS:
;	  0669	!	None
;	  0670	!--
;	  0671	
;	  0672	    begin
;	  0673	
;	  0674	    map
;	  0675		REG : ref block field (KDP_FIELDS);
;	  0676	
;	  0677	    local
;	  0678		SAVE_MAP;
;	  0679	
;	  0680	    SMAP$ (SAVE_MAP);
;	  0681	    MAP$ (.DB_BIAS);
;	  0682	    begin
;	  0683	    GET_DUP_DATA_BASE (DB);
;	  0684	
;	  0685	    bind
;	  0686		EDB = .DB [D_EXT_ADDR] : block field (E_FIELDS);
;	  0687	
;	  0688	    DB [DF_DUP_CSR_SET] = FALSE;
;	  0689	    DB [DF_ENABLED] = FALSE;
;	  0690	    DB [D_ASSIGNABLE_RECEIVE_COUNT] = 0;
;	  0691	    DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 0;
;	P 0692	    $NM_PLL_EVENT (4, .EDB [E_ENTITY],	%(Communications Interface Error)%
;	  0693		PARAMETER_DEVICE_REGISTERS (.REG));
;	  0694	    end;
;	  0695	    MAP$ (.SAVE_MAP);
;	  0696	    end;			!of routine COBAD


						.GLOBL	$NLBEG, $NLEND
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  26
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (10)


						.SBTTL	COBAD
000000	016702  000000G			COBAD:: MOV	KISAR6,R2			; *,SAVE.MAP				0680
000004	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0681
000012	016700  000002G				MOV	.CRDAT+2,R0			;					0682
000016	016003  000040 				MOV	40(R0),R3
000022	142760  000140  000002 			BICB	#140,2(R0)			;					0689
000030	105060  000025 				CLRB	25(R0)				;					0690
000034	105060  000023 				CLRB	23(R0)				;					0691
000040	004767  000000G				JSR	PC,$NLBEG			;					0693
000044	016501  000002 				MOV	2(R5),R1			; REG(.AP.),*
000050	004767  000000V				JSR	PC,PLL0
000054	012700  000604 				MOV	#604,R0
000060	016301  000014 				MOV	14(R3),R1
000064	004767  000000G				JSR	PC,$NLEND
000070	010267  000000G				MOV	R2,KISAR6			; SAVE.MAP,*				0695
000074	000207 					RTS	PC				;					0649

; Routine Size:  31 words,	Routine Base:  $CODE$ + 1054
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  27
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

;	  0697	global routine COCTL (REG) : CALL$ novalue =
;	  0698	
;	  0699	!++
;	  0700	! FUNCTIONAL DESCRIPTION:
;	  0701	!
;	  0702	!
;	  0703	! FORMAL PARAMETERS:
;	  0704	!	REG = address of KMC register buffer.
;	  0705	!
;	  0706	! IMPLICIT INPUTS:
;	  0707	!	None
;	  0708	!
;	  0709	! IMPLICIT OUTPUTS:
;	  0710	!	None
;	  0711	!
;	  0712	! ROUTINE VALUE:
;	  0713	! COMPLETION CODES:
;	  0714	!	None
;	  0715	!
;	  0716	! SIDE EFFECTS:
;	  0717	!	None
;	  0718	!--
;	  0719	
;	  0720	    begin
;	  0721	
;	  0722	    map
;	  0723		REG : ref block field (KDP_FIELDS);
;	  0724	
;	  0725	    macro
;	M 0726		$return =
;	M 0727		    begin
;	M 0728		    MAP$ (.SAVE_MAP);
;	M 0729		    return
;	  0730		    end %;
;	  0731	
;	  0732	    local
;	  0733		SAVE_MAP;
;	  0734	
;	  0735	    GET_DUP_DATA_BASE (DB);
;	  0736	    SMAP$ (SAVE_MAP);
;	  0737	    MAP$ (.DB_BIAS);
;	  0738	    DB [D_TIM] = 0;
;	  0739	    case .REG [$SUB_FIELD (SEL6, 0, 0, 8, 1)] from 6 to 22 of
;	  0740		set
;	  0741	
;	  0742		[6] :				! Abort
;	  0743		    begin
;	  0744	
;	  0745		    local
;	  0746			CCB : ref block field (C_FIELDS);
;	  0747	
;	  0748		    if not RECEIVE_CCB (DB [D_TIM], 0; CCB) then $return;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  28
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

;	  0749	
;	  0750		    $MCB_RETURN_RDB (.CCB);
;	  0751		    end;
;	  0752	
;	  0753		[8] :				! Receive DDCMP Header CRC Error
;	  0754		    begin
;	  0755		    RECEIVE_DONE (BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]), CE_HFE);
;	  0756		    end;
;	  0757	
;	  0758		[10] :				! Receive Data CRC Error
;	  0759		    begin
;	  0760		    RECEIVE_DONE (BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]), CE_DCR);
;	  0761		    end;
;	  0762	
;	  0763		[12] :				! No Buffer Assigned
;	  0764		    begin
;	  0765		    COUNTER_INCREMENT (DB, D_NO_BUFFER_ASSIGNED);
;	  0766		    COUNTER_INCREMENT (DB, D_PERFORMANCE_ERRORS);
;	  0767		    end;
;	  0768	
;	  0769		[14] :				! Data Set Ready (DSR) Transition
;	  0770		    begin
;	  0771	
;	  0772		    literal
;	  0773			OFF = 0,
;	  0774			ON = 1;
;	  0775	
;	  0776		    bind
;	  0777			EDB = .DB [D_EXT_ADDR] : block field (E_FIELDS);
;	  0778	
;	  0779		    local
;	  0780			STATE;
;	  0781	
;	  0782		    DB [DF_DSR] = not .DB [DF_DSR];
;	  0783		    STATE = (if .DB [DF_DSR] then ON else OFF);
;	P 0784		    $NM_PLL_EVENT (0, .EDB [E_ENTITY],
;	  0785			PARAMETER_C_1 (1, STATE));
;	  0786		    end;
;	  0787	
;	  0788		[16] :				! Nonexsistent Memory
;	  0789		    begin
;	  0790		    COUNTER_INCREMENT (DB, D_NONEXISTENT_MEMORY);
;	  0791		    COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
;	  0792		    DEVICE_BROKEN (DB [D_TIM]);
;	  0793		    end;
;	  0794	
;	  0795		[18] :				! Transmit Underrun
;	  0796		    begin
;	  0797	
;	  0798		    bind
;	  0799			EDB = .DB [D_EXT_ADDR] : block field (E_FIELDS);
;	  0800	
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  29
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

;	  0801		    local
;	  0802			DESC : ref block field (BD_FIELDS);
;	  0803	
;	  0804		    DESC = BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]);
;	  0805		    DB [DF_TRANSMIT_UNDERRUN] = TRUE;
;	  0806	
;	  0807		    if .DESC [BD_LBD] then TRANSMIT_DONE (.DESC, CE_UDR);
;	  0808	
;	  0809		    POLLING_FAILURE ();
;	P 0810		    $NM_PLL_EVENT (5, .EDB [E_ENTITY],
;	  0811			PARAMETER_DEVICE_REGISTERS (.REG));
;	  0812		    end;
;	  0813	
;	  0814		[20] :				! Receiver Overrun
;	  0815		    begin
;	  0816	
;	  0817		    bind
;	  0818			EDB = .DB [D_EXT_ADDR] : block field (E_FIELDS);
;	  0819	
;	  0820		    POLLING_FAILURE ();
;	  0821		    RECEIVE_DONE (BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]), CE_ROV);
;	P 0822		    $NM_PLL_EVENT (5, .EDB [E_ENTITY],
;	  0823			PARAMETER_DEVICE_REGISTERS (.REG));
;	  0824		    end;
;	  0825	
;	  0826		[22] :				! Kill Complete
;	  0827	
;	  0828		    if .REG [$SUB_FIELD (SEL2, IN_I_O)]
;	  0829		    then
;	  0830			RECEIVE_KILLED ()
;	  0831		    else
;	  0832			TRANSMIT_KILLED ();
;	  0833	
;	  0834		[inrange, outrange] :
;	  0835		    begin
;	  0836		    COUNTER_INCREMENT (DB, D_INVALID_ERROR_CODE);
;	  0837		    COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
;	  0838		    DEVICE_BROKEN (DB [D_TIM]);
;	  0839		    end;
;	  0840		tes;
;	  0841	
;	  0842	    GET_RECEIVE_BUFFERS ();
;	  0843	    MAP$ (.SAVE_MAP);
;	  0844	    end;			!of routine COCTL


						.GLOBL	$VIR18, $IC8, $DPC1


						.SBTTL	COCTL
000000	016746  000002G			COCTL:: MOV	.CRDAT+2,-(SP)			;					0720
000004	016746  000000G				MOV	KISAR6,-(SP)			; *,SAVE.MAP				0736
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  30
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0737
000016	105076  000002 				CLRB	@2(SP)				;					0738
000022	016546  000002 				MOV	2(R5),-(SP)			; REG(.AP.),*				0739
000026	012700  000006 				MOV	#6,R0
000032	061600 					ADD	(SP),R0
000034	010002 					MOV	R0,R2
000036	111200 					MOVB	(R2),R0
000040	162700  000006 				SUB	#6,R0
000044	020027  000020 				CMP	R0,#20
000050	101003 					BHI	1$
000052	006300 					ASL	R0
000054	066007  000064'				ADD	P.AAD(R0),PC			; Case dispatch
000060	016600  000004 			1$:	MOV	4(SP),R0			;					0836
000064	052760  002000  000032 			BIS	#2000,32(R0)
000072	000531 					BR	12$				;					0837
000074	016605  000004 			2$:	MOV	4(SP),R5			;					0748
000100	005001 					CLR	R1
000102	004767  000000V				JSR	PC,RECEIVE.CCB
000106	006000 					ROR	R0
000110	103402 					BLO	3$
000112	000167  000534 				JMP	21$
000116	004767  000000G			3$:	JSR	PC,$RDBRT			;					0750
000122	000530 					BR	13$				;					0739
000124	011200 				4$:	MOV	(R2),R0				;					0755
000126	072027  177762 				ASH	#-16,R0
000132	042700  177774 				BIC	#177774,R0
000136	011603 					MOV	(SP),R3
000140	016301  000004 				MOV	4(R3),R1
000144	004767  000000G				JSR	PC,$VIR18
000150	010001 					MOV	R0,R1				; ADDR,*
000152	012703  177560 				MOV	#-220,R3
000156	000415 					BR	6$
000160	011200 				5$:	MOV	(R2),R0				;					0760
000162	072027  177762 				ASH	#-16,R0
000166	042700  177774 				BIC	#177774,R0
000172	011603 					MOV	(SP),R3
000174	016301  000004 				MOV	4(R3),R1
000200	004767  000000G				JSR	PC,$VIR18
000204	010001 					MOV	R0,R1				; ADDR,*
000206	012703  177570 				MOV	#-210,R3
000212	004767  000000V			6$:	JSR	PC,RECEIVE.DONE
000216	000472 					BR	13$				;					0739
000220	016600  000004 			7$:	MOV	4(SP),R0			;					0765
000224	052760  000400  000034 			BIS	#400,34(R0)
000232	012701  000034 				MOV	#34,R1				;					0766
000236	060001 					ADD	R0,R1
000240	010100 					MOV	R1,R0
000242	004767  000000G				JSR	PC,$IC8
000246	000577 					BR	20$				;					0739
000250	016600  000004 			8$:	MOV	4(SP),R0			;					0770
000254	016003  000040 				MOV	40(R0),R3
000260	012700  002000 				MOV	#2000,R0			;					0782
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  31
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

000264	074076  000004 				XOR	R0,@4(SP)
000270	030076  000004 				BIT	R0,@4(SP)			;					0783
000274	001403 					BEQ	9$
000276	012701  000001 				MOV	#1,R1				; *,STATE
000302	000401 					BR	10$
000304	005001 				9$:	CLR	R1				; STATE
000306	004767  000000G			10$:	JSR	PC,$NLBEG			;					0785
000312	012746  000001 				MOV	#1,-(SP)
000316	110100 					MOVB	R1,R0				; STATE,*
000320	004767  000000G				JSR	PC,$DPC1
000324	012700  000600 				MOV	#600,R0
000330	016301  000014 				MOV	14(R3),R1
000334	004767  000000G				JSR	PC,$NLEND
000340	005726 					TST	(SP)+				;					0770
000342	000541 					BR	20$				;					0739
000344	016600  000004 			11$:	MOV	4(SP),R0			;					0790
000350	052760  004000  000032 			BIS	#4000,32(R0)
000356	012701  000032 			12$:	MOV	#32,R1				;					0791
000362	066601  000004 				ADD	4(SP),R1
000366	010100 					MOV	R1,R0
000370	004767  000000G				JSR	PC,$IC8
000374	016605  000004 				MOV	4(SP),R5			;					0792
000400	004767  000000V				JSR	PC,DEVICE.BROKEN
000404	000520 				13$:	BR	20$				;					0739
000406	016600  000004 			14$:	MOV	4(SP),R0			;					0796
000412	016004  000040 				MOV	40(R0),R4
000416	011200 					MOV	(R2),R0				;					0804
000420	072027  177762 				ASH	#-16,R0
000424	042700  177774 				BIC	#177774,R0
000430	011603 					MOV	(SP),R3
000432	016301  000004 				MOV	4(R3),R1
000436	004767  000000G				JSR	PC,$VIR18
000442	010001 					MOV	R0,R1				; ADDR,DESC
000444	052776  004000  000004 			BIS	#4000,@4(SP)			;					0805
000452	005761  000004 				TST	4(R1)				; *(DESC)				0807
000456	100004 					BPL	15$
000460	012703  177510 				MOV	#-270,R3
000464	004767  000000V				JSR	PC,TRANSMIT.DONE
000470	004767  000000V			15$:	JSR	PC,POLLING.FAILURE		;					0809
000474	004767  000000G				JSR	PC,$NLBEG			;					0811
000500	011601 					MOV	(SP),R1
000502	004767  000000V				JSR	PC,PLL0
000506	012700  000605 				MOV	#605,R0
000512	016401  000014 				MOV	14(R4),R1
000516	000436 					BR	17$
000520	004767  000000V			16$:	JSR	PC,POLLING.FAILURE		;					0820
000524	011200 					MOV	(R2),R0				;					0821
000526	072027  177762 				ASH	#-16,R0
000532	042700  177774 				BIC	#177774,R0
000536	011603 					MOV	(SP),R3
000540	016301  000004 				MOV	4(R3),R1
000544	004767  000000G				JSR	PC,$VIR18
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  32
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (11)

000550	010001 					MOV	R0,R1				; ADDR,*
000552	012703  177540 				MOV	#-240,R3
000556	004767  000000V				JSR	PC,RECEIVE.DONE
000562	004767  000000G				JSR	PC,$NLBEG			;					0823
000566	011601 					MOV	(SP),R1
000570	004767  000000V				JSR	PC,PLL0
000574	016600  000004 				MOV	4(SP),R0
000600	016003  000040 				MOV	40(R0),R3
000604	012700  000605 				MOV	#605,R0
000610	016301  000014 				MOV	14(R3),R1
000614	004767  000000G			17$:	JSR	PC,$NLEND
000620	000412 					BR	20$				;					0739
000622	011600 				18$:	MOV	(SP),R0				;					0828
000624	132760  000004  000002 			BITB	#4,2(R0)
000632	001403 					BEQ	19$
000634	004767  000000V				JSR	PC,RECEIVE.KILLED		;					0830
000640	000402 					BR	20$				;					0828
000642	004767  000000V			19$:	JSR	PC,TRANSMIT.KILLED		;					0832
000646	004767  000000V			20$:	JSR	PC,GET.RECEIVE.BUFFERS		;					0842
000652	016667  000002  000000G		21$:	MOV	2(SP),KISAR6			; SAVE.MAP,*				0843
000660	062706  000006 				ADD	#6,SP				;					0697
000664	000207 					RTS	PC

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


000064						.PSECT	$PLIT$,  RO ,  D  

					P.AAD:						; CASE Table for COCTL+0054		0739
000064	000014 					.WORD	14				; [2$]
000066	000000 					.WORD	0				; [1$]
000070	000044 					.WORD	44				; [4$]
000072	000000 					.WORD	0				; [1$]
000074	000100 					.WORD	100				; [5$]
000076	000000 					.WORD	0				; [1$]
000100	000140 					.WORD	140				; [7$]
000102	000000 					.WORD	0				; [1$]
000104	000170 					.WORD	170				; [8$]
000106	000000 					.WORD	0				; [1$]
000110	000264 					.WORD	264				; [11$]
000112	000000 					.WORD	0				; [1$]
000114	000326 					.WORD	326				; [14$]
000116	000000 					.WORD	0				; [1$]
000120	000440 					.WORD	440				; [16$]
000122	000000 					.WORD	0				; [1$]
000124	000542 					.WORD	542				; [18$]
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  33
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (12)

;	  0845	routine COMPLETE (DB, CCB) : LINKAGE_DB_CCB novalue =
;	  0846	
;	  0847	!++
;	  0848	! FUNCTIONAL DESCRIPTION:
;	  0849	!
;	  0850	!
;	  0851	! FORMAL PARAMETERS:
;	  0852	!	DB = DUP data base
;	  0853	!	CCB = CCB to complete
;	  0854	!
;	  0855	! IMPLICIT INPUTS:
;	  0856	!	None
;	  0857	!
;	  0858	! IMPLICIT OUTPUTS:
;	  0859	!	None
;	  0860	!
;	  0861	! ROUTINE VALUE:
;	  0862	! COMPLETION CODES:
;	  0863	!	None
;	  0864	!
;	  0865	! SIDE EFFECTS:
;	  0866	!	None
;	  0867	!--
;	  0868	
;	  0869	    begin
;	  0870	
;	  0871	    map
;	  0872		CCB : ref block field (C_FIELDS);
;	  0873	
;	  0874	    GET_DUP_DATA_BASE (DB);
;	  0875	
;	  0876	    selectone .CCB [C_FNC] of
;	  0877		set
;	  0878		[FC_AST] :
;	  0879		    $MCB_RETURN_CCB (.CCB);
;	  0880		[FC_CTL] :
;	  0881		    begin
;	  0882		    CCB [C_PIX] = .MCB$GW_PROCESS_HANDLE;
;	  0883		    $MCB_SCHEDULE_CCB (.CCB);
;	  0884		    end;
;	  0885		[otherwise] :
;	  0886		    begin
;	  0887		    CCB [C_LIX] = .DB [D_LIX];
;	  0888		    DDKCP$ (.CCB, CS_SUC)
;	  0889		    end;
;	  0890		tes
;	  0891	
;	  0892	    end;			!of routine COMPLETE


						.GLOBL	$CCBRT, $SCHED, $DDKCP
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  34
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (12)


						.SBTTL	COMPLETE
002040						.PSECT	$CODE$,  RO 

000000	004167  000000G			COMPLETE:
						JSR	R1,$SAVE4			;					0845
000004	010400 					MOV	R4,R0				; *,CCB
000006	005003 					CLR	R3				;					0876
000010	156003  000012 				BISB	12(R0),R3			; *(CCB),*
000014	005703 					TST	R3
000016	001003 					BNE	1$
000020	004767  000000G				JSR	PC,$CCBRT			;					0879
000024	000207 					RTS	PC				;					0876
000026	020327  000010 			1$:	CMP	R3,#10
000032	001007 					BNE	2$
000034	116760  000000G 000011 			MOVB	.CRPIX,11(R0)			; *,*(CCB)				0882
000042	010004 					MOV	R0,R4				; CCB,*					0883
000044	004767  000000G				JSR	PC,$SCHED
000050	000207 					RTS	PC				;					0876
000052	116560  000020  000010 		2$:	MOVB	20(R5),10(R0)			; *(DB),*(CCB)				0887
000060	010004 					MOV	R0,R4				; CCB,*					0888
000062	012703  000001 				MOV	#1,R3
000066	004767  000000G				JSR	PC,$DDKCP
000072	000207 					RTS	PC				;					0845

; Routine Size:  30 words,	Routine Base:  $CODE$ + 2040
; Maximum stack depth per invocation:  6 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  35
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (13)

;	  0893	global routine CORBA (REG) : CALL$ novalue =
;	  0894	
;	  0895	!++
;	  0896	! FUNCTIONAL DESCRIPTION:
;	  0897	!
;	  0898	!
;	  0899	! FORMAL PARAMETERS:
;	  0900	!	REG = address of KMC register buffer.
;	  0901	!
;	  0902	! IMPLICIT INPUTS:
;	  0903	!	None
;	  0904	!
;	  0905	! IMPLICIT OUTPUTS:
;	  0906	!	None
;	  0907	!
;	  0908	! ROUTINE VALUE:
;	  0909	! COMPLETION CODES:
;	  0910	!	None
;	  0911	!
;	  0912	! SIDE EFFECTS:
;	  0913	!	None
;	  0914	!--
;	  0915	
;	  0916	    begin
;	  0917	
;	  0918	    map
;	  0919		REG : ref block field (KDP_FIELDS);
;	  0920	
;	  0921	    macro
;	M 0922		$return =
;	M 0923		    begin
;	M 0924		    MAP$ (.SAVE_MAP);
;	M 0925		    return
;	  0926		    end %;
;	  0927	
;	  0928	    local
;	  0929		SAVE_MAP;
;	  0930	
;	  0931	    GET_DUP_DATA_BASE (DB);
;	  0932	    SMAP$ (SAVE_MAP);
;	  0933	    MAP$ (.DB_BIAS);
;	  0934	
;	  0935	    if not .REG [$SUB_FIELD (SEL6, BA_EOM)]
;	  0936	    then
;	  0937		begin
;	  0938	
;	  0939		if not .DB [DF_TRUNCATING_RECEIVE]
;	  0940		then
;	  0941		    begin
;	  0942		    DB [DF_TRUNCATING_RECEIVE] = TRUE;
;	  0943		    RECEIVE_DONE (BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]), CE_MTL);
;	  0944		    end
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  36
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (13)

;	  0945		else
;	  0946		    begin
;	  0947	
;	  0948		    local
;	  0949			CCB : ref block field (C_FIELDS);
;	  0950	
;	  0951		    if not RECEIVE_CCB (DB [D_TIM], 0; CCB) then $return;
;	  0952	
;	  0953		    $MCB_RETURN_RDB (.CCB);
;	  0954		    end;
;	  0955	
;	  0956		end
;	  0957	    else
;	  0958		begin
;	  0959	
;	  0960		if POLLING_THRESHOLD gtr .DB [D_POLLING_THRESHOLD]
;	  0961		then
;	  0962		    DB [D_POLLING_THRESHOLD] = .DB [D_POLLING_THRESHOLD] + 1;
;	  0963	
;	  0964		if not .DB [DF_TRUNCATING_RECEIVE]
;	  0965		then
;	  0966		    RECEIVE_DONE (BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]), CS_SUC)
;	  0967		else
;	  0968		    begin
;	  0969	
;	  0970		    local
;	  0971			CCB : ref block field (C_FIELDS);
;	  0972	
;	  0973		    DB [DF_TRUNCATING_RECEIVE] = FALSE;
;	  0974	
;	  0975		    if not RECEIVE_CCB (DB [D_TIM], 0; CCB) then $return;
;	  0976	
;	  0977		    $MCB_RETURN_RDB (.CCB);
;	  0978		    end;
;	  0979	
;	  0980		end;
;	  0981	
;	  0982	    GET_RECEIVE_BUFFERS ();
;	  0983	    MAP$ (.SAVE_MAP);
;	  0984	    end;			!of routine CORBA


						.SBTTL	CORBA
000000	016746  000002G			CORBA:: MOV	.CRDAT+2,-(SP)			;					0916
000004	016746  000000G				MOV	KISAR6,-(SP)			; *,SAVE.MAP				0932
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					0933
000016	016502  000002 				MOV	2(R5),R2			; REG(.AP.),*				0935
000022	012746  000006 				MOV	#6,-(SP)
000026	060216 					ADD	R2,(SP)
000030	032776  010000  000000 			BIT	#10000,@0(SP)
000036	001034 					BNE	2$
000040	005776  000004 				TST	@4(SP)				;					0939
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  37
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (13)

000044	100421 					BMI	1$
000046	052776  100000  000004 			BIS	#100000,@4(SP)			;					0942
000054	017600  000000 				MOV	@0(SP),R0			;					0943
000060	072027  177762 				ASH	#-16,R0
000064	042700  177774 				BIC	#177774,R0
000070	016201  000004 				MOV	4(R2),R1
000074	004767  000000G				JSR	PC,$VIR18
000100	010001 					MOV	R0,R1				; ADDR,*
000102	012703  177550 				MOV	#-230,R3
000106	000441 					BR	4$
000110	016605  000004 			1$:	MOV	4(SP),R5			;					0951
000114	005001 					CLR	R1
000116	004767  000000V				JSR	PC,RECEIVE.CCB
000122	006000 					ROR	R0
000124	103053 					BHIS	8$
000126	000446 					BR	6$				;					0953
000130	016600  000004 			2$:	MOV	4(SP),R0			;					0960
000134	126027  000027  000004 			CMPB	27(R0),#4
000142	002003 					BGE	3$
000144	010001 					MOV	R0,R1				;					0962
000146	105261  000027 				INCB	27(R1)
000152	005776  000004 			3$:	TST	@4(SP)				;					0964
000156	100420 					BMI	5$
000160	017600  000000 				MOV	@0(SP),R0			;					0966
000164	072027  177762 				ASH	#-16,R0
000170	042700  177774 				BIC	#177774,R0
000174	016201  000004 				MOV	4(R2),R1
000200	004767  000000G				JSR	PC,$VIR18
000204	010001 					MOV	R0,R1				; ADDR,*
000206	012703  000001 				MOV	#1,R3
000212	004767  000000V			4$:	JSR	PC,RECEIVE.DONE
000216	000414 					BR	7$				;					0964
000220	042776  100000  000004 		5$:	BIC	#100000,@4(SP)			;					0973
000226	016605  000004 				MOV	4(SP),R5			;					0975
000232	005001 					CLR	R1
000234	004767  000000V				JSR	PC,RECEIVE.CCB
000240	006000 					ROR	R0
000242	103004 					BHIS	8$
000244	004767  000000G			6$:	JSR	PC,$RDBRT			;					0977
000250	004767  000000V			7$:	JSR	PC,GET.RECEIVE.BUFFERS		;					0982
000254	016667  000002  000000G		8$:	MOV	2(SP),KISAR6			; SAVE.MAP,*				0983
000262	062706  000006 				ADD	#6,SP				;					0893
000266	000207 					RTS	PC

; Routine Size:  92 words,	Routine Base:  $CODE$ + 2134
; Maximum stack depth per invocation:  4 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  38
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (14)

;	  0985	global routine COTBA (REG) : CALL$ novalue =
;	  0986	
;	  0987	!++
;	  0988	! FUNCTIONAL DESCRIPTION:
;	  0989	!
;	  0990	!
;	  0991	! FORMAL PARAMETERS:
;	  0992	!	REG = address of KMC register buffer.
;	  0993	!
;	  0994	! IMPLICIT INPUTS:
;	  0995	!	None
;	  0996	!
;	  0997	! IMPLICIT OUTPUTS:
;	  0998	!	None
;	  0999	!
;	  1000	! ROUTINE VALUE:
;	  1001	! COMPLETION CODES:
;	  1002	!	None
;	  1003	!
;	  1004	! SIDE EFFECTS:
;	  1005	!	None
;	  1006	!--
;	  1007	
;	  1008	    begin
;	  1009	
;	  1010	    map
;	  1011		REG : ref block field (KDP_FIELDS);
;	  1012	
;	  1013	    macro
;	M 1014		$return =
;	M 1015		    begin
;	M 1016		    MAP$ (.SAVE_MAP);
;	M 1017		    return
;	  1018		    end %;
;	  1019	
;	  1020	    local
;	  1021		CCB : ref block field (C_FIELDS),
;	  1022		DESC : ref block field (BD_FIELDS),
;	  1023		SAVE_MAP;
;	  1024	
;	  1025	    GET_DUP_DATA_BASE (DB);
;	  1026	    SMAP$ (SAVE_MAP);
;	  1027	    MAP$ (.DB_BIAS);
;	  1028	    DESC = BDADR (.REG [$SUB_FIELD (SEL4, BA_LOW)], .REG [$SUB_FIELD (SEL6, BA_HIGH)]);
;	  1029	
;	  1030	    if not .DESC [BD_LBD] then $return;
;	  1031	
;	  1032	    if not .DB [DF_TRANSMIT_UNDERRUN]
;	  1033	    then
;	  1034		begin
;	  1035	
;	  1036		if POLLING_THRESHOLD gtr .DB [D_POLLING_THRESHOLD]
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  39
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (14)

;	  1037		then
;	  1038		     DB [D_POLLING_THRESHOLD] = .DB [D_POLLING_THRESHOLD] + 1;
;	  1039	
;	  1040		TRANSMIT_DONE (.DESC, CS_SUC);
;	  1041		end
;	  1042	    else
;	  1043		begin
;	  1044		DB [DF_TRANSMIT_UNDERRUN] = FALSE;
;	  1045		TRANSMIT_DONE (.DESC, CE_UDR);
;	  1046		end;
;	  1047	
;	  1048	    MAP$ (.SAVE_MAP);
;	  1049	    end;			!of routine COTBA


						.SBTTL	COTBA
000000	016704  000002G			COTBA:: MOV	.CRDAT+2,R4			;					1008
000004	016702  000000G				MOV	KISAR6,R2			; *,SAVE.MAP				1026
000010	016767  000000G 000000G			MOV	.CRDAT,KISAR6			;					1027
000016	016503  000002 				MOV	2(R5),R3			; REG(.AP.),*				1028
000022	010305 					MOV	R3,R5
000024	016300  000006 				MOV	6(R3),R0
000030	072027  177762 				ASH	#-16,R0
000034	042700  177774 				BIC	#177774,R0
000040	016501  000004 				MOV	4(R5),R1
000044	004767  000000G				JSR	PC,$VIR18
000050	010001 					MOV	R0,R1				; ADDR,DESC
000052	005761  000004 				TST	4(R1)				; *(DESC)				1030
000056	100022 					BPL	4$
000060	032714  004000 				BIT	#4000,(R4)			;					1032
000064	001011 					BNE	2$
000066	126427  000027  000004 			CMPB	27(R4),#4			;					1036
000074	002002 					BGE	1$
000076	105264  000027 				INCB	27(R4)				;					1038
000102	012703  000001 			1$:	MOV	#1,R3				;					1040
000106	000404 					BR	3$
000110	042714  004000 			2$:	BIC	#4000,(R4)			;					1044
000114	012703  177510 				MOV	#-270,R3			;					1045
000120	004767  000000V			3$:	JSR	PC,TRANSMIT.DONE
000124	010267  000000G			4$:	MOV	R2,KISAR6			; SAVE.MAP,*				1048
000130	000207 					RTS	PC				;					0985

; Routine Size:  45 words,	Routine Base:  $CODE$ + 2424
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  40
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (15)

;	  1050	routine CTLGET (DB, CCB) : MCB_DB_CCB novalue =
;	  1051	
;	  1052	!++
;	  1053	! FUNCTIONAL DESCRIPTION:
;	  1054	!
;	  1055	!
;	  1056	! FORMAL PARAMETERS:
;	  1057	!	CCB = address of CCB.
;	  1058	!
;	  1059	! IMPLICIT INPUTS:
;	  1060	!	None
;	  1061	!
;	  1062	! IMPLICIT OUTPUTS:
;	  1063	!	None
;	  1064	!
;	  1065	! ROUTINE VALUE:
;	  1066	! COMPLETION CODES:
;	  1067	!	None
;	  1068	!
;	  1069	! SIDE EFFECTS:
;	  1070	!	None
;	  1071	!--
;	  1072	
;	  1073	    begin
;	  1074	    GET_DUP_DATA_BASE (DB);
;	  1075	
;	  1076	    map
;	  1077		CCB : ref block field (C_FIELDS);
;	  1078	
;	  1079	    bind
;	  1080		EDB = .DB [D_EXT_ADDR] : block field (E_FIELDS);
;	  1081	
;	  1082	    CALL$P (KMCPRM, .DB [D_KMC_PIX], .CCB);
;	  1083	    CCB [C_PRM2] = .EDB [E_REGISTER];
;	  1084	    CCB [$SUB_FIELD (C_PRM5, 0, 0, 8, 1)] = .EDB [ES_XMT];
;	  1085	    CCB [$SUB_FIELD (C_PRM5, 0, 8, 8, 1)] = .EDB [ES_RCV];
;	  1086	    DDCCP$ (.CCB, CS_SUC);
;	  1087	    end;			!of routine CTLGET


						.GLOBL	KMCPRM, $CALLP, $DDCCP


						.SBTTL	CTLGET
000000	010446 				CTLGET: MOV	R4,-(SP)			; CCB,*					1082
000002	012746  000001 				MOV	#1,-(SP)
000006	012746  000000G				MOV	#KMCPRM,-(SP)
000012	005046 					CLR	-(SP)
000014	116516  000015 				MOVB	15(R5),(SP)			; *(DB),*
000020	004767  000000G				JSR	PC,$CALLP
000024	016500  000040 				MOV	40(R5),R0			; *(DB),*				1083
000030	016064  000016  000026 			MOV	16(R0),26(R4)			; *,*(CCB)
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  41
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (15)

000036	016001  000020 				MOV	20(R0),R1			;					1084
000042	072127  177770 				ASH	#-10,R1
000046	042701  177760 				BIC	#177760,R1
000052	105064  000034 				CLRB	34(R4)				; *(CCB)
000056	150164  000034 				BISB	R1,34(R4)			; *,*(CCB)
000062	016001  000020 				MOV	20(R0),R1			;					1085
000066	072127  177764 				ASH	#-14,R1
000072	042701  177760 				BIC	#177760,R1
000076	105064  000035 				CLRB	35(R4)				; *(CCB)
000102	150164  000035 				BISB	R1,35(R4)			; *,*(CCB)
000106	012703  000001 				MOV	#1,R3				;					1086
000112	004767  000000G				JSR	PC,$DDCCP
000116	062706  000010 				ADD	#10,SP				;					1073
000122	000207 					RTS	PC				;					1050

; Routine Size:  42 words,	Routine Base:  $CODE$ + 2556
; Maximum stack depth per invocation:  5 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  42
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (16)

;	  1088	routine CTLSET (DB, CCB) : MCB_DB_CCB novalue =
;	  1089	
;	  1090	!++
;	  1091	! FUNCTIONAL DESCRIPTION:
;	  1092	!
;	  1093	!
;	  1094	! FORMAL PARAMETERS:
;	  1095	!	CCB = address of CCB.
;	  1096	!
;	  1097	! IMPLICIT INPUTS:
;	  1098	!	None
;	  1099	!
;	  1100	! IMPLICIT OUTPUTS:
;	  1101	!	None
;	  1102	!
;	  1103	! ROUTINE VALUE:
;	  1104	! COMPLETION CODES:
;	  1105	!	None
;	  1106	!
;	  1107	! SIDE EFFECTS:
;	  1108	!	None
;	  1109	!--
;	  1110	
;	  1111	    begin
;	  1112	    GET_DUP_DATA_BASE (DB);
;	  1113	
;	  1114	    map
;	  1115		CCB : ref block field (C_FIELDS);
;	  1116	
;	  1117	    DB [DF_HALF_DUPLEX] = .CCB [C_PRM2];
;	  1118	    DB [DF_CONTROLLER_LOOPBACK] = .CCB [C_PRM3];
;	  1119	    DB [DF_INTERNAL_CLOCK] = .CCB [C_PRM4];
;	  1120	    DDCCP$ (.CCB, CS_SUC);
;	  1121	    end;			!of routine CTLSET


						.SBTTL	CTLSET
000000	012700  000002 			CTLSET: MOV	#2,R0				;					1117
000004	060500 					ADD	R5,R0				; DB,*
000006	116401  000026 				MOVB	26(R4),R1			; *(CCB),*
000012	142710  000004 				BICB	#4,(R0)
000016	006001 					ROR	R1
000020	103002 					BCC	1$
000022	152710  000004 				BISB	#4,(R0)
000026	116401  000030 			1$:	MOVB	30(R4),R1			; *(CCB),*				1118
000032	142710  000010 				BICB	#10,(R0)
000036	006001 					ROR	R1
000040	103002 					BCC	2$
000042	152710  000010 				BISB	#10,(R0)
000046	116401  000032 			2$:	MOVB	32(R4),R1			; *(CCB),*				1119
000052	142710  000020 				BICB	#20,(R0)
000056	006001 					ROR	R1
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  43
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (16)

000060	103002 					BCC	3$
000062	152710  000020 				BISB	#20,(R0)
000066	012703  000001 			3$:	MOV	#1,R3				;					1120
000072	004767  000000G				JSR	PC,$DDCCP
000076	000207 					RTS	PC				;					1088

; Routine Size:  32 words,	Routine Base:  $CODE$ + 2702
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  44
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (17)

;	  1122	routine CTLSTP (DB, CCB) : MCB_DB_CCB novalue =
;	  1123	
;	  1124	!++
;	  1125	! FUNCTIONAL DESCRIPTION:
;	  1126	!
;	  1127	!
;	  1128	! FORMAL PARAMETERS:
;	  1129	!	CCB = address of CCB.
;	  1130	!
;	  1131	! IMPLICIT INPUTS:
;	  1132	!	None
;	  1133	!
;	  1134	! IMPLICIT OUTPUTS:
;	  1135	!	None
;	  1136	!
;	  1137	! ROUTINE VALUE:
;	  1138	! COMPLETION CODES:
;	  1139	!	None
;	  1140	!
;	  1141	! SIDE EFFECTS:
;	  1142	!	None
;	  1143	!--
;	  1144	
;	  1145	    begin
;	  1146	
;	  1147	    map
;	  1148		CCB : ref block field (C_FIELDS);
;	  1149	
;	  1150	    local
;	  1151		EDB : ref block field (E_FIELDS);
;	  1152	
;	  1153	    GET_DUP_DATA_BASE (DB);
;	  1154	
;	  1155	    if not .DB [DF_LINE_ACTIVE] then return DDCCP$ (.CCB, CS_SUC);
;	  1156	
;	  1157	    DB [DF_STOPPING_LINE] = TRUE;
;	  1158	    EDB = .DB [D_EXT_ADDR];
;	  1159	
;	  1160	    if .DB [DF_ENABLED]
;	  1161	    then
;	  1162		begin
;	  1163		EDB [E_CTL] = 0;
;	  1164		CCB [C_STS] = CICTL;
;	  1165		GIVE_TO_KMC (.CCB);
;	  1166		return;
;	  1167		end;
;	  1168	
;	  1169	    if .vector [DB [D_PENDING_CONTROL_CCBS], 0] neqa 0
;	  1170	    then
;	  1171		begin
;	  1172		$MCB_QUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], .CCB);
;	  1173		return;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  45
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (17)

;	  1174		end;
;	  1175	
;	  1176	    DB [D_ASSIGNABLE_RECEIVE_COUNT] = 0;
;	  1177	    DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 0;
;	  1178	    $MCB_CANCEL_RDB_REQUEST ();
;	  1179	
;	  1180	    if .DB [D_ASSIGNED_RECEIVE_COUNT] neq 0
;	  1181	    then
;	  1182		begin
;	  1183		DB [DF_KILLING_RECEIVES] = TRUE;
;	  1184		CCB [C_STS] = CIRBK;
;	  1185		GIVE_TO_KMC (.CCB);
;	  1186		return;
;	  1187		end;
;	  1188	
;	  1189	    if .DB [D_ASSIGNED_TRANSMIT_COUNT] neq 0
;	  1190	    then
;	  1191		begin
;	  1192		DB [DF_KILLING_TRANSMITS] = TRUE;
;	  1193		CCB [C_STS] = CITBK;
;	  1194		GIVE_TO_KMC (.CCB);
;	  1195		return;
;	  1196		end;
;	  1197	
;	  1198	    $MCB_DISABLE_LONG_TIMER ();
;	  1199	    CALL$P (KMCSTP, .DB [D_KMC_PIX], .DB [D_UNIT]);
;	  1200	    DB [DF_DUP_CSR_SET] = FALSE;
;	  1201	    DB [DF_STOPPING_LINE] = FALSE;
;	  1202	    DB [DF_LINE_ACTIVE] = FALSE;
;	  1203	    CCB [C_LIX] = .DB [D_LIX];
;	  1204	    DDCCP$ (.CCB, CS_SUC);
;	  1205	    end;			!of routine CTLSTP


						.GLOBL	$RDBCN, $LTMDS, KMCSTP


						.SBTTL	CTLSTP
000000	010402 				CTLSTP: MOV	R4,R2				; *,CCB					1122
000002	012746  000002 				MOV	#2,-(SP)			;					1155
000006	060516 					ADD	R5,(SP)				; DB,*
000010	105776  000000 				TSTB	@0(SP)
000014	100405 					BMI	1$
000016	012703  000001 				MOV	#1,R3
000022	004767  000000G				JSR	PC,$DDCCP
000026	000524 					BR	7$
000030	152776  000001  000000 		1$:	BISB	#1,@0(SP)			;					1157
000036	016500  000040 				MOV	40(R5),R0			; *(DB),EDB				1158
000042	132776  000040  000000 			BITB	#40,@0(SP)			;					1160
000050	001406 					BEQ	2$
000052	005060  000024 				CLR	24(R0)				; *(EDB)				1163
000056	012762  000222' 000014 			MOV	#CICTL,14(R2)			; *,*(CCB)				1164
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  46
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (17)

000064	000440 					BR	5$				;					1165
000066	012703  000010 			2$:	MOV	#10,R3				;					1169
000072	060503 					ADD	R5,R3				; DB,*
000074	005713 					TST	(R3)
000076	001404 					BEQ	3$
000100	010204 					MOV	R2,R4				; CCB,*					1172
000102	004767  000000G				JSR	PC,$CMQIN
000106	000474 					BR	7$				;					1171
000110	105065  000025 			3$:	CLRB	25(R5)				; *(DB)					1176
000114	105065  000023 				CLRB	23(R5)				; *(DB)					1177
000120	004767  000000G				JSR	PC,$RDBCN			;					1178
000124	105765  000024 				TSTB	24(R5)				; *(DB)					1180
000130	001406 					BEQ	4$
000132	052715  001000 				BIS	#1000,(R5)			; *,DB					1183
000136	012762  000444' 000014 			MOV	#CIRBK,14(R2)			; *,*(CCB)				1184
000144	000410 					BR	5$				;					1185
000146	105765  000022 			4$:	TSTB	22(R5)				; *(DB)					1189
000152	001411 					BEQ	6$
000154	052715  000400 				BIS	#400,(R5)			; *,DB					1192
000160	012762  000756' 000014 			MOV	#CITBK,14(R2)			; *,*(CCB)				1193
000166	010204 				5$:	MOV	R2,R4				; CCB,*					1194
000170	004767  000000V				JSR	PC,GIVE.TO.KMC
000174	000441 					BR	7$				;					1191
000176	004767  000000G			6$:	JSR	PC,$LTMDS			;					1198
000202	116500  000016 				MOVB	16(R5),R0			; *(DB),*				1199
000206	010046 					MOV	R0,-(SP)
000210	012746  000001 				MOV	#1,-(SP)
000214	012746  000000G				MOV	#KMCSTP,-(SP)
000220	005046 					CLR	-(SP)
000222	116516  000015 				MOVB	15(R5),(SP)			; *(DB),*
000226	004767  000000G				JSR	PC,$CALLP
000232	142776  000100  000010 			BICB	#100,@10(SP)			;					1200
000240	142776  000001  000010 			BICB	#1,@10(SP)			;					1201
000246	142776  000200  000010 			BICB	#200,@10(SP)			;					1202
000254	116562  000020  000010 			MOVB	20(R5),10(R2)			; *(DB),*(CCB)				1203
000262	010204 					MOV	R2,R4				; CCB,*					1204
000264	012703  000001 				MOV	#1,R3
000270	004767  000000G				JSR	PC,$DDCCP
000274	062706  000010 				ADD	#10,SP				;					1145
000300	005726 				7$:	TST	(SP)+				;					1122
000302	000207 					RTS	PC

; Routine Size:  98 words,	Routine Base:  $CODE$ + 3002
; Maximum stack depth per invocation:  6 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  47
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (18)

;	  1206	routine CTLSTR (DB, CCB) : MCB_DB_CCB novalue =
;	  1207	
;	  1208	!++
;	  1209	! FUNCTIONAL DESCRIPTION:
;	  1210	!
;	  1211	!
;	  1212	! FORMAL PARAMETERS:
;	  1213	!	CCB = address of CCB.
;	  1214	!
;	  1215	! IMPLICIT INPUTS:
;	  1216	!	None
;	  1217	!
;	  1218	! IMPLICIT OUTPUTS:
;	  1219	!	None
;	  1220	!
;	  1221	! ROUTINE VALUE:
;	  1222	! COMPLETION CODES:
;	  1223	!	None
;	  1224	!
;	  1225	! SIDE EFFECTS:
;	  1226	!	None
;	  1227	!--
;	  1228	
;	  1229	    begin
;	  1230	
;	  1231	    map
;	  1232		CCB : ref block field (C_FIELDS);
;	  1233	
;	  1234	    GET_DUP_DATA_BASE (DB);
;	  1235	
;	  1236	    if .DB [DF_LINE_ACTIVE] then return DDCCP$ (.CCB, CS_SUC);
;	  1237	
;	  1238	
;	  1239	    if not .DB [DF_STARTING_LINE]
;	  1240	    then
;	  1241		begin
;	  1242	
;	  1243		local
;	  1244		    EDB : ref block field (E_FIELDS);
;	  1245	
;	  1246		EDB = .DB [D_EXT_ADDR];
;	  1247	
;	  1248		if .EDB [E_REGISTER] lssa %o'160000' then return DDCCP$ (.CCB, CE_ABO);
;	  1249	
;	  1250		if REGISTER_NXM (.EDB [E_REGISTER], 4) then return DDCCP$ (.CCB, CE_ABO);
;	  1251	
;	  1252		if not CALL$P (KMCSTR, .DB [D_KMC_PIX], .DB [D_UNIT], .MCB$GW_PROCESS_HANDLE)
;	  1253		then
;	  1254		    return DDCCP$ (.CCB, CE_ABO);
;	  1255	
;	  1256		DB [D_LIX] = .CCB [C_LIX];
;	  1257		$MCB_ENABLE_LONG_TIMER ();
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  48
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (18)

;	  1258		DB [DF_STARTING_LINE] = TRUE;
;	  1259		end;
;	  1260	
;	  1261	    if not .DB [DF_DUP_CSR_SET]
;	  1262	    then
;	  1263		begin
;	  1264		CCB [C_STS] = CIBAS;
;	  1265		GIVE_TO_KMC (.CCB);
;	  1266		return;
;	  1267		end;
;	  1268	
;	  1269	    if not .DB [DF_ENABLED]
;	  1270	    then
;	  1271		begin
;	  1272		INITIALIZE_CHARACTERISTICS ();
;	  1273		DB [DF_DSR] = FALSE;
;	  1274		CCB [C_STS] = CICTL;
;	  1275		GIVE_TO_KMC (.CCB);
;	  1276		return;
;	  1277		end;
;	  1278	
;	  1279	    DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 2;
;	  1280	    DB [D_ASSIGNABLE_RECEIVE_COUNT] = 2;
;	  1281	    GET_RECEIVE_BUFFERS ();
;	  1282	    DB [DF_STARTING_LINE] = FALSE;
;	  1283	    DB [DF_LINE_ACTIVE] = TRUE;
;	  1284	    CCB [C_LIX] = .DB [D_LIX];
;	  1285	    DDCCP$ (.CCB, CS_SUC);
;	  1286	    end;			!of routine CTLSTR


						.GLOBL	KMCSTR, $LTMEN


						.SBTTL	CTLSTR
000000	010446 				CTLSTR: MOV	R4,-(SP)			;					1206
000002	012746  000002 				MOV	#2,-(SP)			;					1236
000006	060516 					ADD	R5,(SP)				; DB,*
000010	105776  000000 				TSTB	@0(SP)
000014	100545 					BMI	7$
000016	132776  000002  000000 			BITB	#2,@0(SP)			;					1239
000024	001062 					BNE	3$
000026	016502  000040 				MOV	40(R5),R2			; *(DB),EDB				1246
000032	026227  000016  160000 			CMP	16(R2),#160000			; *(EDB),*				1248
000040	103005 					BHIS	2$
000042	016604  000002 			1$:	MOV	2(SP),R4
000046	012703  177770 				MOV	#-10,R3
000052	000532 					BR	8$
000054	016200  000016 			2$:	MOV	16(R2),R0			; *(EDB),*				1250
000060	012701  000004 				MOV	#4,R1
000064	004767  000000G				JSR	PC,KMCNXM
000070	006000 					ROR	R0
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  49
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (18)

000072	103763 					BLO	1$
000074	016746  000000G				MOV	.CRPIX,-(SP)			;					1252
000100	116500  000016 				MOVB	16(R5),R0			; *(DB),*
000104	010046 					MOV	R0,-(SP)
000106	012746  000002 				MOV	#2,-(SP)
000112	012746  000000G				MOV	#KMCSTR,-(SP)
000116	005046 					CLR	-(SP)
000120	116516  000015 				MOVB	15(R5),(SP)			; *(DB),*
000124	004767  000000G				JSR	PC,$CALLP
000130	062706  000012 				ADD	#12,SP
000134	032700  000001 				BIT	#1,R0
000140	001740 					BEQ	1$				;					1254
000142	016600  000002 				MOV	2(SP),R0			;					1256
000146	116065  000010  000020 			MOVB	10(R0),20(R5)			; *,*(DB)
000154	105065  000021 				CLRB	21(R5)				; *(DB)
000160	004767  000000G				JSR	PC,$LTMEN			;					1257
000164	152776  000002  000000 			BISB	#2,@0(SP)			;					1258
000172	132776  000100  000000 		3$:	BITB	#100,@0(SP)			;					1261
000200	001006 					BNE	4$
000202	016600  000002 				MOV	2(SP),R0			;					1264
000206	012760  000122' 000014 			MOV	#CIBAS,14(R0)
000214	000415 					BR	5$				;					1265
000216	132776  000040  000000 		4$:	BITB	#40,@0(SP)			;					1269
000224	001016 					BNE	6$
000226	004767  000000V				JSR	PC,INITIALIZE.CHARACTERISTICS	;					1272
000232	042715  002000 				BIC	#2000,(R5)			; *,DB					1273
000236	016600  000002 				MOV	2(SP),R0			;					1274
000242	012760  000222' 000014 			MOV	#CICTL,14(R0)
000250	016604  000002 			5$:	MOV	2(SP),R4			;					1275
000254	004767  000000V				JSR	PC,GIVE.TO.KMC
000260	000431 					BR	9$				;					1271
000262	112765  000002  000023 		6$:	MOVB	#2,23(R5)			; *,*(DB)				1279
000270	112765  000002  000025 			MOVB	#2,25(R5)			; *,*(DB)				1280
000276	004767  000000V				JSR	PC,GET.RECEIVE.BUFFERS		;					1281
000302	142776  000002  000000 			BICB	#2,@0(SP)			;					1282
000310	152776  000200  000000 			BISB	#200,@0(SP)			;					1283
000316	016600  000002 				MOV	2(SP),R0			;					1284
000322	116560  000020  000010 			MOVB	20(R5),10(R0)			; *(DB),*
000330	016604  000002 			7$:	MOV	2(SP),R4			;					1285
000334	012703  000001 				MOV	#1,R3
000340	004767  000000G			8$:	JSR	PC,$DDCCP
000344	022626 				9$:	CMP	(SP)+,(SP)+			;					1206
000346	000207 					RTS	PC

; Routine Size:  116 words,	Routine Base:  $CODE$ + 3306
; Maximum stack depth per invocation:  8 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  50
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (19)

;	  1287	routine DEVICE_BROKEN (DB) : LINKAGE_DB novalue =
;	  1288	
;	  1289	!++
;	  1290	! FUNCTIONAL DESCRIPTION:
;	  1291	!
;	  1292	!
;	  1293	! FORMAL PARAMETERS:
;	  1294	!	None
;	  1295	!
;	  1296	! IMPLICIT INPUTS:
;	  1297	!	None
;	  1298	!
;	  1299	! IMPLICIT OUTPUTS:
;	  1300	!	None
;	  1301	!
;	  1302	! ROUTINE VALUE:
;	  1303	! COMPLETION CODES:
;	  1304	!	None
;	  1305	!
;	  1306	! SIDE EFFECTS:
;	  1307	!	None
;	  1308	!--
;	  1309	
;	  1310	    begin
;	  1311	    GET_DUP_DATA_BASE (DB);
;	  1312	    DB [DF_ENABLED] = FALSE;
;	  1313	    DB [DF_DUP_CSR_SET] = FALSE;
;	  1314	    end;			!of routine DEVICE_BROKEN


						.SBTTL	DEVICE.BROKEN
000000	142765  000140  000002 		DEVICE.BROKEN:
						BICB	#140,2(R5)			; *,*(DB)				1313
000006	000207 					RTS	PC				;					1287

; Routine Size:  4 words,	Routine Base:  $CODE$ + 3656
; Maximum stack depth per invocation:  0 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  51
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (20)

;	  1315	routine GET_RECEIVE_BUFFERS : novalue =
;	  1316	
;	  1317	!++
;	  1318	! FUNCTIONAL DESCRIPTION:
;	  1319	!
;	  1320	!
;	  1321	! FORMAL PARAMETERS:
;	  1322	!	None
;	  1323	!
;	  1324	! IMPLICIT INPUTS:
;	  1325	!	None
;	  1326	!
;	  1327	! IMPLICIT OUTPUTS:
;	  1328	!	None
;	  1329	!
;	  1330	! ROUTINE VALUE:
;	  1331	! COMPLETION CODES:
;	  1332	!	None
;	  1333	!
;	  1334	! SIDE EFFECTS:
;	  1335	!	None
;	  1336	!--
;	  1337	
;	  1338	    begin
;	  1339	    GET_DUP_DATA_BASE (DB);
;	  1340	
;	  1341	    while .DB [D_ASSIGNABLE_RECEIVE_COUNT] neq 0 do
;	  1342		begin
;	  1343	
;	  1344		local
;	  1345		    CCB : ref block field (C_FIELDS);
;	  1346	
;	  1347		if $MCB_GET_RDB (CCB)
;	  1348		then
;	  1349		    begin
;	  1350		    CCB [C_FNC] = 0;
;	  1351		    ASSIGN_RECEIVE_BUFFER (.CCB);
;	  1352		    end
;	  1353		else
;	  1354		    begin
;	  1355		    $MCB_REQUEST_RDB ();
;	  1356		    exitloop;
;	  1357		    end;
;	  1358	
;	  1359		end;
;	  1360	
;	  1361	    end;			!of routine GET_RECEIVE_BUFFERS


						.GLOBL	$RDBGT, $RDBRQ
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  52
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (20)

						.SBTTL	GET.RECEIVE.BUFFERS
000000	010446 				GET.RECEIVE.BUFFERS:
						MOV	R4,-(SP)			;					1315
000002	016700  000002G			1$:	MOV	.CRDAT+2,R0			;					1341
000006	105760  000025 				TSTB	25(R0)
000012	001412 					BEQ	3$
000014	004767  000000G				JSR	PC,$RDBGT			;					1347
000020	103405 					BCS	2$
000022	105064  000012 				CLRB	12(R4)				; *(CCB)				1350
000026	004767  174060 				JSR	PC,ASSIGN.RECEIVE.BUFFER	;					1351
000032	000763 					BR	1$				;					1347
000034	004767  000000G			2$:	JSR	PC,$RDBRQ			;					1355
000040	012604 				3$:	MOV	(SP)+,R4			;					1315
000042	000207 					RTS	PC

; Routine Size:  18 words,	Routine Base:  $CODE$ + 3666
; Maximum stack depth per invocation:  2 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  53
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (21)

;	  1362	routine GIVE_TO_KMC (CCB) : KDP_CCB novalue =
;	  1363	
;	  1364	!++
;	  1365	! FUNCTIONAL DESCRIPTION:
;	  1366	!
;	  1367	!
;	  1368	! FORMAL PARAMETERS:
;	  1369	!	CCB = address of service CCB.
;	  1370	!
;	  1371	! IMPLICIT INPUTS:
;	  1372	!	None
;	  1373	!
;	  1374	! IMPLICIT OUTPUTS:
;	  1375	!	None
;	  1376	!
;	  1377	! ROUTINE VALUE:
;	  1378	! COMPLETION CODES:
;	  1379	!	None
;	  1380	!
;	  1381	! SIDE EFFECTS:
;	  1382	!	None
;	  1383	!--
;	  1384	
;	  1385	    begin
;	  1386	
;	  1387	    map
;	  1388		CCB : ref block field (C_FIELDS);
;	  1389	
;	  1390	    GET_DUP_DATA_BASE (DB);
;	  1391	    CCB [C_LIX] = .DB [D_UNIT];
;	  1392	    CCB [C_PIX] = .MCB$GW_PROCESS_HANDLE;
;	  1393	    CALL$P (KMCQUE, .DB [D_KMC_PIX], .CCB);
;	  1394	    end;			!of routine GIVE_TO_KMC


						.GLOBL	KMCQUE


						.SBTTL	GIVE.TO.KMC
000000	010046 				GIVE.TO.KMC:
						MOV	R0,-(SP)			;					1362
000002	016700  000002G				MOV	.CRDAT+2,R0			;					1391
000006	116064  000016  000010 			MOVB	16(R0),10(R4)			; *,*(CCB)
000014	116764  000000G 000011 			MOVB	.CRPIX,11(R4)			; *,*(CCB)				1392
000022	010446 					MOV	R4,-(SP)			; CCB,*					1393
000024	012746  000001 				MOV	#1,-(SP)
000030	012746  000000G				MOV	#KMCQUE,-(SP)
000034	005046 					CLR	-(SP)
000036	116016  000015 				MOVB	15(R0),(SP)
000042	004767  000000G				JSR	PC,$CALLP
000046	062706  000010 				ADD	#10,SP				;					1385
000052	012600 					MOV	(SP)+,R0			;					1362
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  54
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (21)

000054	000207 					RTS	PC

; Routine Size:  23 words,	Routine Base:  $CODE$ + 3732
; Maximum stack depth per invocation:  6 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  55
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (22)

;	  1395	routine INITIALIZE_CHARACTERISTICS : novalue =
;	  1396	
;	  1397	!++
;	  1398	! FUNCTIONAL DESCRIPTION:
;	  1399	!
;	  1400	!
;	  1401	! FORMAL PARAMETERS:
;	  1402	!	None
;	  1403	!
;	  1404	! IMPLICIT INPUTS:
;	  1405	!	None
;	  1406	!
;	  1407	! IMPLICIT OUTPUTS:
;	  1408	!	None
;	  1409	!
;	  1410	! ROUTINE VALUE:
;	  1411	! COMPLETION CODES:
;	  1412	!	None
;	  1413	!
;	  1414	! SIDE EFFECTS:
;	  1415	!	None
;	  1416	!--
;	  1417	
;	  1418	    begin
;	  1419	
;	  1420	    local
;	  1421		EDB : ref block field (E_FIELDS);
;	  1422	
;	  1423	    GET_DUP_DATA_BASE (DB);
;	  1424	    EDB = .DB [D_EXT_ADDR];
;	  1425	    EDB [E_CTL] = BIT_MASK [CT_ENB];
;	  1426	
;	  1427	    if .EDB [ES_PRT] eql EP_DEC
;	  1428	    then
;	  1429		EDB [$SUB_FIELD (E_CTL, CT_DEC)] = 1;
;	  1430	
;	  1431	    if .DB [DF_HALF_DUPLEX]
;	  1432	    then
;	  1433		EDB [$SUB_FIELD (E_CTL, CT_DUP)] = 1;
;	  1434	
;	  1435	    if .DB [DF_INTERNAL_CLOCK]
;	  1436	    then
;	  1437		begin
;	  1438	
;	  1439		if .DB [DF_CONTROLLER_LOOPBACK]
;	  1440		then
;	  1441		    EDB [$SUB_FIELD (E_CTL, CT_MNT)] = 1
;	  1442		else
;	  1443		    EDB [$SUB_FIELD (E_CTL, CT_MNT)] = 2;
;	  1444	
;	  1445		end;
;	  1446	
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  56
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (22)

;	  1447	    EDB [E_POLLING_RATE] = LOPOL [.EDB [ES_XMT]];
;	  1448	    DB [D_POLLING_THRESHOLD] = POLLING_THRESHOLD;
;	  1449	    end;			!of routine INITIALIZE_CHARACTERISTICS


						.SBTTL	INITIALIZE.CHARACTERISTICS
000000	004167  000000G			INITIALIZE.CHARACTERISTICS:
						JSR	R1,$SAVE3			;					1395
000004	016702  000002G				MOV	.CRDAT+2,R2			;					1418
000010	016201  000040 				MOV	40(R2),R1			; *,EDB					1424
000014	012703  000024 				MOV	#24,R3				;					1425
000020	060103 					ADD	R1,R3				; EDB,*
000022	012713  000400 				MOV	#400,(R3)
000026	116100  000022 				MOVB	22(R1),R0			; *(EDB),*				1427
000032	042700  177770 				BIC	#177770,R0
000036	020027  000001 				CMP	R0,#1
000042	001002 					BNE	1$
000044	052713  100000 				BIS	#100000,(R3)			;					1429
000050	012700  000002 			1$:	MOV	#2,R0				;					1431
000054	060200 					ADD	R2,R0
000056	132710  000004 				BITB	#4,(R0)
000062	001402 					BEQ	2$
000064	052713  020000 				BIS	#20000,(R3)			;					1433
000070	132710  000020 			2$:	BITB	#20,(R0)			;					1435
000074	001414 					BEQ	4$
000076	132710  000010 				BITB	#10,(R0)			;					1439
000102	001405 					BEQ	3$
000104	042713  006000 				BIC	#6000,(R3)			;					1441
000110	052713  002000 				BIS	#2000,(R3)
000114	000404 					BR	4$				;					1439
000116	042713  006000 			3$:	BIC	#6000,(R3)			;					1443
000122	052713  004000 				BIS	#4000,(R3)
000126	016100  000020 			4$:	MOV	20(R1),R0			; *(EDB),*				1447
000132	072027  177770 				ASH	#-10,R0
000136	042700  177760 				BIC	#177760,R0
000142	116061  000020' 000026 			MOVB	LOPOL.STRING(R0),26(R1)		; *,*(EDB)
000150	112762  000004  000027 			MOVB	#4,27(R2)			;					1448
000156	000207 					RTS	PC				;					1395

; Routine Size:  56 words,	Routine Base:  $CODE$ + 4010
; Maximum stack depth per invocation:  5 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  57
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (23)

;	  1450	routine INITIALIZE_DESCRIPTOR_LIST (RING, POOL, COUNT) : LINKAGE_RING_POOL_COUNT novalue =
;	  1451	
;	  1452	!++
;	  1453	! FUNCTIONAL DESCRIPTION:
;	  1454	!
;	  1455	!
;	  1456	! FORMAL PARAMETERS:
;	  1457	!	RING = address of ring to link descriptor list into.
;	  1458	!	POOL = address vector of memory available for descriptors.
;	  1459	!	COUNT = number of descriptors to put in list.
;	  1460	!
;	  1461	! IMPLICIT INPUTS:
;	  1462	!	None
;	  1463	!
;	  1464	! IMPLICIT OUTPUTS:
;	  1465	!	RING = constructed descriptor list added to this ring.
;	  1466	!	POOL = advanced over allocated descriptors.
;	  1467	!
;	  1468	! ROUTINE VALUE:
;	  1469	! COMPLETION CODES:
;	  1470	!	None
;	  1471	!
;	  1472	! SIDE EFFECTS:
;	  1473	!	None
;	  1474	!--
;	  1475	
;	  1476	    begin
;	  1477	
;	  1478	    local
;	  1479		DESC : ref vector;
;	  1480	
;	  1481	    GET_DUP_DATA_BASE (DB);
;	  1482	    DESC = ..POOL;
;	  1483	    begin
;	  1484	
;	  1485	    local
;	  1486		BIAS;
;	  1487	
;	  1488	    $MCB_CONVERT_TO_UBA_ADDRESS ((.DB [D_EXT_BIAS], DESC [3]), DESC [1], BIAS);
;	  1489	    DESC [2] = BIAS = .BIAS^14;
;	  1490	    end;
;	  1491	
;	  1492	    if ..RING neq 0
;	  1493	    then
;	  1494		begin
;	  1495		DESC [0] = ...RING;
;	  1496		..RING = DESC [0];
;	  1497		end
;	  1498	    else
;	  1499		.RING = DESC [0] = DESC [0];
;	  1500	
;	  1501	    .POOL = DESC [3 + .COUNT*BD_LEN];
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  58
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (23)

;	  1502	    end;			!of routine INITIALIZE_DESCRIPTOR_LIST


						.GLOBL	$PHY18


						.SBTTL	INITIALIZE.DESCRIPTOR.LIST
000000	004167  000000G			INITIALIZE.DESCRIPTOR.LIST:
						JSR	R1,$SAVE5			;					1450
000004	010346 					MOV	R3,-(SP)
000006	010201 					MOV	R2,R1				; *,RING
000010	011300 					MOV	(R3),R0				; *,DESC				1482
000012	016705  000002G				MOV	.CRDAT+2,R5			;					1488
000016	012703  000006 				MOV	#6,R3
000022	060003 					ADD	R0,R3				; DESC,*
000024	016502  000036 				MOV	36(R5),R2
000030	004767  000000G				JSR	PC,$PHY18
000034	010360  000002 				MOV	R3,2(R0)			; *,*(DESC)
000040	072227  000016 				ASH	#16,R2				;					1489
000044	010260  000004 				MOV	R2,4(R0)			; BIAS,*(DESC)
000050	011102 					MOV	(R1),R2				; RING,*				1492
000052	001405 					BEQ	1$
000054	017110  000000 				MOV	@0(R1),(R0)			; *(RING),DESC				1495
000060	010071  000000 				MOV	R0,@0(R1)			; DESC,*(RING)				1496
000064	000402 					BR	2$				;					1492
000066	010010 				1$:	MOV	R0,(R0)				; DESC,DESC				1499
000070	010011 					MOV	R0,(R1)				; DESC,RING
000072	010403 				2$:	MOV	R4,R3				; COUNT,*				1501
000074	070327  000003 				MUL	#3,R3
000100	010304 					MOV	R3,R4
000102	006304 					ASL	R4
000104	060004 					ADD	R0,R4				; DESC,*
000106	010476  000000 				MOV	R4,@0(SP)
000112	062736  000006 				ADD	#6,@(SP)+
000116	000207 					RTS	PC				;					1450

; Routine Size:  40 words,	Routine Base:  $CODE$ + 4170
; Maximum stack depth per invocation:  8 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  59
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (24)

;	  1503	routine KDPCTL (DB, CCB, MODIFIER) : MCB_DB_CCB_MOD novalue =
;	  1504	
;	  1505	!++
;	  1506	! FUNCTIONAL DESCRIPTION:
;	  1507	!
;	  1508	!
;	  1509	! FORMAL PARAMETERS:
;	  1510	!	CCB = address of CTL CCB.
;	  1511	!	MODIFIER = control function modifier (from C_MOD of CCB).
;	  1512	!
;	  1513	! IMPLICIT INPUTS:
;	  1514	!	None
;	  1515	!
;	  1516	! IMPLICIT OUTPUTS:
;	  1517	!	None
;	  1518	!
;	  1519	! ROUTINE VALUE:
;	  1520	! COMPLETION CODES:
;	  1521	!	None
;	  1522	!
;	  1523	! SIDE EFFECTS:
;	  1524	!	None
;	  1525	!--
;	  1526	
;	  1527	    begin
;	  1528	
;	  1529	    external routine
;	  1530		$CCBRT;
;	  1531	
;	P 1532	    DISPATCH$ (.MODIFIER,
;	P 1533		TABLE$ ($DSPCR, FD_CTL,		! Control dispatch table:
;	P 1534		    (FM_STR, CTLSTR),		!  Start line
;	P 1535		    (FM_STP, CTLSTP),		!  Stop line
;	P 1536		    (FM_SET, CTLSET),		!  Set characteristics
;	P 1537		    (FM_GET, CTLGET)),		!  Get characteristics
;	P 1538		(.DB, .CCB),
;	  1539		MCB_DB_CCB);
;	  1540	    end;			!of routine KDPCTL



000126						.PSECT	$PLIT$,  RO ,  D  
000126	000000G				P.AAE:	.WORD	$DSPCR
000130	003306'					.WORD	CTLSTR
000132	003002'					.WORD	CTLSTP
000134	000000G					.WORD	$DSPCR
000136	000000G					.WORD	$DSPCR
000140	002702'					.WORD	CTLSET
000142	002556'					.WORD	CTLGET


						.SBTTL	KDPCTL
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  60
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (24)

004310						.PSECT	$CODE$,  RO 

000000	004773  000126'			KDPCTL: JSR	PC,@P.AAE(R3)			; *,*(MODIFIER)				1539
000004	000207 					RTS	PC				;					1503

; Routine Size:  3 words,	Routine Base:  $CODE$ + 4310
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  61
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (25)

;	  1541	routine KDPKIL (DB, CCB, MODIFIER) : MCB_DB_CCB_MOD novalue =
;	  1542	
;	  1543	!++
;	  1544	! FUNCTIONAL DESCRIPTION:
;	  1545	!
;	  1546	!
;	  1547	! FORMAL PARAMETERS:
;	  1548	!	CCB = address of CTL CCB.
;	  1549	!	MODIFIER = control function modifier (from C_MOD of CCB).
;	  1550	!
;	  1551	! IMPLICIT INPUTS:
;	  1552	!	None
;	  1553	!
;	  1554	! IMPLICIT OUTPUTS:
;	  1555	!	None
;	  1556	!
;	  1557	! ROUTINE VALUE:
;	  1558	! COMPLETION CODES:
;	  1559	!	None
;	  1560	!
;	  1561	! SIDE EFFECTS:
;	  1562	!	None
;	  1563	!--
;	  1564	
;	  1565	    begin
;	P 1566	    DISPATCH$ (
;	P 1567		.MODIFIER,
;	P 1568		TABLE$ ($DSPCR, FD_KIL,		! Kill dispatch table:
;	P 1569		    (FM_KIL, KILKIL),		!  Transmit and receive kill
;	P 1570		    (FM_CRA, KILCRA),		!  Receive kill
;	P 1571		    (FM_XKL, KILXKL)),		!  Transmit kill
;	P 1572		(.DB, .CCB),
;	  1573		MCB_DB_CCB);
;	  1574	    end;			!of routine KDPKIL



000144						.PSECT	$PLIT$,  RO ,  D  
000144	000000V				P.AAF:	.WORD	KILKIL
000146	000000V					.WORD	KILCRA
000150	000000V					.WORD	KILXKL


						.SBTTL	KDPKIL
004316						.PSECT	$CODE$,  RO 

000000	004773  000144'			KDPKIL: JSR	PC,@P.AAF(R3)			; *,*(MODIFIER)				1573
000004	000207 					RTS	PC				;					1541

; Routine Size:  3 words,	Routine Base:  $CODE$ + 4316
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  62
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (26)

;	  1575	routine KDPTIM (DB, MODIFIER) : MCB_DB_MOD novalue =
;	  1576	
;	  1577	!++
;	  1578	! FUNCTIONAL DESCRIPTION:
;	  1579	!
;	  1580	!
;	  1581	! FORMAL PARAMETERS:
;	  1582	!	MODIFIER = timer function modifier.
;	  1583	!
;	  1584	! IMPLICIT INPUTS:
;	  1585	!	None
;	  1586	!
;	  1587	! IMPLICIT OUTPUTS:
;	  1588	!	None
;	  1589	!
;	  1590	! ROUTINE VALUE:
;	  1591	! COMPLETION CODES:
;	  1592	!	None
;	  1593	!
;	  1594	! SIDE EFFECTS:
;	  1595	!	None
;	  1596	!--
;	  1597	
;	  1598	    begin
;	P 1599	    DISPATCH$ (
;	P 1600		.MODIFIER,
;	P 1601		TABLE$ ($DSPCR, FD_TIM,		! Timer dispatch table:
;	P 1602		    (FM_LTM, TIMLTM),		!  Long timer
;	P 1603		    (FM_RDB, TIMRDB),		!  RDB available
;	P 1604		    (FM_PWF, TIMPWF),		!  Power failure
;	P 1605		    (FM_PIN, TIMPIN)),		!  Process initialization
;	P 1606		(.DB),
;	  1607		MCB_DB);
;	  1608	    end;			!of routine KDPTIM



000152						.PSECT	$PLIT$,  RO ,  D  
000152	000000G				P.AAG:	.WORD	$DSPCR
000154	000000V					.WORD	TIMLTM
000156	000000V					.WORD	TIMPWF
000160	000000V					.WORD	TIMPIN
000162	000000G					.WORD	$DSPCR
000164	000000V					.WORD	TIMRDB


						.SBTTL	KDPTIM
004324						.PSECT	$CODE$,  RO 

000000	004773  000152'			KDPTIM: JSR	PC,@P.AAG(R3)			; *,*(MODIFIER)				1607
000004	000207 					RTS	PC				;					1575
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  63
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (26)

; Routine Size:  3 words,	Routine Base:  $CODE$ + 4324
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  64
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (27)

;	  1609	routine KDPXME (DB, CCB, MODIFIER) : MCB_DB_CCB_MOD novalue =
;	  1610	
;	  1611	!++
;	  1612	! FUNCTIONAL DESCRIPTION:
;	  1613	!
;	  1614	!
;	  1615	! FORMAL PARAMETERS:
;	  1616	!	CCB = address of transmit CCB.
;	  1617	!	MODIFIER = transmit function modifier (from C_MOD of CCB).
;	  1618	!
;	  1619	! IMPLICIT INPUTS:
;	  1620	!	None
;	  1621	!
;	  1622	! IMPLICIT OUTPUTS:
;	  1623	!	None
;	  1624	!
;	  1625	! ROUTINE VALUE:
;	  1626	! COMPLETION CODES:
;	  1627	!	None
;	  1628	!
;	  1629	! SIDE EFFECTS:
;	  1630	!	None
;	  1631	!--
;	  1632	
;	  1633	    begin
;	  1634	
;	  1635	    map
;	  1636		CCB : ref block field (C_FIELDS);
;	  1637	
;	  1638	    GET_DUP_DATA_BASE (DB);
;	  1639	
;	  1640	    if .DB [DF_LINE_ACTIVE]
;	  1641	    then
;	  1642		begin
;	  1643	
;	  1644		local
;	  1645		    SEG_CNT;
;	  1646	
;	  1647		$MCB_QUEUE_CCB (DB [D_ASSIGNABLE_TRANSMIT_CCBS], .CCB);
;	  1648		SEG_CNT = .DB [D_MAXIMUM_TRANSMIT_SEGMENTS];
;	  1649	
;	  1650		do
;	  1651		    begin
;	  1652	
;	  1653		    if (SEG_CNT = .SEG_CNT - 1) lss 0
;	  1654		    then
;	  1655			return SIGNAL_STOP (KDP$_SEG, .DB [$SUB_FIELD (D_ASSIGNABLE_TRANSMIT_CCBS, LIST_LAST)]);
;	  1656	
;	  1657		    end
;	  1658		while (CCB = .CCB [C_CHN]) neq 0;
;	  1659	
;	  1660		ASSIGN_TRANSMIT_BUFFER ();
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  65
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (27)

;	  1661		end
;	  1662	    else
;	  1663		begin
;	  1664		CCB [C_LIX] = .DB [D_LIX];
;	  1665		DDXCP$ (.CCB, CE_ABO);
;	  1666		end;
;	  1667	
;	  1668	    end;			!of routine KDPXME


						.GLOBL	$DDXCP


						.SBTTL	KDPXME
000000	010502 				KDPXME: MOV	R5,R2				; *,DB					1609
000002	105762  000002 				TSTB	2(R2)				; *(DB)					1640
000006	100032 					BPL	3$
000010	062705  000004 				ADD	#4,R5				;					1647
000014	010503 					MOV	R5,R3
000016	004767  000000G				JSR	PC,$CMQIN
000022	116201  000030 				MOVB	30(R2),R1			; *(DB),SEG.CNT				1648
000026	005301 				1$:	DEC	R1				; SEG.CNT				1653
000030	100013 					BPL	2$
000032	016246  000006 				MOV	6(R2),-(SP)			; *(DB),*				1655
000036	012746  100044 				MOV	#-77734,-(SP)
000042	012746  000002 				MOV	#2,-(SP)
000046	004767  000000G				JSR	PC,$STOP
000052	062706  000006 				ADD	#6,SP
000056	000207 					RTS	PC
000060	016404  000002 			2$:	MOV	2(R4),R4			; *(CCB),CCB				1658
000064	001360 					BNE	1$
000066	004767  173416 				JSR	PC,ASSIGN.TRANSMIT.BUFFER	;					1660
000072	000207 					RTS	PC				;					1640
000074	116264  000020  000010 		3$:	MOVB	20(R2),10(R4)			; *(DB),*(CCB)				1664
000102	012703  177770 				MOV	#-10,R3				;					1665
000106	004767  000000G				JSR	PC,$DDXCP
000112	000207 					RTS	PC				;					1609

; Routine Size:  38 words,	Routine Base:  $CODE$ + 4332
; Maximum stack depth per invocation:  4 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  66
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (28)

;	  1669	routine KILCRA (DB, CCB) : MCB_DB_CCB novalue =
;	  1670	
;	  1671	!++
;	  1672	! FUNCTIONAL DESCRIPTION:
;	  1673	!
;	  1674	!
;	  1675	! FORMAL PARAMETERS:
;	  1676	!	CCB = address of kill CCB.
;	  1677	!
;	  1678	! IMPLICIT INPUTS:
;	  1679	!	None
;	  1680	!
;	  1681	! IMPLICIT OUTPUTS:
;	  1682	!	None
;	  1683	!
;	  1684	! ROUTINE VALUE:
;	  1685	! COMPLETION CODES:
;	  1686	!	None
;	  1687	!
;	  1688	! SIDE EFFECTS:
;	  1689	!	None
;	  1690	!--
;	  1691	
;	  1692	    begin
;	  1693	
;	  1694	    map
;	  1695		CCB : ref block field (C_FIELDS);
;	  1696	
;	  1697	    local
;	  1698		EDB : ref block field (E_FIELDS);
;	  1699	
;	  1700	    GET_DUP_DATA_BASE (DB);
;	  1701	    EDB = .DB [D_EXT_ADDR];
;	  1702	
;	  1703	    if .DB [D_ASSIGNED_RECEIVE_COUNT] neq 0
;	  1704	    then
;	  1705		begin
;	  1706		DB [DF_KILLING_RECEIVES] = TRUE;
;	  1707		DB [D_ASSIGNABLE_RECEIVE_COUNT] = 0;
;	  1708		CCB [C_STS] = CIRBK;
;	  1709		GIVE_TO_KMC (.CCB);
;	  1710		end
;	  1711	    else
;	  1712		COMPLETE (DB [D_TIM], .CCB);
;	  1713	
;	  1714	    end;			!of routine KILCRA


						.SBTTL	KILCRA
000000	012700  000024 			KILCRA: MOV	#24,R0				;					1703
000004	060500 					ADD	R5,R0				; DB,*
000006	105710 					TSTB	(R0)
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  67
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (28)

000010	001412 					BEQ	1$
000012	052715  001000 				BIS	#1000,(R5)			; *,DB					1706
000016	105060  000001 				CLRB	1(R0)				;					1707
000022	012764  000444' 000014 			MOV	#CIRBK,14(R4)			; *,*(CCB)				1708
000030	004767  177230 				JSR	PC,GIVE.TO.KMC			;					1709
000034	000207 					RTS	PC				;					1703
000036	004767  175330 			1$:	JSR	PC,COMPLETE			;					1712
000042	000207 					RTS	PC				;					1669

; Routine Size:  18 words,	Routine Base:  $CODE$ + 4446
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  68
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (29)

;	  1715	routine KILKIL (DB, CCB) : MCB_DB_CCB novalue =
;	  1716	
;	  1717	!++
;	  1718	! FUNCTIONAL DESCRIPTION:
;	  1719	!
;	  1720	!
;	  1721	! FORMAL PARAMETERS:
;	  1722	!	CCB = address of kill CCB.
;	  1723	!
;	  1724	! IMPLICIT INPUTS:
;	  1725	!	None
;	  1726	!
;	  1727	! IMPLICIT OUTPUTS:
;	  1728	!	None
;	  1729	!
;	  1730	! ROUTINE VALUE:
;	  1731	! COMPLETION CODES:
;	  1732	!	None
;	  1733	!
;	  1734	! SIDE EFFECTS:
;	  1735	!	None
;	  1736	!--
;	  1737	
;	  1738	    begin
;	  1739	
;	  1740	    map
;	  1741		CCB : ref block field (C_FIELDS);
;	  1742	
;	  1743	    local
;	  1744		EDB : ref block field (E_FIELDS);
;	  1745	
;	  1746	    GET_DUP_DATA_BASE (DB);
;	  1747	    EDB = .DB [D_EXT_ADDR];
;	  1748	
;	  1749	    if .DB [D_ASSIGNED_RECEIVE_COUNT] eql 0
;	  1750	    then
;	  1751		return KILXKL (DB [D_TIM], .CCB);
;	  1752	
;	  1753	    DB [DF_KILLING_RECEIVES] = TRUE;
;	  1754	    DB [D_ASSIGNABLE_RECEIVE_COUNT] = 0;
;	  1755	
;	  1756	    if .DB [D_ASSIGNED_TRANSMIT_COUNT] neq 0
;	  1757	    then
;	  1758		begin
;	  1759		DB [DF_KILLING_TRANSMITS] = TRUE;
;	  1760		DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 0;
;	  1761		end;
;	  1762	
;	  1763	    CCB [C_STS] = CIRBK;
;	  1764	    GIVE_TO_KMC (.CCB);
;	  1765	    end;			!of routine KILKIL
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  69
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (29)


						.SBTTL	KILKIL
000000	005746 				KILKIL: TST	-(SP)				;					1715
000002	010446 					MOV	R4,-(SP)
000004	010566  000002 				MOV	R5,2(SP)
000010	010501 					MOV	R5,R1				;					1747
000012	012700  000024 				MOV	#24,R0				;					1749
000016	060500 					ADD	R5,R0
000020	010046 					MOV	R0,-(SP)
000022	105710 					TSTB	(R0)
000024	001003 					BNE	1$
000026	004767  000000V				JSR	PC,KILXKL			;					1751
000032	000432 					BR	3$
000034	052776  001000  000004 		1$:	BIS	#1000,@4(SP)			;					1753
000042	042776  177400  000000 			BIC	#177400,@0(SP)			;					1754
000050	012701  000022 				MOV	#22,R1				;					1756
000054	066601  000004 				ADD	4(SP),R1
000060	010100 					MOV	R1,R0
000062	105710 					TSTB	(R0)
000064	001405 					BEQ	2$
000066	052776  000400  000004 			BIS	#400,@4(SP)			;					1759
000074	105060  000001 				CLRB	1(R0)				;					1760
000100	016600  000002 			2$:	MOV	2(SP),R0			;					1763
000104	012760  000444' 000014 			MOV	#CIRBK,14(R0)
000112	010004 					MOV	R0,R4				;					1764
000114	004767  177100 				JSR	PC,GIVE.TO.KMC
000120	062706  000006 			3$:	ADD	#6,SP				;					1715
000124	000207 					RTS	PC

; Routine Size:  43 words,	Routine Base:  $CODE$ + 4512
; Maximum stack depth per invocation:  4 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  70
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (30)

;	  1766	routine KILXKL (DB, CCB) : MCB_DB_CCB novalue =
;	  1767	
;	  1768	!++
;	  1769	! FUNCTIONAL DESCRIPTION:
;	  1770	!
;	  1771	!
;	  1772	! FORMAL PARAMETERS:
;	  1773	!	CCB = address of kill CCB.
;	  1774	!
;	  1775	! IMPLICIT INPUTS:
;	  1776	!	None
;	  1777	!
;	  1778	! IMPLICIT OUTPUTS:
;	  1779	!	None
;	  1780	!
;	  1781	! ROUTINE VALUE:
;	  1782	! COMPLETION CODES:
;	  1783	!	None
;	  1784	!
;	  1785	! SIDE EFFECTS:
;	  1786	!	None
;	  1787	!--
;	  1788	
;	  1789	    begin
;	  1790	
;	  1791	    map
;	  1792		CCB : ref block field (C_FIELDS);
;	  1793	
;	  1794	    local
;	  1795		EDB : ref block field (E_FIELDS);
;	  1796	
;	  1797	    GET_DUP_DATA_BASE (DB);
;	  1798	    EDB = .DB [D_EXT_ADDR];
;	  1799	
;	  1800	    if .DB [D_ASSIGNED_TRANSMIT_COUNT] neq 0
;	  1801	    then
;	  1802		begin
;	  1803		DB [DF_KILLING_TRANSMITS] = TRUE;
;	  1804		DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 0;
;	  1805		CCB [C_STS] = CITBK;
;	  1806		GIVE_TO_KMC (.CCB);
;	  1807		end
;	  1808	    else
;	  1809		COMPLETE (DB [D_TIM], .CCB);
;	  1810	
;	  1811	    end;			!of routine KILXKL


						.SBTTL	KILXKL
000000	012700  000022 			KILXKL: MOV	#22,R0				;					1800
000004	060500 					ADD	R5,R0				; DB,*
000006	105710 					TSTB	(R0)
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  71
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (30)

000010	001412 					BEQ	1$
000012	052715  000400 				BIS	#400,(R5)			; *,DB					1803
000016	105060  000001 				CLRB	1(R0)				;					1804
000022	012764  000756' 000014 			MOV	#CITBK,14(R4)			; *,*(CCB)				1805
000030	004767  177036 				JSR	PC,GIVE.TO.KMC			;					1806
000034	000207 					RTS	PC				;					1800
000036	004767  175136 			1$:	JSR	PC,COMPLETE			;					1809
000042	000207 					RTS	PC				;					1766

; Routine Size:  18 words,	Routine Base:  $CODE$ + 4640
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  72
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (31)

;	  1812	global routine PARAMETER_DEVICE_REGISTERS
;	  1813	
;	  1814	!++
;	  1815	! FUNCTIONAL DESCRIPTION:
;	  1816	!
;	  1817	!
;	  1818	! FORMAL PARAMETERS:
;	  1819	       (REG : ref vector)
;	  1820	!
;	  1821	! IMPLICIT INPUTS:
;	  1822	!	None
;	  1823	!
;	  1824	! IMPLICIT OUTPUTS:
;	  1825	!	None
;	  1826	!
;	  1827	! ROUTINE VALUE:
;	  1828		: KDP_REG novalue =
;	  1829	!
;	  1830	! SIDE EFFECTS:
;	  1831	!	None
;	  1832	!--
;	  1833	
;	  1834	    begin
;	  1835	
;	  1836	    decr COUNT from 4 to 1 do
;	  1837		begin
;	  1838		PARAMETER_H_2 (0, REG [0]);
;	  1839		REG = REG [1];
;	  1840		end;
;	  1841	
;	  1842	    end;			!of routine PARAMETER_DEVICE_REGISTERS


						.GLOBL	$DPH2


						.SBTTL	PLL0
000000	010246 				PLL0::	MOV	R2,-(SP)			;					1812
000002	012702  000004 				MOV	#4,R2				; *,COUNT				1836
000006	005046 				1$:	CLR	-(SP)				;					1838
000010	011100 					MOV	(R1),R0				; REG,*
000012	004767  000000G				JSR	PC,$DPH2
000016	062701  000002 				ADD	#2,R1				; *,REG					1839
000022	005726 					TST	(SP)+				;					1837
000024	077210 					SOB	R2,1$				; COUNT,*				0000
000026	012602 					MOV	(SP)+,R2			;					1812
000030	000207 					RTS	PC

; Routine Size:  13 words,	Routine Base:  $CODE$ + 4704
; Maximum stack depth per invocation:  3 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  73
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (32)

;	  1843	routine POLLING_FAILURE : novalue =
;	  1844	
;	  1845	!++
;	  1846	! FUNCTIONAL DESCRIPTION:
;	  1847	!
;	  1848	!
;	  1849	! FORMAL PARAMETERS:
;	  1850	!	None
;	  1851	!
;	  1852	! IMPLICIT INPUTS:
;	  1853	!	None
;	  1854	!
;	  1855	! IMPLICIT OUTPUTS:
;	  1856	!	None
;	  1857	!
;	  1858	! ROUTINE VALUE:
;	  1859	! COMPLETION CODES:
;	  1860	!	None
;	  1861	!
;	  1862	! SIDE EFFECTS:
;	  1863	!	None
;	  1864	!--
;	  1865	
;	  1866	    begin
;	  1867	
;	  1868	    local
;	  1869		CCB : ref block field (C_FIELDS),
;	  1870		EDB : ref block field (E_FIELDS);
;	  1871	
;	  1872	    GET_DUP_DATA_BASE (DB);
;	  1873	    DB [D_POLLING_THRESHOLD] = .DB [D_POLLING_THRESHOLD] - 1;
;	  1874	
;	  1875	    if .DB [D_POLLING_THRESHOLD] neq 0 then return;
;	  1876	
;	  1877	    EDB = .DB [D_EXT_ADDR];
;	  1878	
;	  1879	    if .EDB [E_POLLING_RATE] eqlu HIPOL [.EDB [ES_XMT]]
;	  1880	    then
;	  1881	
;	  1882		if $MCB_GET_CCB (CCB)
;	  1883		then
;	  1884		    begin
;	  1885		    COUNTER_INCREMENT (DB, D_POLLING_ADJUSTMENT);
;	  1886		    COUNTER_INCREMENT (DB, D_PERFORMANCE_ERRORS);
;	  1887		    EDB [E_POLLING_RATE] = .EDB [E_POLLING_RATE] - 1;
;	  1888		    DB [D_POLLING_THRESHOLD] = POLLING_THRESHOLD;
;	  1889		    CCB [C_FNC] = FC_AST;
;	  1890		    CCB [C_STS] = CICTL;
;	  1891		    GIVE_TO_KMC (.CCB);
;	  1892		    end
;	  1893		else
;	  1894		    DB [D_POLLING_THRESHOLD] = .DB [D_POLLING_THRESHOLD] + 1;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  74
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (32)

;	  1895	
;	  1896	    end;			!of routine POLLING_FAILURE


						.GLOBL	$CCBGT


						.SBTTL	POLLING.FAILURE
000000	004167  000000G			POLLING.FAILURE:
						JSR	R1,$SAVE5			;					1843
000004	016700  000002G				MOV	.CRDAT+2,R0			;					1866
000010	012703  000026 				MOV	#26,R3				;					1873
000014	060003 					ADD	R0,R3
000016	105363  000001 				DECB	1(R3)
000022	001050 					BNE	2$				;					1875
000024	016001  000040 				MOV	40(R0),R1			; *,EDB					1877
000030	016104  000020 				MOV	20(R1),R4			; *(EDB),*				1879
000034	072427  177770 				ASH	#-10,R4
000040	042704  177760 				BIC	#177760,R4
000044	005005 					CLR	R5
000046	156405  000000'				BISB	HIPOL.STRING(R4),R5
000052	116102  000026 				MOVB	26(R1),R2			; *(EDB),*
000056	020205 					CMP	R2,R5
000060	001031 					BNE	2$
000062	004767  000000G				JSR	PC,$CCBGT			;					1882
000066	103424 					BCS	1$
000070	052760  001000  000034 			BIS	#1000,34(R0)			;					1885
000076	062700  000034 				ADD	#34,R0				;					1886
000102	004767  000000G				JSR	PC,$IC8
000106	105361  000026 				DECB	26(R1)				; *(EDB)				1887
000112	112763  000004  000001 			MOVB	#4,1(R3)			;					1888
000120	105064  000012 				CLRB	12(R4)				; *(CCB)				1889
000124	012764  000222' 000014 			MOV	#CICTL,14(R4)			; *,*(CCB)				1890
000132	004767  176636 				JSR	PC,GIVE.TO.KMC			;					1891
000136	000207 					RTS	PC				;					1882
000140	105263  000001 			1$:	INCB	1(R3)				;					1894
000144	000207 				2$:	RTS	PC				;					1843

; Routine Size:  51 words,	Routine Base:  $CODE$ + 4736
; Maximum stack depth per invocation:  7 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  75
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (33)

;	  1897	routine RECEIVE_CCB (DB, DESC; CCB) : KDP_LKG_DB_DESC_CCB =
;	  1898	
;	  1899	!++
;	  1900	! FUNCTIONAL DESCRIPTION:
;	  1901	!
;	  1902	!
;	  1903	! FORMAL PARAMETERS:
;	  1904	!	DESC = terminated descriptor.
;	  1905	!
;	  1906	! IMPLICIT INPUTS:
;	  1907	!	None
;	  1908	!
;	  1909	! IMPLICIT OUTPUTS:
;	  1910	!	None
;	  1911	!
;	  1912	! ROUTINE VALUE:
;	  1913	! COMPLETION CODES:
;	  1914	!	None
;	  1915	!
;	  1916	! SIDE EFFECTS:
;	  1917	!	None
;	  1918	!--
;	  1919	
;	  1920	    begin
;	  1921	
;	  1922	    map
;	  1923		CCB : ref block field (C_FIELDS),
;	  1924		DESC : ref block field (BD_FIELDS);
;	  1925	
;	  1926	    local
;	  1927		QUE;
;	  1928	
;	  1929	    GET_DUP_DATA_BASE (DB);
;	  1930	    QUE = block [.DB [D_EXT_ADDR], E_ASSIGNED_RECEIVE_CCBS];
;	  1931	
;	  1932	    if not $MCB_DEQUEUE_CCB (.QUE, CCB)
;	  1933	    then
;	  1934		begin
;	  1935		COUNTER_INCREMENT (DB, D_RECEIVE_BA_ERROR);
;	  1936		COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
;	  1937		DEVICE_BROKEN (DB [D_TIM]);
;	  1938		return FALSE;
;	  1939		end;
;	  1940	
;	  1941	    if .DESC neq 0
;	  1942	    then
;	  1943		if .CCB [C_STS] neq .DESC
;	  1944		then
;	  1945		    begin
;	  1946		    $MCB_STACK_CCB (.QUE, .CCB);
;	  1947		    COUNTER_INCREMENT (DB, D_RECEIVE_BA_ERROR);
;	  1948		    COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  76
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (33)

;	  1949		    DEVICE_BROKEN (DB [D_TIM]);
;	  1950		    return FALSE;
;	  1951		    end;
;	  1952	
;	  1953	    DB [D_ASSIGNED_RECEIVE_COUNT] = .DB [D_ASSIGNED_RECEIVE_COUNT] - 1;
;	  1954	
;	  1955	    if not .DB [DF_KILLING_RECEIVES]
;	  1956	    then
;	  1957		DB [D_ASSIGNABLE_RECEIVE_COUNT] = .DB [D_ASSIGNABLE_RECEIVE_COUNT] + 1;
;	  1958	
;	  1959	    CCB [C_CNT] = .DESC [BD_CC];
;	  1960	    TRUE
;	  1961	    end;			!of routine RECEIVE_CCB


						.GLOBL	$CMQIF


						.SBTTL	RECEIVE.CCB
000000	010346 				RECEIVE.CCB:
						MOV	R3,-(SP)			;					1897
000002	016503  000040 				MOV	40(R5),R3			; *(DB),QUE				1930
000006	062703  000010 				ADD	#10,R3				; *,QUE
000012	004767  000000G				JSR	PC,$CMQRM			;					1932
000016	103407 					BLO	1$				;					1935
000020	005701 					TST	R1				; DESC					1941
000022	001421 					BEQ	2$
000024	026401  000014 				CMP	14(R4),R1			; *(CCB),DESC				1943
000030	001416 					BEQ	2$
000032	004767  000000G				JSR	PC,$CMQIF			;					1946
000036	052765  000400  000032 		1$:	BIS	#400,32(R5)			; *,*(DB)				1947
000044	012700  000032 				MOV	#32,R0				;					1948
000050	060500 					ADD	R5,R0				; DB,*
000052	004767  000000G				JSR	PC,$IC8
000056	004767  176470 				JSR	PC,DEVICE.BROKEN		;					1949
000062	005000 					CLR	R0				;					1945
000064	000414 					BR	4$
000066	105365  000024 			2$:	DECB	24(R5)				; *(DB)					1953
000072	032715  001000 				BIT	#1000,(R5)			; *,DB					1955
000076	001002 					BNE	3$
000100	105265  000025 				INCB	25(R5)				; *(DB)					1957
000104	016164  000002  000022 		3$:	MOV	2(R1),22(R4)			; *(DESC),*(CCB)			1959
000112	012700  000001 				MOV	#1,R0				;					1897
000116	012603 				4$:	MOV	(SP)+,R3
000120	000207 					RTS	PC

; Routine Size:  41 words,	Routine Base:  $CODE$ + 5104
; Maximum stack depth per invocation:  2 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  77
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (34)

;	  1962	routine RECEIVE_DONE (DESC, STS) : LINKAGE_DESC_STS novalue =
;	  1963	
;	  1964	!++
;	  1965	! FUNCTIONAL DESCRIPTION:
;	  1966	!
;	  1967	!
;	  1968	! FORMAL PARAMETERS:
;	  1969	!	DESC = terminated descriptor.
;	  1970	!	STS = return status code for receive CCB.
;	  1971	!
;	  1972	! IMPLICIT INPUTS:
;	  1973	!	None
;	  1974	!
;	  1975	! IMPLICIT OUTPUTS:
;	  1976	!	None
;	  1977	!
;	  1978	! ROUTINE VALUE:
;	  1979	! COMPLETION CODES:
;	  1980	!	None
;	  1981	!
;	  1982	! SIDE EFFECTS:
;	  1983	!	None
;	  1984	!--
;	  1985	
;	  1986	    begin
;	  1987	
;	  1988	    map
;	  1989		DESC : ref block field (BD_FIELDS);
;	  1990	
;	  1991	    local
;	  1992		CCB : ref block field (C_FIELDS);
;	  1993	
;	  1994	    GET_DUP_DATA_BASE (DB);
;	  1995	
;	  1996	    if not RECEIVE_CCB (DB [D_TIM], .DESC; CCB) then return;
;	  1997	
;	  1998	    CCB [C_LIX] = .DB [D_LIX];
;	  1999	    CCB [C_FNC] = FC_RCE;
;	  2000	    CCB [C_MOD] = 0;
;	  2001	    DDRCP$ (.CCB, .STS);
;	  2002	    end;			!of routine RECEIVE_DONE


						.GLOBL	$DDRCP


						.SBTTL	RECEIVE.DONE
000000	004167  000000G			RECEIVE.DONE:
						JSR	R1,$SAVE5			;					1962
000004	016705  000002G				MOV	.CRDAT+2,R5			;					1986
000010	004767  177642 				JSR	PC,RECEIVE.CCB			;					1996
000014	006000 					ROR	R0
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  78
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (34)

000016	103012 					BHIS	1$
000020	116564  000020  000010 			MOVB	20(R5),10(R4)			; *,*(CCB)				1998
000026	112764  000004  000012 			MOVB	#4,12(R4)			; *,*(CCB)				1999
000034	105064  000013 				CLRB	13(R4)				; *(CCB)				2000
000040	004767  000000G				JSR	PC,$DDRCP			;					2001
000044	000207 				1$:	RTS	PC				;					1962

; Routine Size:  19 words,	Routine Base:  $CODE$ + 5226
; Maximum stack depth per invocation:  7 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  79
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (35)

;	  2003	routine RECEIVE_KILLED : novalue =
;	  2004	
;	  2005	!++
;	  2006	! FUNCTIONAL DESCRIPTION:
;	  2007	!
;	  2008	!
;	  2009	! FORMAL PARAMETERS:
;	  2010	!	None
;	  2011	!
;	  2012	! IMPLICIT INPUTS:
;	  2013	!	None
;	  2014	!
;	  2015	! IMPLICIT OUTPUTS:
;	  2016	!	None
;	  2017	!
;	  2018	! ROUTINE VALUE:
;	  2019	! COMPLETION CODES:
;	  2020	!	None
;	  2021	!
;	  2022	! SIDE EFFECTS:
;	  2023	!	None
;	  2024	!--
;	  2025	
;	  2026	    begin
;	  2027	    GET_DUP_DATA_BASE (DB);
;	  2028	    DB [DF_KILLING_RECEIVES] = FALSE;
;	  2029	    DB [DF_TRUNCATING_RECEIVE] = FALSE;
;	  2030	    DB [D_ASSIGNED_RECEIVE_COUNT] = 0;
;	  2031	
;	  2032	    if .DB [DF_ENABLED]
;	  2033	    then
;	  2034		DB [D_ASSIGNABLE_RECEIVE_COUNT] = 2;
;	  2035	
;	  2036	    while TRUE do
;	  2037		begin
;	  2038	
;	  2039		local
;	  2040		    CCB : ref block field (C_FIELDS);
;	  2041	
;	  2042		if not $MCB_DEQUEUE_CCB (block [.DB [D_EXT_ADDR], E_ASSIGNED_RECEIVE_CCBS], CCB) then exitloop;
;	  2043	
;	  2044		$MCB_RETURN_RDB (.CCB);
;	  2045		end;
;	  2046	
;	  2047	    GET_RECEIVE_BUFFERS ();
;	  2048	    begin
;	  2049	
;	  2050	    local
;	  2051		CCB : ref block field (C_FIELDS);
;	  2052	
;	  2053	    if $MCB_DEQUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], CCB)
;	  2054	    then
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  80
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (35)

;	  2055	
;	  2056		if .DB [DF_KILLING_TRANSMITS]
;	  2057		then
;	  2058		    begin
;	  2059		    CCB [C_STS] = CITBK;
;	  2060		    GIVE_TO_KMC (.CCB);
;	  2061		    end
;	  2062		else
;	  2063		    do
;	  2064			COMPLETE (DB [D_TIM], .CCB)
;	  2065		    while $MCB_DEQUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], CCB);
;	  2066	
;	  2067	    end;
;	  2068	    end;			!of routine RECEIVE_KILLED


						.SBTTL	RECEIVE.KILLED
000000	004167  000000G			RECEIVE.KILLED:
						JSR	R1,$SAVE5			;					2003
000004	005746 					TST	-(SP)
000006	016705  000002G				MOV	.CRDAT+2,R5			;					2026
000012	042715  101000 				BIC	#101000,(R5)			;					2029
000016	105065  000024 				CLRB	24(R5)				;					2030
000022	132765  000040  000002 			BITB	#40,2(R5)			;					2032
000030	001403 					BEQ	1$
000032	112765  000002  000025 			MOVB	#2,25(R5)			;					2034
000040	016503  000040 			1$:	MOV	40(R5),R3			;					2042
000044	062703  000010 				ADD	#10,R3
000050	004767  000000G				JSR	PC,$CMQRM
000054	103403 					BCS	2$
000056	004767  000000G				JSR	PC,$RDBRT			;					2044
000062	000766 					BR	1$				;					2036
000064	004767  176302 			2$:	JSR	PC,GET.RECEIVE.BUFFERS		;					2047
000070	010516 					MOV	R5,(SP)				;					2053
000072	062716  000010 				ADD	#10,(SP)
000076	011603 					MOV	(SP),R3
000100	004767  000000G				JSR	PC,$CMQRM
000104	103423 					BCS	4$
000106	010402 					MOV	R4,R2				; $MCB$R4,CCB
000110	032715  000400 				BIT	#400,(R5)			;					2056
000114	001406 					BEQ	3$
000116	012762  000756' 000014 			MOV	#CITBK,14(R2)			; *,*(CCB)				2059
000124	004767  176306 				JSR	PC,GIVE.TO.KMC			;					2060
000130	000411 					BR	4$				;					2056
000132	010204 				3$:	MOV	R2,R4				; CCB,*					2064
000134	004767  174404 				JSR	PC,COMPLETE
000140	011603 					MOV	(SP),R3				;					2065
000142	004767  000000G				JSR	PC,$CMQRM
000146	103402 					BCS	4$
000150	010402 					MOV	R4,R2				; $MCB$R4,CCB
000152	000767 					BR	3$
000154	005726 				4$:	TST	(SP)+				;					2003
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  81
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (35)

000156	000207 					RTS	PC

; Routine Size:  56 words,	Routine Base:  $CODE$ + 5274
; Maximum stack depth per invocation:  8 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  82
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (36)

;	  2069	routine SET_DESCRIPTOR (CCB, DESC) : LINKAGE_CCB_DESC =
;	  2070	
;	  2071	!++
;	  2072	! FUNCTIONAL DESCRIPTION:
;	  2073	!
;	  2074	!
;	  2075	! FORMAL PARAMETERS:
;	  2076	!	CCB = address of CCB chain.
;	  2077	!	DESC = address of buffer descriptor list.
;	  2078	!
;	  2079	! IMPLICIT INPUTS:
;	  2080	!	None
;	  2081	!
;	  2082	! IMPLICIT OUTPUTS:
;	  2083	!	None
;	  2084	!
;	  2085	! ROUTINE VALUE:
;	  2086	!	Address of last buffer descriptor used.
;	  2087	!
;	  2088	! SIDE EFFECTS:
;	  2089	!	None
;	  2090	!--
;	  2091	
;	  2092	    begin
;	  2093	
;	  2094	    local
;	  2095		NEXT_CCB : ref block field (C_FIELDS),
;	  2096		NEXT_DESC : ref block field (BD_FIELDS);
;	  2097	
;	  2098	    NEXT_CCB = .CCB;
;	  2099	    NEXT_DESC = .DESC;
;	  2100	
;	  2101	    do
;	  2102		begin
;	  2103	
;	  2104		local
;	  2105		    HIGH;
;	  2106	
;	P 2107		$MCB_CONVERT_TO_UBA_ADDRESS ((.NEXT_CCB [C_BIAS], .NEXT_CCB [C_ADDR]),
;	  2108		    NEXT_DESC [BD_LOW], HIGH);
;	  2109		NEXT_DESC [BD_CC] = .NEXT_CCB [C_CNT];
;	  2110		NEXT_DESC [%fieldexpand (BD_HIGH, 0), 0, %bpval, 0] = .HIGH^%fieldexpand (BD_HIGH, 1);
;	  2111		NEXT_DESC = NEXT_DESC [BD_LEN, 0, %bpval, 1];
;	  2112		end
;	  2113	    while (NEXT_CCB = .NEXT_CCB [C_CHN]) neq 0;
;	  2114	
;	  2115	    NEXT_DESC = NEXT_DESC [-BD_LEN, 0, %bpval, 1];
;	  2116	    NEXT_DESC [BD_LBD] = 1;
;	  2117	    .NEXT_DESC
;	  2118	    end;			!of routine SET_DESCRIPTOR
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  83
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (36)

						.SBTTL	SET.DESCRIPTOR
000000	004167  000000G			SET.DESCRIPTOR:
						JSR	R1,$SAVE4			;					2069
000004	010100 					MOV	R1,R0				; DESC,NEXT.DESC			2099
000006	016402  000016 			1$:	MOV	16(R4),R2			; *(NEXT.CCB),*				2108
000012	016403  000020 				MOV	20(R4),R3			; *(NEXT.CCB),*
000016	004767  000000G				JSR	PC,$PHY18
000022	010320 					MOV	R3,(R0)+			; *,NEXT.DESC
000024	016420  000022 				MOV	22(R4),(R0)+			; *(NEXT.CCB),NEXT.DESC			2109
000030	010201 					MOV	R2,R1				; HIGH,*				2110
000032	072127  000012 				ASH	#12,R1
000036	010120 					MOV	R1,(R0)+			; *,NEXT.DESC
000040	016404  000002 				MOV	2(R4),R4			; *(NEXT.CCB),NEXT.CCB			2113
000044	001360 					BNE	1$
000046	162700  000006 				SUB	#6,R0				; *,NEXT.DESC				2115
000052	052760  100000  000004 			BIS	#100000,4(R0)			; *,*(NEXT.DESC)			2116
000060	000207 					RTS	PC				;					2069

; Routine Size:  25 words,	Routine Base:  $CODE$ + 5454
; Maximum stack depth per invocation:  6 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  84
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (37)

;	  2119	routine TIMLTM (DB) : MCB_DB novalue =
;	  2120	
;	  2121	!++
;	  2122	! FUNCTIONAL DESCRIPTION:
;	  2123	!
;	  2124	!
;	  2125	! FORMAL PARAMETERS:
;	  2126	!	None
;	  2127	!
;	  2128	! IMPLICIT INPUTS:
;	  2129	!	None
;	  2130	!
;	  2131	! IMPLICIT OUTPUTS:
;	  2132	!	None
;	  2133	!
;	  2134	! ROUTINE VALUE:
;	  2135	! COMPLETION CODES:
;	  2136	!	None
;	  2137	!
;	  2138	! SIDE EFFECTS:
;	  2139	!	None
;	  2140	!--
;	  2141	
;	  2142	    begin
;	  2143	
;	  2144	    local
;	  2145		EDB : ref block field (E_FIELDS);
;	  2146	
;	  2147	    GET_DUP_DATA_BASE (DB);
;	  2148	    EDB = .DB [D_EXT_ADDR];
;	  2149	
;	  2150	    if .EDB [$SUB_FIELD (E_ASSIGNED_TRANSMIT_CCBS, LIST_FIRST)] neq 0 and
;	  2151		not .DB [DF_KILLING_TRANSMITS]
;	  2152	    then
;	  2153		begin
;	  2154	
;	  2155		local
;	  2156		    CCB : ref block field (C_FIELDS);
;	  2157	
;	  2158		if not $MCB_GET_CCB (CCB) then return DB [D_TIM] = .DB [D_TIM] + 1;
;	  2159	
;	  2160		CCB [C_FNC] = FC_AST;
;	  2161		KILXKL (DB [D_TIM], .CCB);
;	  2162		end;
;	  2163	
;	  2164	    end;			!of routine TIMLTM


						.SBTTL	TIMLTM
000000	016500  000040 			TIMLTM: MOV	40(R5),R0			; *(DB),EDB				2148
000004	005760  000004 				TST	4(R0)				; *(EDB)				2150
000010	001414 					BEQ	2$
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  85
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (37)

000012	032715  000400 				BIT	#400,(R5)			; *,DB					2151
000016	001011 					BNE	2$
000020	004767  000000G				JSR	PC,$CCBGT			;					2158
000024	103002 					BHIS	1$
000026	105215 					INCB	(R5)				; DB
000030	000207 					RTS	PC
000032	105064  000012 			1$:	CLRB	12(R4)				; *(CCB)				2160
000036	004767  177040 				JSR	PC,KILXKL			;					2161
000042	000207 				2$:	RTS	PC				;					2119

; Routine Size:  18 words,	Routine Base:  $CODE$ + 5536
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  86
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (38)

;	  2165	routine TIMPIN (DB) : MCB_DB novalue =
;	  2166	
;	  2167	!++
;	  2168	! FUNCTIONAL DESCRIPTION:
;	  2169	!
;	  2170	!
;	  2171	! FORMAL PARAMETERS:
;	  2172	!	None
;	  2173	!
;	  2174	! IMPLICIT INPUTS:
;	  2175	!	None
;	  2176	!
;	  2177	! IMPLICIT OUTPUTS:
;	  2178	!	None
;	  2179	!
;	  2180	! ROUTINE VALUE:
;	  2181	! COMPLETION CODES:
;	  2182	!	None
;	  2183	!
;	  2184	! SIDE EFFECTS:
;	  2185	!	None
;	  2186	!--
;	  2187	
;	  2188	    begin
;	  2189	
;	  2190	    local
;	  2191		DESC : ref vector,
;	  2192		EDB : ref block field (E_FIELDS);
;	  2193	
;	  2194	    GET_DUP_DATA_BASE (DB);
;	  2195	    MAP$ (DB_BIAS = .DB [D_EXT_BIAS]);
;	  2196	    EDB = .DB [D_EXT_ADDR];
;	  2197	    DB [DF_HALF_DUPLEX] = .EDB [EF_HDX];
;	  2198	    DESC = EDB [E_DESCRIPTORS];
;	  2199	
;	  2200	    decr CNT from 2 to 1 do
;	  2201		INITIALIZE_DESCRIPTOR_LIST (EDB [E_NEXT_TRANSMIT_DESCRIPTOR], DESC, .DB [D_MAXIMUM_TRANSMIT_SEGMENTS]);
;	  2202	
;	  2203	    decr CNT from 2 to 1 do
;	  2204		INITIALIZE_DESCRIPTOR_LIST (EDB [E_NEXT_RECEIVE_DESCRIPTOR], DESC, 1);
;	  2205	
;	  2206	    if .DB [D_UNIT] eql 0
;	  2207	    then
;	  2208		begin
;	  2209	
;	  2210		local
;	  2211		    KMC_PIX;
;	  2212	
;	  2213		if $MCB_SET_PROCESS (, KMC_PIX)
;	  2214		then
;	  2215		    begin
;	  2216		    DB [D_KMC_PIX] = .KMC_PIX;
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  87
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (38)

;	  2217		    CALL$P (KMCDB, .KMC_PIX, .DB_BIAS, vector [DB [D_TIM], -K_LEN]);
;	  2218		    end;
;	  2219	
;	  2220		end
;	  2221	    else
;	  2222		begin
;	  2223	
;	  2224		bind
;	  2225		    DB0 = vector [DB [D_TIM], .DB [D_UNIT]*-D_LEN] : block field (D_FIELDS);
;	  2226	
;	  2227		DB [D_KMC_PIX] = .DB0 [D_KMC_PIX];
;	  2228		end;
;	  2229	
;	  2230	    KDPNMI ();
;	  2231	    end;			!of routine TIMPIN


						.GLOBL	P.DTST, $CALLI, KMCDB


						.SBTTL	TIMPIN
000000	024646 				TIMPIN: CMP	-(SP),-(SP)			;					2165
000002	010546 					MOV	R5,-(SP)
000004	010500 					MOV	R5,R0				;					2195
000006	016005  000036 				MOV	36(R0),R5
000012	010567  000000G				MOV	R5,.CRDAT
000016	010567  000000G				MOV	R5,KISAR6
000022	011600 					MOV	(SP),R0				;					2196
000024	016002  000040 				MOV	40(R0),R2			; *,EDB
000030	116200  000020 				MOVB	20(R2),R0			; *(EDB),*				2197
000034	011601 					MOV	(SP),R1
000036	142761  000004  000002 			BICB	#4,2(R1)
000044	006000 					ROR	R0
000046	103003 					BCC	1$
000050	152761  000004  000002 			BISB	#4,2(R1)
000056	010266  000004 			1$:	MOV	R2,4(SP)			; EDB,DESC				2198
000062	062766  000030  000004 			ADD	#30,4(SP)			; *,DESC
000070	012701  000002 				MOV	#2,R1				; *,CNT					2200
000074	012703  000004 			2$:	MOV	#4,R3				;					2201
000100	060603 					ADD	SP,R3				; DESC,*
000102	011600 					MOV	(SP),R0
000104	116004  000030 				MOVB	30(R0),R4
000110	004767  176252 				JSR	PC,INITIALIZE.DESCRIPTOR.LIST
000114	077111 					SOB	R1,2$				; CNT,*					0000
000116	062702  000002 				ADD	#2,R2				; *,EDB					2204
000122	012701  000002 				MOV	#2,R1				; *,CNT					2203
000126	012703  000004 			3$:	MOV	#4,R3				;					2204
000132	060603 					ADD	SP,R3				; DESC,*
000134	012704  000001 				MOV	#1,R4
000140	004767  176222 				JSR	PC,INITIALIZE.DESCRIPTOR.LIST
000144	077110 					SOB	R1,3$				; CNT,*					0000
000146	011600 					MOV	(SP),R0				;					2206
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  88
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (38)

000150	116001  000016 				MOVB	16(R0),R1
000154	001045 					BNE	4$
000156	012746  000004 				MOV	#4,-(SP)			;					2213
000162	060616 					ADD	SP,(SP)				; $MCB$MY.INDEX,*
000164	012746  000001 				MOV	#1,-(SP)
000170	012746  000000G				MOV	#P.DTST,-(SP)
000174	004767  000000G				JSR	PC,$CALLI
000200	062706  000006 				ADD	#6,SP
000204	032700  000001 				BIT	#1,R0				; *,$MCB$STATUS
000210	001437 					BEQ	5$
000212	016601  000002 				MOV	2(SP),R1			; $MCB$MY.INDEX,KMC.PIX
000216	032700  000001 				BIT	#1,R0				; *,$MCB$STATUS
000222	001432 					BEQ	5$
000224	011600 					MOV	(SP),R0				;					2216
000226	110160  000015 				MOVB	R1,15(R0)			; KMC.PIX,*
000232	010046 					MOV	R0,-(SP)			;					2217
000234	162716  000034 				SUB	#34,(SP)
000240	016746  000000G				MOV	.CRDAT,-(SP)
000244	012746  000002 				MOV	#2,-(SP)
000250	012746  000000G				MOV	#KMCDB,-(SP)
000254	010146 					MOV	R1,-(SP)			; KMC.PIX,*
000256	004767  000000G				JSR	PC,$CALLP
000262	062706  000012 				ADD	#12,SP				;					2215
000266	000410 					BR	5$				;					2206
000270	070127  177757 			4$:	MUL	#-21,R1				;					2225
000274	006301 					ASL	R1
000276	061601 					ADD	(SP),R1
000300	011600 					MOV	(SP),R0				;					2227
000302	116160  000015  000015 			MOVB	15(R1),15(R0)
000310	004767  000000G			5$:	JSR	PC,KDPNMI			;					2230
000314	062706  000006 				ADD	#6,SP				;					2165
000320	000207 					RTS	PC

; Routine Size:  105 words,	Routine Base:  $CODE$ + 5602
; Maximum stack depth per invocation:  9 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  89
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (39)

;	  2232	routine TIMPWF (DB) : MCB_DB novalue =
;	  2233	
;	  2234	!++
;	  2235	! FUNCTIONAL DESCRIPTION:
;	  2236	!
;	  2237	!
;	  2238	! FORMAL PARAMETERS:
;	  2239	!
;	  2240	! IMPLICIT INPUTS:
;	  2241	!	None
;	  2242	!
;	  2243	! IMPLICIT OUTPUTS:
;	  2244	!	None
;	  2245	!
;	  2246	! ROUTINE VALUE:
;	  2247	! COMPLETION CODES:
;	  2248	!	None
;	  2249	!
;	  2250	! SIDE EFFECTS:
;	  2251	!	None
;	  2252	!--
;	  2253	
;	  2254	    begin
;	  2255	    NO_OPERATION
;	  2256	    end;			!of routine TIMPWF


						.SBTTL	TIMPWF
000000	000207 				TIMPWF: RTS	PC				;					2232

; Routine Size:  1 word,	Routine Base:  $CODE$ + 6124
; Maximum stack depth per invocation:  0 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  90
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (40)

;	  2257	routine TIMRDB (DB, CCB) : MCB_DB_CCB novalue =
;	  2258	
;	  2259	!++
;	  2260	! FUNCTIONAL DESCRIPTION:
;	  2261	!
;	  2262	!
;	  2263	! FORMAL PARAMETERS:
;	  2264	!	CCB = available RDB.
;	  2265	!
;	  2266	! IMPLICIT INPUTS:
;	  2267	!	None
;	  2268	!
;	  2269	! IMPLICIT OUTPUTS:
;	  2270	!	None
;	  2271	!
;	  2272	! ROUTINE VALUE:
;	  2273	! COMPLETION CODES:
;	  2274	!	None
;	  2275	!
;	  2276	! SIDE EFFECTS:
;	  2277	!	None
;	  2278	!--
;	  2279	
;	  2280	    begin
;	  2281	
;	  2282	    map
;	  2283		CCB : ref block field (C_FIELDS);
;	  2284	
;	  2285	    GET_DUP_DATA_BASE (DB);
;	  2286	
;	  2287	    if .DB [D_ASSIGNABLE_RECEIVE_COUNT] neq 0
;	  2288	    then
;	  2289		ASSIGN_RECEIVE_BUFFER (.CCB)
;	  2290	    else
;	  2291		$MCB_RETURN_RDB (.CCB);
;	  2292	
;	  2293	    end;			!of routine TIMRDB


						.SBTTL	TIMRDB
000000	105765  000025 			TIMRDB: TSTB	25(R5)				; *(DB)					2287
000004	001403 					BEQ	1$
000006	004767  171640 				JSR	PC,ASSIGN.RECEIVE.BUFFER	;					2289
000012	000207 					RTS	PC				;					2287
000014	004767  000000G			1$:	JSR	PC,$RDBRT			;					2291
000020	000207 					RTS	PC				;					2257

; Routine Size:  9 words,	Routine Base:  $CODE$ + 6126
; Maximum stack depth per invocation:  1 word
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  91
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (41)

;	  2294	routine TRANSMIT_DONE (DESC, STS) : LINKAGE_DESC_STS novalue =
;	  2295	
;	  2296	!++
;	  2297	! FUNCTIONAL DESCRIPTION:
;	  2298	!
;	  2299	!
;	  2300	! FORMAL PARAMETERS:
;	  2301	!	DESC = terminated descriptor address.
;	  2302	!	STS = completion status.
;	  2303	!
;	  2304	! IMPLICIT INPUTS:
;	  2305	!	None
;	  2306	!
;	  2307	! IMPLICIT OUTPUTS:
;	  2308	!	None
;	  2309	!
;	  2310	! ROUTINE VALUE:
;	  2311	! COMPLETION CODES:
;	  2312	!	None
;	  2313	!
;	  2314	! SIDE EFFECTS:
;	  2315	!	None
;	  2316	!--
;	  2317	
;	  2318	    begin
;	  2319	
;	  2320	    map
;	  2321		DESC : ref block field (BD_FIELDS);
;	  2322	
;	  2323	    local
;	  2324		CCB : ref block field (C_FIELDS),
;	  2325		QUE;
;	  2326	
;	  2327	    GET_DUP_DATA_BASE (DB);
;	  2328	    QUE = block [.DB [D_EXT_ADDR], E_ASSIGNED_TRANSMIT_CCBS];
;	  2329	
;	  2330	    if not $MCB_DEQUEUE_CCB (.QUE, CCB)
;	  2331	    then
;	  2332		begin
;	  2333		COUNTER_INCREMENT (DB, D_TRANSMIT_BA_ERROR);
;	  2334		COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
;	  2335		DEVICE_BROKEN (DB [D_TIM]);
;	  2336		return;
;	  2337		end;
;	  2338	
;	  2339	    if .CCB [C_STS] neq .DESC
;	  2340	    then
;	  2341		begin
;	  2342		$MCB_STACK_CCB (.QUE, .CCB);
;	  2343		COUNTER_INCREMENT (DB, D_TRANSMIT_BA_ERROR);
;	  2344		COUNTER_INCREMENT (DB, D_DEVICE_ERRORS);
;	  2345		DEVICE_BROKEN (DB [D_TIM]);
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  92
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (41)

;	  2346		return;
;	  2347		end;
;	  2348	
;	  2349	    DB [D_TIM] = 0;
;	  2350	    DB [D_ASSIGNED_TRANSMIT_COUNT] = .DB [D_ASSIGNED_TRANSMIT_COUNT] - 1;
;	  2351	
;	  2352	    if not .DB [DF_KILLING_TRANSMITS]
;	  2353	    then
;	  2354		DB [D_ASSIGNABLE_TRANSMIT_COUNT] = .DB [D_ASSIGNABLE_TRANSMIT_COUNT] + 1;
;	  2355	
;	  2356	    CCB [C_LIX] = .DB [D_LIX];
;	  2357	    DDXCP$ (.CCB, .STS);
;	  2358	    ASSIGN_TRANSMIT_BUFFER ();
;	  2359	    end;			!of routine TRANSMIT_DONE


						.SBTTL	TRANSMIT.DONE
000000	004167  000000G			TRANSMIT.DONE:
						JSR	R1,$SAVE5			;					2294
000004	010302 					MOV	R3,R2				; *,STS
000006	016705  000002G				MOV	.CRDAT+2,R5			;					2318
000012	016503  000040 				MOV	40(R5),R3			; *,QUE					2328
000016	062703  000004 				ADD	#4,R3				; *,QUE
000022	004767  000000G				JSR	PC,$CMQRM			;					2330
000026	103405 					BLO	1$				;					2333
000030	026401  000014 				CMP	14(R4),R1			; *(CCB),DESC				2339
000034	001415 					BEQ	2$
000036	004767  000000G				JSR	PC,$CMQIF			;					2342
000042	052765  001000  000032 		1$:	BIS	#1000,32(R5)			;					2343
000050	012700  000032 				MOV	#32,R0				;					2344
000054	060500 					ADD	R5,R0
000056	004767  000000G				JSR	PC,$IC8
000062	004767  175420 				JSR	PC,DEVICE.BROKEN		;					2345
000066	000207 					RTS	PC				;					2341
000070	105015 				2$:	CLRB	(R5)				;					2349
000072	105365  000022 				DECB	22(R5)				;					2350
000076	032715  000400 				BIT	#400,(R5)			;					2352
000102	001002 					BNE	3$
000104	105265  000023 				INCB	23(R5)				;					2354
000110	116564  000020  000010 		3$:	MOVB	20(R5),10(R4)			; *,*(CCB)				2356
000116	010203 					MOV	R2,R3				; STS,*					2357
000120	004767  000000G				JSR	PC,$DDXCP
000124	004767  171542 				JSR	PC,ASSIGN.TRANSMIT.BUFFER	;					2358
000130	000207 					RTS	PC				;					2294

; Routine Size:  45 words,	Routine Base:  $CODE$ + 6150
; Maximum stack depth per invocation:  7 words
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  93
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (42)

;	  2360	routine TRANSMIT_KILLED : novalue =
;	  2361	
;	  2362	!++
;	  2363	! FUNCTIONAL DESCRIPTION:
;	  2364	!
;	  2365	!
;	  2366	! FORMAL PARAMETERS:
;	  2367	!	None
;	  2368	!
;	  2369	! IMPLICIT INPUTS:
;	  2370	!	None
;	  2371	!
;	  2372	! IMPLICIT OUTPUTS:
;	  2373	!	None
;	  2374	!
;	  2375	! ROUTINE VALUE:
;	  2376	! COMPLETION CODES:
;	  2377	!	None
;	  2378	!
;	  2379	! SIDE EFFECTS:
;	  2380	!	None
;	  2381	!--
;	  2382	
;	  2383	    begin
;	  2384	    GET_DUP_DATA_BASE (DB);
;	  2385	    DB [DF_KILLING_TRANSMITS] = FALSE;
;	  2386	    DB [DF_TRANSMIT_UNDERRUN] = FALSE;
;	  2387	    DB [D_ASSIGNED_TRANSMIT_COUNT] = 0;
;	  2388	
;	  2389	    if .DB [DF_ENABLED]
;	  2390	    then
;	  2391		DB [D_ASSIGNABLE_TRANSMIT_COUNT] = 2;
;	  2392	
;	  2393	    while TRUE do
;	  2394		begin
;	  2395	
;	  2396		local
;	  2397		    CCB : ref block field (C_FIELDS);
;	  2398	
;	  2399		if not $MCB_DEQUEUE_CCB (block [.DB [D_EXT_ADDR], E_ASSIGNED_TRANSMIT_CCBS], CCB)
;	  2400		then
;	  2401	
;	  2402		    if not $MCB_DEQUEUE_CCB (DB [D_ASSIGNABLE_TRANSMIT_CCBS], CCB)
;	  2403		    then
;	  2404			exitloop;
;	  2405	
;	  2406		CCB [C_LIX] = .DB [D_LIX];
;	  2407		DDXCP$ (.CCB, CE_ABO);
;	  2408		end;
;	  2409	
;	  2410	    while TRUE do
;	  2411		begin
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  94
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (42)

;	  2412	
;	  2413		local
;	  2414		    CCB : ref block field (C_FIELDS);
;	  2415	
;	  2416		if not $MCB_DEQUEUE_CCB (DB [D_PENDING_CONTROL_CCBS], CCB) then exitloop;
;	  2417	
;	  2418		COMPLETE (DB [D_TIM], .CCB);
;	  2419		end;
;	  2420	
;	  2421	    end;			!of routine TRANSMIT_KILLED


						.SBTTL	TRANSMIT.KILLED
000000	004167  000000G			TRANSMIT.KILLED:
						JSR	R1,$SAVE5			;					2360
000004	016705  000002G				MOV	.CRDAT+2,R5			;					2383
000010	042715  004400 				BIC	#4400,(R5)			;					2386
000014	105065  000022 				CLRB	22(R5)				;					2387
000020	132765  000040  000002 			BITB	#40,2(R5)			;					2389
000026	001403 					BEQ	1$
000030	112765  000002  000023 			MOVB	#2,23(R5)			;					2391
000036	016503  000040 			1$:	MOV	40(R5),R3			;					2399
000042	062703  000004 				ADD	#4,R3
000046	004767  000000G				JSR	PC,$CMQRM
000052	103006 					BHIS	2$
000054	010503 					MOV	R5,R3				;					2402
000056	062703  000004 				ADD	#4,R3
000062	004767  000000G				JSR	PC,$CMQRM
000066	103411 					BCS	3$
000070	010400 				2$:	MOV	R4,R0				; $MCB$R4,CCB
000072	116560  000020  000010 			MOVB	20(R5),10(R0)			; *,*(CCB)				2406
000100	012703  177770 				MOV	#-10,R3				;					2407
000104	004767  000000G				JSR	PC,$DDXCP
000110	000752 					BR	1$				;					2393
000112	010503 				3$:	MOV	R5,R3				;					2416
000114	062703  000010 				ADD	#10,R3
000120	004767  000000G				JSR	PC,$CMQRM
000124	103403 					BCS	4$
000126	004767  173404 				JSR	PC,COMPLETE			;					2418
000132	000767 					BR	3$				;					2410
000134	000207 				4$:	RTS	PC				;					2360

; Routine Size:  47 words,	Routine Base:  $CODE$ + 6302
; Maximum stack depth per invocation:  7 words


;	  2422	end
;	  2423	eludom



;					OTS external references
KDP								25-Jan-1983 09:52:52	TOPS-20 Bliss-16 3(552)		    Page  95
X04230								30-Dec-1982 03:13:18	NETPKG:<DRIVERS>KDP.B16.8 (42)

						.GLOBL	$SAVE5, $SAVE4, $SAVE3, $STOP


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 $PLIT$				   59	    RO ,  D  ,  LCL,  REL,  CON
;	 ......				   16	    RW ,  D  ,  LCL,  REL,  CON
;	 $CODE$				 1680	    RO ,  I  ,  LCL,  REL,  CON




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  NETPKG:<V3P0>MCBLIB.L16.7		       372       104        27         0
;  NETPKG:<BLIS16>XPORT.L16.1		       568         2         0         0
;  NETPKG:<MCB>NMXLIB.L16.13		       200        11         5         0
;  NETPKG:<DRIVERS>KDPDAT.L16.3		       227       116        51         0





;	  2424	
; Size:		1680 code + 75 data words
; Run Time:	   00:32.7
; Elapsed Time:	   01:52.6
; Memory Used:	51 pages
; Compilation Complete
ADDR				 170	 172	 173
ASSIGN_RECEIVE_BUFFER		 119	 265*	1351	2289
ASSIGN_TRANSMIT_BUFFER		 120	 300*	 600	1660	2358
BAS				 386
BA_EOM				 935
BA_HIGH				 755	 760	 804	 821	 943	 966	1028
BA_KIL				 525	 641
BA_LOW				 755	 760	 804	 821	 943	 966	1028
BDADR				 166#	 755	 760	 804	 821	 943	 966	1028
BD_CC				1959	2109
BD_EOM				 580	 589
BD_FIELDS			 802	1022	1924	1989	2096	2321
BD_HIGH				2110
BD_LBD				 586	 807	1030	2116
BD_LEN				1501	2111	2115
BD_LOW				2108
BD_SOM				 579	 590
BD_SYN				 597
BIAS				1486	1488	1489#
BIT_MASK			 525	 641	1425
BLISS16				   3
CALL$P				1082	1199	1252	1393	2217
CALL$				 121	 122	 123	 124	 125	 126	 127	 128	 130	 131	 343#	 388#
				 438#	 488#	 533#	 604#	 649#	 697#	 893#	 985#
CCB				 265	 291	 296#	 297#	 298	 326	 333	 338#	 339	 343	 370	 384
				 388	 415	 433	 438	 465	 482#	 484	 488	 515	 526	 533	 560
				 577#	 578	 580	 595	 604	 631	 642	 746	 748	 750	 845	 872
				 876	 879	 882#	 883	 887#	 888	 949	 951	 953	 971	 975	 977
				1021	1050	1077	1082	1083#	1084#	1085#	1086	1088	1115	1117	1118
				1119	1120	1122	1148	1155	1164#	1165	1172	1184#	1185	1193#	1194
				1203#	1204	1206	1232	1236	1248	1250	1254	1256	1264#	1265	1274#
				1275	1284#	1285	1345	1347	1350#	1351	1362	1388	1391#	1392#	1393
				1503	1538	1541	1572	1609	1636	1647	1658#	1664#	1665	1669	1695
				1708#	1709	1712	1715	1741	1751	1763#	1764	1766	1792	1805#	1806
				1809	1869	1882	1889#	1890#	1891	1897	1923	1932	1943	1946	1959#
				1992	1996	1998#	1999#	2000#	2001	2040	2042	2044	2051	2053	2059#
				2060	2064	2065	2069	2098	2156	2158	2160#	2161	2257	2283	2289
				2291	2324	2330	2339	2342	2356#	2357	2397	2399	2402	2406#	2407
				2414	2416	2418
CE_ABO				1248	1250	1254	1665	2407
CE_DCR				 760
CE_HFE				 755
CE_MTL				 943
CE_ROV				 821
CE_UDR				 807	1045
CIBAS				 121	 343*	1264
CICTL				 122	 388*	1164	1274	1890
CIRBA				 123	 297	 438*
CIRBK				 124	 488*	1184	1708	1763
CITBA				 125	 338	 533*
CITBK				 126	 604*	1193	1805	2059
CNT				2200	2203
COBAD				 127	 649*
COCTL				 128	 697*
COMPLETE			 129	 384	 433	 845*	1712	1809	2064	2418
CORBA				 130	 893*
COTBA				 131	 985*
COUNTER_INCREMENT		 765	 766	 790	 791	 836	 837	1885	1886	1935	1936	1947	1948
				2333	2334	2343	2344
COUNT				1450	1501	1836
CS_SUC				 888	 966	1040	1086	1120	1155	1204	1236	1285
CTL				 436
CTLGET				 132	1050*	1537
CTLSET				 133	1088*	1536
CTLSTP				 134	1122*	1535
CTLSTR				 135	1206*	1534
CT_DEC				 582	1429
CT_DUP				1433
CT_ENB				 432	1425
CT_MNT				1441	1443
C_ADDR				2107
C_BIAS				2107
C_CHN				1658	2113
C_CNT				 296	1959	2109
C_FIELDS			 291	 326	 370	 415	 465	 515	 560	 631	 746	 872	 949	 971
				1021	1077	1115	1148	1232	1345	1388	1636	1695	1741	1792	1869
				1923	1992	2040	2051	2095	2156	2283	2324	2397	2414
C_FNC				 876	1350	1889	1999	2160
C_LIX				 887	1203	1256	1284	1391	1664	1998	2356	2406
C_MOD				 595	2000
C_PIX				 882	1392
C_PRM2				1083	1117
C_PRM3				1118
C_PRM4				1119
C_PRM5				1084	1085
C_STS				 297	 338	 482	 577	 580	1164	1184	1193	1264	1274	1708	1763
				1805	1890	1943	2059	2339
DB				 293	 294#	 295#	 328	 330	 333	 336#	 337#	 377	 380	 383#	 384
				 427	 429	 432#	 433	 473	 476	 521	 526	 528	 568	 571	 599#
				 637	 642	 644	 683	 686	 688#	 689#	 690#	 691#	 735	 738#	 748
				 765	 766	 777	 782#	 783	 790	 791	 792	 799	 805#	 818	 836
				 837	 838	 845	 874	 887	 931	 939	 942#	 951	 960	 962#	 964
				 973#	 975	1025	1032	1036	1038#	1044#	1050	1074	1080	1082	1088
				1112	1117#	1118#	1119#	1122	1153	1155	1157#	1158	1160	1169	1172
				1176#	1177#	1180	1183#	1189	1192#	1199	1200#	1201#	1202#	1203	1206
				1234	1236	1239	1246	1252	1256#	1258#	1261	1269	1273#	1279#	1280#
				1282#	1283#	1284	1287	1311	1312#	1313#	1339	1341	1390	1391	1393
				1423	1424	1431	1435	1439	1448#	1481	1488	1503	1538	1541	1572
				1575	1606	1609	1638	1640	1647	1648	1655	1664	1669	1700	1701
				1703	1706#	1707#	1712	1715	1746	1747	1749	1751	1753#	1754#	1756
				1759#	1760#	1766	1797	1798	1800	1803#	1804#	1809	1872	1873#	1875
				1877	1885	1886	1888#	1894#	1897	1929	1930	1935	1936	1937	1947
				1948	1949	1953#	1955	1957#	1994	1996	1998	2027	2028#	2029#	2030#
				2032	2034#	2042	2053	2056	2064	2065	2119	2147	2148	2151	2158#
				2161	2165	2194	2195	2196	2197#	2201	2206	2216#	2217	2225	2227#
				2232	2257	2285	2287	2327	2328	2333	2334	2335	2343	2344	2345
				2349#	2350#	2352	2354#	2356	2384	2385#	2386#	2387#	2389	2391#	2399
				2402	2406	2416	2418
DB0				2225#	2227
DB_BIAS				 257#	 379	 428	 475	 523	 570	 639	 681	 737	 933	1027	2195#
				2217
DDCCP$				1086	1120	1155	1204	1236	1248	1250	1254	1285
DDKCP$				 888
DDM_DISPATCH			 236#
DDRCP$				2001
DDXCP$				1665	2357	2407
DESC				 469	 477#	 478	 479	 480	 481#	 482	 564	 572#	 573	 574	 575
				 576#	 577	 579	 586	 589	 590	 597	 802	 804#	 807	1022	1028#
				1030	1040	1045	1479	1482#	1488	1489#	1495#	1496	1499#	1501	1897
				1924	1941	1943	1959	1962	1989	1996	2069	2099	2191	2198#	2201
				2204	2294	2321	2339
DEVICE_BROKEN			 136	 792	 838	1287*	1937	1949	2335	2345
DF_CONTROLLER_LOOPBACK		1118	1439
DF_DSR				 782	 783	1273
DF_DUP_CSR_SET			 383	 528	 644	 688	1200	1261	1313
DF_ENABLED			 432	 689	1160	1269	1312	2032	2389
DF_HALF_DUPLEX			1117	1431	2197
DF_INTERNAL_CLOCK		1119	1435
DF_KILLING_RECEIVES		1183	1706	1753	1955	2028
DF_KILLING_TRANSMITS		1192	1759	1803	2056	2151	2352	2385
DF_LINE_ACTIVE			1155	1202	1236	1283	1640
DF_STARTING_LINE		1239	1258	1282
DF_STOPPING_LINE		1157	1201
DF_TRANSMIT_UNDERRUN		 805	1032	1044	2386
DF_TRUNCATING_RECEIVE		 939	 942	 964	 973	2029
DISPATCH$			1532	1566	1599
DUP_DATA_BASE			 262	 263
D_ASSIGNABLE_RECEIVE_COUNT	 294	 690	1176	1280	1341	1707	1754	1957	2034	2287
D_ASSIGNABLE_TRANSMIT_CCBS	 333	1647	1655	2402
D_ASSIGNABLE_TRANSMIT_COUNT	 330	 336	 691	1177	1279	1760	1804	2354	2391
D_ASSIGNED_RECEIVE_COUNT	 295	1180	1703	1749	1953	2030
D_ASSIGNED_TRANSMIT_COUNT	 337	1189	1756	1800	2350	2387
D_DEVICE_ERRORS			 791	 837	1936	1948	2334	2344
D_EXT_ADDR			 380	 429	 476	 571	 686	 777	 799	 818	1080	1158	1246	1424
				1701	1747	1798	1877	1930	2042	2148	2196	2328	2399
D_EXT_BIAS			1488	2195
D_FIELDS			2225
D_INVALID_ERROR_CODE		 836
D_KMC_PIX			1082	1199	1252	1393	2216	2227
D_LEN				 187#	2225
D_LIX				 887	1203	1256	1284	1664	1998	2356	2406
D_MAXIMUM_TRANSMIT_SEGMENTS	1648	2201
D_NONEXISTENT_MEMORY		 790
D_NO_BUFFER_ASSIGNED		 765
D_PENDING_CONTROL_CCBS		 526	 642	1169	1172	2053	2065	2416
D_PERFORMANCE_ERRORS		 766	1886
D_POLLING_ADJUSTMENT		1885
D_POLLING_THRESHOLD		 960	 962	1036	1038	1448	1873	1875	1888	1894
D_RECEIVE_BA_ERROR		1935	1947
D_TIM				 384	 433	 599	 738	 748	 792	 838	 951	 975	1712	1751	1809
				1937	1949	1996	2064	2158	2161	2217	2225	2335	2345	2349	2418
D_TRANSMIT_BA_ERROR		2333	2343
D_TRANSMIT_TIMEOUT		 599
D_UNIT				1199	1252	1391	2206	2225
EDB				 374	 380#	 382	 425	 429#	 430	 431	 432	 470	 476#	 477	 478#
				 483#	 484	 565	 571#	 572	 573#	 578	 582#	 686#	 692	 777#	 784
				 799#	 810	 818#	 822	1080#	1083	1084	1085	1151	1158#	1163#	1244
				1246#	1248	1250	1421	1424#	1425#	1427	1429#	1433#	1441#	1443#	1447#
				1698	1701#	1744	1747#	1795	1798#	1870	1877#	1879	1887#	2145	2148#
				2150	2192	2196#	2197	2198	2201	2204
EF_HDX				2197
EP_DEC				1427
EQLU				1879
ES_PRT				1427
ES_RCV				1085
ES_XMT				1084	1447	1879
E_ASSIGNED_RECEIVE_CCBS		 483	1930	2042
E_ASSIGNED_TRANSMIT_CCBS	 578	2150	2328	2399
E_CTL				 431	 432	 582	1163	1425	1429	1433	1441	1443
E_DESCRIPTORS			2198
E_ENTITY			 692	 784	 810	 822
E_FIELDS			 374	 425	 470	 565	 686	 777	 799	 818	1080	1151	1244	1421
				1698	1744	1795	1870	2145	2192
E_LEN				 188
E_NEXT_RECEIVE_DESCRIPTOR	 477	 478	2204
E_NEXT_TRANSMIT_DESCRIPTOR	 572	 573	2201
E_POLLING_RATE			 430	1447	1879	1887
E_REGISTER			 382	1083	1248	1250
FALSE				 181#	 688	 689	 973	1044	1200	1201	1202	1273	1282	1312	1313
				1938	1950	2028	2029	2385	2386
FC_AST				 878	1889	2160
FC_CCP				 236
FC_CTL				 240	 880
FC_KIL				 239
FC_RCE				 238	1999
FC_TIM				 241
FC_XME				 237
FD_CTL				1533
FD_KIL				1568
FD_TIM				1601
FM_CRA				1570
FM_GET				1537
FM_KIL				1569
FM_LTM				1602
FM_PIN				1605
FM_PWF				1604
FM_RDB				1603
FM_SET				1536
FM_STP				1535
FM_STR				1534
FM_SYN				 595#
FM_XKL				1571
GET_DUP_DATA_BASE		 260#	 293	 328	 377	 427	 473	 521	 568	 637	 683	 735	 874
				 931	1025	1074	1112	1153	1234	1311	1339	1390	1423	1481	1638
				1700	1746	1797	1872	1929	1994	2027	2147	2194	2285	2327	2384
GET_RECEIVE_BUFFERS		 137	 842	 982	1281	1315*	2047
GIVE_TO_KMC			 138	 298	 339	1165	1185	1194	1265	1275	1362*	1709	1764	1806
				1891	2060
HIGH				 166	 172	2105	2108	2110
HIPOL_STRING			 206	 211#
HIPOL				 205#	1879
INDEX				 205	 206	 207	 208
INITIALIZE_CHARACTERISTICS	 139	1272	1395*
INITIALIZE_DESCRIPTOR_LIST	 140	1450*	2201	2204
IN_I_O				 828
KDP				   1#	 235
KDP$_SEG			1655
KDPCTL				 141	 240	1503*
KDPKIL				 142	 239	1541*
KDPNMI				 249	2230
KDPTIM				 143	 241	1575*
KDPXME				 144	 237	1609*
KDP_CCB				 114#	 138	1362#
KDP_CSR_NUM			 248
KDP_EDB				 115#
KDP_FIELDS			 675	 723	 919	1011
KDP_LKG_DB_DESC_CCB		 116#	 150	1897#
KDP_REG				 148	1828#
KILCRA				 145	1570	1669*
KILKIL				 146	1569	1715*
KILXKL				 147	1571	1751	1766*	2161
KMCDB				2217
KMCPRM				1082
KMCQUE				1393
KMCSTP				1199
KMCSTR				1252
KMC_PIX				2211	2213	2216	2217
K_LEN				2217
LANGUAGE			   3
LINKAGE_CCB			 119	 265#
LINKAGE_CCB_DESC		 107#	 153	2069#
LINKAGE_CSR			 108#
LINKAGE_CSR_MC_LNG		 109#
LINKAGE_DB_CCB			 129	 845#
LINKAGE_DB			 136	1287#
LINKAGE_DESC_STS		 110#	 151	 158	1962#	2294#
LINKAGE_PORT			 111#
LINKAGE_RING_POOL_COUNT		 112#	 140	1450#
LINKAGE_STS			 113#
LIST_FIRST			2150
LIST_LAST			1655
LOPOL_STRING			 208	 218#
LOPOL				 207#	1447
LOW				 166	 172
MAP$				 379	 385	 428	 435	 475	 485	 523	 530	 570	 601	 639	 646
				 681	 695	 728	 737	 843	 924	 933	 983	1016	1027	1048	2195
MCB$GAW_PROCESS_DATA_BASE	 252	 257	 263
MCB$GW_PROCESS_HANDLE		 253	 882	1252	1392
MCB$GW_RDB_SIZE			 254	 296
MCB_DB				 154	 155	 156	1607	2119#	2165#	2232#
MCB_DB_CCB_MOD			 141	 142	 144	1503#	1541#	1609#
MCB_DB_CCB			 132	 133	 134	 135	 145	 146	 147	 157	1050#	1088#	1122#	1206#
				1539	1573	1669#	1715#	1766#	2257#
MCB_DB_MOD			 143	1575#
MODIFIER			1503	1532	1541	1567	1575	1600	1609
NAME				 235#	 260	 261	 262	 263#
NEXT_CCB			2095	2098#	2107	2109	2113#
NEXT_DESC			2096	2099#	2108	2109#	2110#	2111#	2115#	2116#	2117
NO_OPERATION			 182#	2255
OFF				 773#	 783
ON				 774#	 783
PARAMETER_C_1			 785
PARAMETER_DEVICE_REGISTERS	 148	 693	 811	 823	1812*
PARAMETER_H_2			1838
POLLING_FAILURE			 149	 809	 820	1843*
POLLING_THRESHOLD		 183#	 960	1036	1448	1888
POOL				1450	1482	1501#
PORT				 343	 371	 381#	 382#	 388	 416	 430#	 431#	 438	 466	 479#	 480#
				 488	 516	 524#	 525#	 533	 561	 574#	 575#	 604	 632	 640#	 641#
QUE				1927	1930#	1932	1946	2325	2328#	2330	2342
RBA				 486	 531
RECEIVE_CCB			 150	 748	 951	 975	1897*	1996
RECEIVE_DONE			 151	 755	 760	 821	 943	 966	1962*
RECEIVE_KILLED			 152	 528	 830	2003*
REG				 649	 675	 693	 697	 723	 739	 755	 760	 804	 811	 821	 823
				 828	 893	 919	 935	 943	 966	 985	1011	1028	1819	1838	1839#
REGISTER_NXM			 248*	1250
RING				1450	1492	1495	1496#	1499#
SAVE_MAP			 375	 378	 385	 419	 421	 435	 471	 474	 485	 519	 522	 530
				 566	 569	 601	 635	 638	 646	 678	 680	 695	 728	 733	 736
				 843	 924	 929	 932	 983	1016	1023	1026	1048
SEG_CNT				1645	1648#	1653#
SEL2				 828
SEL4				 755	 760	 804	 821	 943	 966	1028
SEL6				 739	 755	 760	 804	 821	 935	 943	 966	1028
SET_DESCRIPTOR			 153	 482	 577	2069*
SMAP$				 378	 421	 474	 522	 569	 638	 680	 736	 932	1026
STATE				 780	 783#	 785
STS				1962	2001	2294	2357
TABLE$				 236	1533	1568	1601
TBA				 602	 647
TIMLTM				 154	1602	2119*
TIMPIN				 155	1605	2165*
TIMPWF				 156	1604	2232*
TIMRDB				 157	1603	2257*
TRANSMIT_DONE			 158	 807	1040	1045	2294*
TRANSMIT_KILLED			 159	 644	 832	2360*
TRUE				 184#	 383	 805	 942	1157	1183	1192	1258	1283	1706	1753	1759
				1803	1960	2036	2393	2410
$CCBRT				1530*
$DSPCR				 231*	 236	1533	1568	1601
$MCB_CANCEL_RDB_REQUEST		1178
$MCB_CONVERT_FROM_UBA_ADDRESS	 172
$MCB_CONVERT_TO_UBA_ADDRESS	1488	2107
$MCB_DEQUEUE_CCB		 333	1932	2042	2053	2065	2330	2399	2402	2416
$MCB_DISABLE_LONG_TIMER		1198
$MCB_ENABLE_LONG_TIMER		1257
$MCB_GET_CCB			1882	2158
$MCB_GET_RDB			1347
$MCB_PROCESS			 234
$MCB_QUEUE_CCB			 484	 526	 578#	 642	1172	1647
$MCB_REQUEST_RDB		1355
$MCB_RETURN_CCB			 879
$MCB_RETURN_RDB			 750	 953	 977	2044	2291
$MCB_SCHEDULE_CCB		 883
$MCB_SET_PROCESS		2213
$MCB_STACK_CCB			1946	2342
$NM_PLL_EVENT			 692	 784	 810	 822
$RDBRT				 232	 238
$RETURN				 726#	 748	 922#	 951	 975	1014#	1030
$SUB_FIELD			 432	 582	 739	 755	 760	 804	 821	 828	 935	 943	 966	1028
				1084	1085	1429	1433	1441	1443	1655	2150