Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/cebuf.list
There are no other files named cebuf.list in the archive.
CEBUF	MACRO M1110  13-OCT-79 08:07
TABLE OF CONTENTS

     4-   51	$CCBGT - ALLOCATE A STANDARD CCB
     5-   84	$LDBGT - GET A LARGE DATA BUFFER
     6-  111	$RDBGT - GET A RECEIVE DATA BUFFER
     7-  152	$RDBWT - QUEUE A REQUEST FOR A RECEIVE DATA BUFFER
     8-  184	$RDBQP - PURGE BUFFER WAIT QUEUE
     9-  220	$RDBRT - RETURN A RECEIVE DATA BUFFER
    10-  280	$CCBRT - RETURN A CCB
    11-  314	$SDBGT - ALLOCATE A SMALL DATA BUFFER
    12-  368	$SDBRT - RETURN A SMALL DATA BUFFER
    13-  412	$CSBGT - ALLOCATE CCB AND A SMALL DATA BUFFER
    14-  448	$CSBRT - RETURN COMBINATION CCB AND SMALL DATA BUFFER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 3


      1						.TITLE	CEBUF
      2						.IDENT	/V01.01/
      3
      4					;
      5					; COPYRIGHT (C) 1978 BY
      6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
      7					;
      8					;
      9					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
     10					; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
     11					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
     12					; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
     13					; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
     14					; TRANSFERRED.
     15					;
     16					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
     17					; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
     18					; CORPORATION.
     19					;
     20					; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
     21					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
     22					;
     23					;
     24					; MODULE DESCRIPTION:
     25					;
     26					;	CEX BUFFER ALLOCATION ROUTINES
     27					;
     28					;
     29					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
     30					;
     31					; IDENT HISTORY:
     32					;
     33					; 1.00	10-FEB-78
     34					;	VERSION 2.0 RELEASE
     35					; 1.01	11-JAN-79 ALAN D. PECKHAM
     36					;	ELIMINATE DIRECT REFERENCES TO $SLTTB.
     37					;
     38
     39
     40					;
     41					; MACRO LIBRARY CALLS
     42					;
     43						.MCALL	INHIB$,ENABL$,SAVRG,RESRG
     44						.MCALL	CCBDF$,HWDDF$,SLTDF$
     45						.MCALL	CALLR		; AVOID SYSTEM DEPENDENCY
     46	000000					CCBDF$			; DEFINE THE CCB OFFSETS
     47	000000					SLTDF$			; DEFINE THE SLT OFFSETS
     48	000000					HWDDF$			; DEFINE THE HARDWARE REGISTERS
     49
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 4
$CCBGT - ALLOCATE A STANDARD CCB

     51						.SBTTL	$CCBGT - ALLOCATE A STANDARD CCB
     52
     53					;+
     54					; **-$CCBGT-ALLOCATE A STANDARD CCB
     55					;
     56					; INPUTS:
     57					;
     58					;	NONE
     59					;
     60					; OUTPUTS:
     61					;
     62					;	C/CLEAR:
     63					;	R4 = ADDRESS OF CCB
     64					;
     65					;	C/SET = NO BUFFER AVAILABLE TO PICK
     66					;	R4 = ZERO
     67					;
     68					; REGISTERS MODIFIED:
     69					;
     70					;	R4
     71					;-
     72						.ENABL	LSB
     73
     74	000000				$CCBGT::INHIB$			;;; DISABLE INTERRUPTS
     75	000012	016704 	000000G			MOV	$CCBLH,R4	;;; GET FIRST CCB
     76	000016	001003 				BNE	5$		;;; IF NE, POOL IS NOT EMPTY
     77	000020	005267 	000000G			INC	$CCBAF		;;; OTHERWISE INCR # OF ALLOCATION FAILURES
     78	000024	000436 				BR	20$		;;; GO RETURN WITH C-BIT SET TO INDICATE ALLOCATION FAIL
     79
     80	000026	011467 	000000G		5$:	MOV	(R4),$CCBLH	;;; SET ADDRESS OF NEW NEXT
     81	000032	005367 	000000G			DEC	$CCBCT		;;; DECREMENT COUNT OF # OF CCB'S LEFT IN POOL
     82	000036	000423 				BR	10$		;;; COMMON EXIT
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 5
$LDBGT - GET A LARGE DATA BUFFER

     84						.SBTTL	$LDBGT - GET A LARGE DATA BUFFER
     85
     86					;+
     87					; **-$LDBGT - GET A LARGE DATA BUFFER
     88					;
     89					; THIS SUBROUTINE IS CALLED TO ALLOCATE A FIX LENGTH
     90					; LARGE DATA BUFFER.  LARGE DATA BUFFERS COME OUT OF THE
     91					; SAME POOL AS RECEIVE DATA BUFFERS.  THE DIFFERENCE
     92					; IS THAT LARGE DATA BUFEERS ARE FOR NON-DDM PROCESSES,
     93					; AND THERE MUST BE A MINIMUM NUMBER OF BUFFERS REMAINING
     94					; IN THE POOL OR THE ALLOCATION OF A LARGE DATA BUFFER WILL FAIL.
     95					;
     96					; INPUTS:
     97					;	NONE
     98					;
     99					;OUTPUTS:
    100					;	C=1	IF ALLOCATION FAILED
    101					;		R4 - DESTROYED
    102					;	C=0	ALLOCATION  SUCCEEDED
    103					;		R4 = ADDRESS OF ALLOCATED BUFFER'S CCB
    104					;-
    105
    106	000040	026767 	000000G	000000G	$LDBGT::CMP	$RDBCT,$RDBTH	; IS POOL MINIMUM THRESHOLD EXCEEDED?
    107	000046	103003 				BHIS	$RDBGT		; IF (HIGHER/SAME), NO - GO ALLOCATE LDB
    108	000050	005267 	000000G			INC	$LDBAF		; OTHERWISE INCR # OF LDB ALLOCATION FAILURES
    109	000054	000425 				BR	30$		; GO RETURN WITH C-BIT SET TO INDICATE ALLOCATION FAILUR
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 6
$RDBGT - GET A RECEIVE DATA BUFFER

    111						.SBTTL	$RDBGT - GET A RECEIVE DATA BUFFER
    112
    113					;+
    114					; **-$RDBGT-GET A RECEIVE DATA BUFFER
    115					;
    116					; THIS SUBROUTINE IS CALLED TO ALLOCATE A FIXED LENGTH
    117					; RECEIVE DATA BUFFER.
    118					;
    119					; INPUTS:
    120					;
    121					;	NONE
    122					;
    123					;
    124					; OUTPUTS:
    125					;
    126					;	C=1 IF INSUFFICIENT CORE IS AVAILABLE TO ALLOCATE THE BUFFER.
    127					;		R4 = ZERO.
    128					;	C=0 IF THE BUFFER IS ALLOCATED.
    129					;		R4=ADDRESS OF THE ALLOCATED BUFFER'S CCB
    130					;-
    131
    132	000056				$RDBGT::INHIB$			;;; DISABLE INTERUPTS
    133	000070	016704 	000000G			MOV	$RDBLH,R4	;;; GET ADDRESS OF FIRST BLOCK
    134	000074	001410 				BEQ	15$		;;; IF EQ NO BUFFERS AVAILABLE
    135	000076	011467 	000000G			MOV	(R4),$RDBLH	;;; SET ADDRESS OF NEW FIRST BUFFER
    136	000102	005367 	000000G			DEC	$RDBCT		;;; DECREMENT COUNT OF NUMBER OF BUFFERS IN POOL
    137	000106				10$:	ENABL$			;;; ENABLE INTERUPTS
    138	000112	005014 				CLR	(R4)		; ZERO NEXT POINTER (CLEAR C-BIT)
    139	000114					RETURN			; RETURN TO CALLER
    140
    141					;
    142					; RETURN AN ERROR INDICATION
    143					;
    144	000116	005267 	000000G		15$:	INC	$RDBAF		;;; INCR COUNTER OF # OF RDB ALLOCATION FAILURES
    145
    146	000122				20$:	ENABL$			;;; ENABLE INTERRUPTS
    147	000126	000261 				SEC			; INDICATE FAILURE
    148	000130				30$:	RETURN			; RETURN TO CALLER
    149
    150						.DSABL	LSB
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 7
$RDBWT - QUEUE A REQUEST FOR A RECEIVE DATA BUFFER

    152						.SBTTL	$RDBWT - QUEUE A REQUEST FOR A RECEIVE DATA BUFFER
    153
    154					;+
    155					; **-$RDBWT-QUEUE A REQUEST FOR A RECEIVE DATA BUFFER
    156					;
    157					; THIS ROUTINE IS CALLED BY DDM'S WHEN A FAILURE TO ALLOCATE
    158					; A RECEIVE DATA BUFFER IS DETECTED.  THE SYSTEM LINE TABLE
    159					; FLAGS WORD IS UPDATED TO MARK THE BUFFER WAIT REQUEST AND
    160					; THE GLOBAL REQUEST IS INCREMENTED.
    161					;
    162					; INPUTS:
    163					;
    164					;	R4 = SYSTEM LINE NUMBER
    165					;
    166					; OUTPUTS:
    167					;
    168					;	AS DESCRIBED ABOVE
    169					;
    170					;-
    171
    172	000132	010446 			$RDBWT::MOV	R4,-(SP)	; SAVE CALLER'S R4
    173	000134	006304 				ASL	R4		; MULTIPLY SLN BY 14 (L.LEN)
    174	000136	006304 				ASL	R4		; ...
    175	000140	010446 				MOV	R4,-(SP)	; ...
    176	000142	006304 				ASL	R4		; ...
    177	000144	062604 				ADD	(SP)+,R4	; ...
    178	000146	066704 	000000G			ADD	$SLTTA,R4	; INDEX INTO SLT TABLES                         ;AP0001
    179	000152	105214 				INCB	(R4)		; BUMP WAIT REQUEST COUNT FOR THIS LINE         ;AP0001
    180	000154	005267 	000000G			INC	$RDQCT		; INCREMENT GLOBAL WAIT REQUEST COUNT           ;**-1
    181	000160	012604 				MOV	(SP)+,R4	; RESTORE R4
    182	000162					RETURN			; RETURN TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 8
$RDBQP - PURGE BUFFER WAIT QUEUE

    184						.SBTTL	$RDBQP - PURGE BUFFER WAIT QUEUE
    185
    186					;+
    187					; **-$RDBQP-PURGE BUFFER WAIT QUEUE
    188					;
    189					; THIS SUBROUTINE IS CALLED TO CANCEL ALL REQUESTS IN THE RECEIVE
    190					; DATA BUFFER WAIT QUEUE FOR A PARTICULAR SYSTEM LINE NUMBER.
    191					;
    192					; INPUTS:
    193					;
    194					;	R4 = SYSTEM LINE NUMBER
    195					;
    196					; OUTPUTS:
    197					;	AS DESCRIBED ABOVE
    198					;
    199					; REGISTERS MODIFIED:
    200					;
    201					;	NONE
    202					;-
    203	000164	010446 			$RDBQP::MOV	R4,-(SP)	; SAVE CALLERS R4 AND R3
    204	000166	010346 				MOV	R3,-(SP)	; ...
    205	000170	006304 				ASL	R4		; MULTIPLY THE SLN BY 14 (L.LEN)
    206	000172	006304 				ASL	R4		; ...
    207	000174	010446 				MOV	R4,-(SP)	; ...
    208	000176	006304 				ASL	R4		; ...
    209	000200	062604 				ADD	(SP)+,R4	; ...
    210	000202	066704 	000000G			ADD	$SLTTA,R4	; INDEX INTO SLT TABLES                         ;AP0001
    211	000206	011403 				MOV	(R4),R3		; AND GET WAIT REQUEST COUNT.                   ;AP0001
    212	000210	042703 	177770 			BIC	#^C<LF.BWT>,R3	; ...                                           ;**-1
    213	000214	040314 				BIC	R3,(R4)		; CLEAR WAIT REQUEST COUNT IN SLT
    214	000216	160367 	000000G			SUB	R3,$RDQCT	; REDUCE GLOBAL COUNT BY SAME VALUE
    215	000222	012603 				MOV	(SP)+,R3	; RESTORE CALLERS R3 AND R4
    216	000224	012604 				MOV	(SP)+,R4	; ...
    217	000226					RETURN			; RETURN
    218
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 9
$RDBRT - RETURN A RECEIVE DATA BUFFER

    220						.SBTTL	$RDBRT - RETURN A RECEIVE DATA BUFFER
    221
    222					;+
    223					; **- $RDBRT - RETURN A RECEIVE DATA BUFFER
    224					; **- $LDBRT - RETURN A LARGE DATA BUFFER
    225					;
    226					; THIS ROUTINE IS CALLED TO RETURN A DATA BUFFER TO THE LARGE BUFFER POOL.  IF
    227					; THE WAITERS COUNT IS ZERO OR A BUFFER IS ALREADY QUEUED TO THE SYSTEM
    228					; PROCESS TO SATISFY A WAIT REQUEST, THE BUFFER IS RETURNED TO THE POOL.
    229					; OTHERWISE, THE SYSTEM RETURN PROCESS IS SCHEDULED AND MARKED.
    230					;
    231					; INPUTS:
    232					;
    233					;	R4 = ADDRESS OF THE BUFFER'S CCB TO BE RETURNED.
    234					;
    235					; OUTPUTS:
    236					;	AS DESCRIBED ABOVE
    237					;
    238					; REGISTERS MODIFIED:
    239					;
    240					;	R4
    241					;-
    242
    243	000230				$LDBRT::
    244	000230				$RDBRT::
    245						.IF DF	X$$BUG
    246						BITB	#CB.RDB,C.BID(R4) ;? IS THIS A REAL RECEIVE DATA BUFFER CCB?
    247						BEQ	.		;? IF EQ, NO
    248						TST	R4		;? IS THE CCB ADDRESS ZERO?
    249						BEQ	.		;? IF EQ, YES
    250						.ENDC
    251
    252	000230	016464 	000026 	000016 		MOV	C.BUF2+2(R4),C.BUF+2(R4) ; RESET BUFFER VIRTUAL ADDRESS
    253
    254						.IF DF	X$$BUG
    255						BEQ	.		;? IF ADDRESS IS ZERO, CCB IS ILLEGAL
    256						.ENDC
    257
    258	000236	112764 	000004 	000003 		MOVB	#CB.RDB,C.BID(R4) ; RESET BUFFER ID
    259	000244	016764 	000000G	000020 		MOV	$RDBSZ,C.CNT(R4) ; RESET BUFFER COUNT
    260	000252	016764 	000000G	000030 		MOV	$RDBSZ,C.CNT2(R4) ; RESET BUFFER COUNT IN SECOND DESCRIPTOR
    261									; ...THIS COUNT FIELD IS USED BY DDHAR
    262	000260	012764 	100000 	000022 		MOV	#CF.LB,C.FLG(R4) ; RESET LAST BUFFER INDICATOR
    263	000266	012764 	001002 	000010 		MOV	#FC.RCE+FS.RTN,C.FNC(R4) ; SET RETURN FUNCTION CODE
    264	000274					INHIB$			;;; INHIBIT INTERRUPTS
    265	000306	005767 	000000G			TST	$RDQCT		;;; ANY WAITERS ?
    266	000312	003411 				BLE	10$		;;; IF LE, NO WAITERS OR BUFFER ALREADY QUEUED
    267	000314	010346 				MOV	R3,-(SP)	;;; SAVE R3
    268	000316	012703 	100000 			MOV	#100000,R3	;;; SEND TO BUFFER RETURN SYSTEM PROCESS
    269	000322	050367 	000000G			BIS	R3,$RDQCT	;;; MARK A BUFFER QUEUED FOR A WAITER
    270	000326					CALL	$PDQUE		;;; ...
    271	000332	012603 				MOV	(SP)+,R3	;;; RESTORE R3
    272	000334	000406 				BR	20$		;;; COMMON EXIT PATH
    273
    274	000336	016714 	000000G		10$:	MOV	$RDBLH,(R4)	;;; INSERT POINTER TO CHAIN IN CCB
    275	000342	010467 	000000G			MOV	R4,$RDBLH	;;; POINT LISTHEAD TO RETURNED CCB
    276	000346	005267 	000000G			INC	$RDBCT		;;; INCREMENT COUNT OF NUMBER OF BUFFERS IN POOL
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 9-1
$RDBRT - RETURN A RECEIVE DATA BUFFER

    277	000352				20$:	ENABL$			;;; ENABLE INTERRUPTS
    278	000356					RETURN			; RETURN TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 10
$CCBRT - RETURN A CCB

    280						.SBTTL	$CCBRT - RETURN A CCB
    281
    282					;+
    283					; **- $CCBRT - RETURN A CCB
    284					;
    285					; THIS SUBROUTINE IS CALLED TO DEALLOCATE A STANDARD CCB.
    286					;
    287					; INPUTS:
    288					;
    289					;	R4 = ADDRESS OF CONTROL BUFFER TO RETURN
    290					;
    291					; OUTPUTS:
    292					;
    293					;	THE CCB IS RETURNED TO THE LIST.
    294					;
    295					; REGISTERS MODIFIED:
    296					;
    297					;	NONE
    298					;-
    299
    300	000360				$CCBRT::
    301						.IF DF	X$$BUG
    302						TST	R4		;? IS CCB ADDRESS ZERO?
    303						BEQ	.		;? IF EQ, YES
    304						.ENDC
    305
    306	000360	112764 	000002 	000003 	10$:	MOVB	#CB.CCB,C.BID(R4) ; RESET BUFFER ID BYTE
    307	000366	005267 	000000G			INC	$CCBCT		; INCR COUNTER OF # OF CCB'S IN POOL
    308	000372					INHIB$			;;; DISABLE INTERRUPTS
    309	000404	016714 	000000G			MOV	$CCBLH,(R4)	;;; SET FIRST POINTER IN RETURNED CCB
    310	000410	010467 	000000G			MOV	R4,$CCBLH	;;; SET NEW FIRST POINTER
    311	000414					ENABL$			;;; ENABLE INTERRUPTS
    312	000420				20$:	RETURN			; RETURN TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 11
$SDBGT - ALLOCATE A SMALL DATA BUFFER

    314						.SBTTL	$SDBGT - ALLOCATE A SMALL DATA BUFFER
    315
    316					;+
    317					; **-$SDBGT-ALLOCATE A SMALL DATA BUFFER
    318					;
    319					; THIS SUBROUTINE IS CALLED TO ALLOCATE A SMALL DATA BUFFER
    320					;
    321					; INPUTS:
    322					;	NONE
    323					;
    324					; OUTPUTS:
    325					;	C-BIT CLEAR: BUFFER ALLOCATED
    326					;	R2: BUFFER VIRTUAL ADDRESS WITH BIAS FOR KISAR6
    327					;	R3: BUFFER PHYSICAL ADDRESS DIVIDED BY 100
    328					;
    329					;	C-BIT SET: ALLOCATION FAILURE
    330					;	R2: ZEROED
    331					;	R3: ZEROED
    332					;
    333					; REGISTERS MODIFIED:
    334					;	R2 & R3
    335					;-
    336	000422	000241 			$SDBGT::CLC			; ASSUME SUCCESSFUL ALLOCATION
    337	000424					INHIB$			;;; DISABLE INTERRUPTS
    338
    339						.IF DF	M$$MGE
    340	000436	016703 	000000G			MOV	$SDBLH,R3	;;; GET RELOCATION BIAS OF FIRST BUFFER IN POOL
    341	000442	016702 	000002G			MOV	$SDBLH+2,R2	;;; GET VIRTUAL ADDRESS OF BUFFER
    342
    343						.IFF
    344						CLR	R3		;;; CLEAR RELOCATION BIAS
    345						MOV	$SDBLH,R2	;;; GET ADDRESS OF FIRST BUFFER IN POOL
    346
    347						.IFTF
    348	000446	001412 				BEQ	10$		;;; IF EQ, POOL IS EMPTY
    349
    350						.IFT
    351	000450	010367 	172354 			MOV	R3,KISAR6	;;; MAP TO BUFFER
    352	000454	011267 	000000G			MOV	(R2),$SDBLH	;;; GET RELOCATION BIAS OF NEXT BUFFER IN POOL
    353	000460	016267 	000002 	000002G		MOV	2(R2),$SDBLH+2	;;; SET UP LISTHEAD TO POINT TO NEXT BUFFER
    354
    355						.IFF
    356						MOV	(R2),$SDBLH	;;; POINT LISTHEAD TO NEXT BUFFER IN POOL
    357						.ENDC
    358
    359	000466	005367 	000000G			DEC	$SDBCT		;;; DECR COUNTER OF # OF SDB'S IN POOL
    360	000472	000403 				BR	20$		;;; EXIT WITH C-BIT CLEAR
    361
    362	000474	005216 			10$:	INC	(SP)		;;; SET C-BIT IN SAVED PS ON STACK
    363	000476	005267 	000000G			INC	$SDBAF		;;; INCR COUNTER OF # OF SDB ALLOCATION FAILURES
    364
    365	000502				20$:	ENABL$			;;;ENABLE INTERRUPTS
    366	000506					RETURN			;EXIT TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 12
$SDBRT - RETURN A SMALL DATA BUFFER

    368						.SBTTL	$SDBRT - RETURN A SMALL DATA BUFFER
    369
    370					;+
    371					; **-$SDBRT - RETURN A SMALL DATA BUFFER
    372					;
    373					; THIS SUBROUTINE IS CALLED TO DEALLOCATE A SMALL DATA BUFFER
    374					;
    375					; INPUTS:
    376					;	R2: BUFFER VIRTUAL ADDRESS WITH BIAS FOR KISAR6
    377					;	R3: BUFFER PHYSICAL ADDRESS DIVIDED BY 100
    378					;
    379					; OUTPUTS:
    380					;	THE REFERENCED BUFFER IS RETURNED TO THE FREE LIST
    381					;
    382					; REGISTERS MODIFIED:
    383					;	NONE
    384					;-
    385
    386	000510				$SDBRT::
    387						.IF DF	X$$BUG
    388						TST	R2		;? IS THE BUFFER ADDRESS ZERO?
    389						BEQ	.		;? IF EQ, YES
    390						.ENDC
    391
    392	000510					INHIB$			;;;DISABLE INTERRUPTS
    393
    394						.IF DF	M$$MGE
    395	000522	016746 	172354 			MOV	KISAR6,-(SP)	;;; SAVE CURRENT CONTENTS OF KERNEL APR 6
    396	000526	010367 	172354 			MOV	R3,KISAR6	;;; MAP TO BUFFER
    397	000532	016712 	000000G			MOV	$SDBLH,(R2)	;;; SET UP LINKAGE TO FIRST BUFFER IN POOL
    398	000536	016762 	000002G	000002 		MOV	$SDBLH+2,2(R2)	;;; ...
    399	000544	012667 	172354 			MOV	(SP)+,KISAR6	;;; RESTORE KERNEL APR 6
    400	000550	010367 	000000G			MOV	R3,$SDBLH	;;; PUT BUFFER IN AS FIRST IN POOL
    401	000554	010267 	000002G			MOV	R2,$SDBLH+2	;;; POINT LISTHEAD TO BUFFER
    402
    403						.IFF
    404						MOV	$SDBLH,(R2)	;;; SET UP LINKAGE TO FIRST BUFFER IN POOL
    405						MOV	R2,$SDBLH	;;; PUT BUFFER IN POOL - POINT LISTHEAD TO BUFFER
    406						.ENDC
    407
    408	000560					ENABL$			;;;ENABLE INTERRUPTS
    409	000564	005267 	000000G			INC	$SDBCT		; INCR COUNTER OF # OF SDB'S IN POOL
    410	000570					RETURN			; EXIT TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 13
$CSBGT - ALLOCATE CCB AND A SMALL DATA BUFFER

    412						.SBTTL	$CSBGT - ALLOCATE CCB AND A SMALL DATA BUFFER
    413
    414					;+
    415					; **- $CSBGT - ALLOCATE BOTH A CCB AND A SMALL DATA BUFFER
    416					;
    417					; THIS SUBROUTINE IS CALLED TO ALLOCATE A CCB AND A SMALL DATA
    418					; BUFFER.  THE ROUTINE ALSO SETS UP THE BUFFER DESCRIPTOR
    419					; IN THE CCB TO POINT TO THE BUFFER AS WELL AS THE PROPER BUFFER
    420					; BYTE COUNT.
    421					;
    422					; INPUTS:
    423					;	NONE
    424					;
    425					; OUTPUTS:
    426					;	C=1	IF ALLOCATION OF EITHER FAILED
    427					;		R4 - DESTROYED
    428					;	C=0	IF ALLOCATION SUCCEEDED
    429					;		R4 = ADDRESS OF CCB
    430					;-
    431
    432	000572				$CSBGT::CALL	$CCBGT		; ALLOCATE A CCB
    433	000576	103424 				BCS	30$		; ALLOCATION FAILED - RETURN C-BIT SET
    434	000600	010246 				MOV	R2,-(SP)	; SAVE REGISTERS
    435	000602	010346 				MOV	R3,-(SP)	; ...
    436	000604					CALL	$SDBGT		; ALLOCATE A SMALL DATA BUFFER
    437	000610	103003 				BCC	10$		; ALLOCATION SUCCEEDED IF C-BIT IS CLEAR
    438	000612					CALL	$CCBRT		; ALLOCATION FAILED - RETURN CCB TO POOL
    439	000616	000412 				BR	20$		; C-BIT IS STILL SET - RETURN
    440	000620	010364 	000014 		10$:	MOV	R3,C.BUF(R4)	; STORE BUFFER BIAS IN CCB
    441	000624	010264 	000016 			MOV	R2,C.BUF+2(R4)	; STORE BUFFER VIRTUAL ADDRESS IN CCB
    442	000630	016764 	000000G	000020 		MOV	$SDBSZ,C.CNT(R4) ; STORE BUFFER BYTE COUNT IN CCB
    443	000636	012764 	100004 	000022 		MOV	#CF.LB+CF.EOM,C.FLG(R4) ; SET LAST BUFFER INDICATOR
    444	000644	012603 			20$:	MOV	(SP)+,R3	; RESTORE REGISTERS
    445	000646	012602 				MOV	(SP)+,R2	; ...
    446	000650				30$:	RETURN			; RETURN TO CALLER
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 14
$CSBRT - RETURN COMBINATION CCB AND SMALL DATA BUFFER

    448						.SBTTL	$CSBRT - RETURN COMBINATION CCB AND SMALL DATA BUFFER
    449
    450					;+
    451					; **- $CSBRT - RETURN COMBINATION CCB AND SMALL DATA BUFFER TO RESPECTIVE POOLS
    452					;
    453					; THIS SUBROUTINE RETURNS A CCB AND THE SMALL DATA BUFFER POINTED TO
    454					; BY THE FIRST BUFFER DESCRIPTOR OF THE CCB TO THEIR RESPECTIVE
    455					; BUFFER POOLS.
    456					;
    457					; INPUTS:
    458					;	R4=	ADDRESS OF CCB
    459					;
    460					; OUTPUTS:
    461					;	CCB & SMALL DATA BUFFER ARE RETURNED TO THEIR RESPECTIVE POOLS
    462					;
    463					; REGISTERS ACROSS CALL:
    464					;	ALL ARE PRESERVED
    465					;-
    466
    467	000652	010246 			$CSBRT::MOV	R2,-(SP)	; SAVE REGISTERS
    468	000654	010346 				MOV	R3,-(SP)	; ...
    469	000656	016403 	000014 			MOV	C.BUF(R4),R3	; GET SMALL DATA BUFFER BIAS
    470	000662	016402 	000016 			MOV	C.BUF+2(R4),R2	; GET SMALL DATA BUFFER VIRTUAL ADDRESS
    471	000666					CALL	$SDBRT		; RETURN SMALL DATA BUFFER TO POOL
    472	000672	012603 				MOV	(SP)+,R3	; RESTORE REGISTERS
    473	000674	012602 				MOV	(SP)+,R2	; ...
    474	000676					CALLR	$CCBRT		; RETURN CCB TO POOL
    475									;AND RETURN TO CALLER
    476		000001 				.END
CEBUF	MACRO M1110  13-OCT-79 08:07  PAGE 14-1
SYMBOL TABLE

A$$CHK= 000000   	C.CNT2  000030   	FS.KIL= 000000   	L$$ASG= 000000   	TPS   = 177564
A$$CPS= 000000   	C.FLG   000022   	FS.LTM= 001000   	L$$DRV= 000000   	T$$KMG= 000000
A$$PRI= 000000   	C.FLG1  000022   	FS.MNT= 004000   	L$$P11= 000001   	T$$MIN= 000000
A$$TRP= 000000   	C.FLG2  000032   	FS.MSN= 014000   	L$$11R= 000000   	UBMPR = 170200
CB.CCB= 000002   	C.FNC   000010   	FS.RNG= 011000   	L.CTL   000012   	UDSAR0= 177660
CB.RDB= 000004   	C.LIN   000006   	FS.RTN= 001000   	L.DDM   000002   	UDSDR0= 177620
CE.ABO= 100362   	C.LNK   000000   	FS.SET= 005000   	L.DDS   000004   	UISAR0= 177640
CE.DIS= 100366   	C.MOD   000011   	FS.STM= 000000   	L.DLC   000003   	UISAR4= 177650
CE.ERR= 100370   	C.NSP   000004   	FS.STP= 002000   	L.DLM   000006   	UISAR5= 177652
CE.MOP= 100372   	C.RSV   000002   	FS.STR= 001000   	L.DLS   000010   	UISAR6= 177654
CE.NTE= 100361   	C.STA   000007   	FS.TRM= 003000   	L.FLG   000000   	UISAR7= 177656
CE.RTE= 100376   	C.STS   000012   	FS.XKL= 002000   	L.LEN = 000014   	UISDR0= 177600
CE.SRC= 100364   	D$$BUG= 177514   	FS.XOF= 010000   	L.UNT   000013   	UISDR4= 177610
CE.TMO= 100374   	D$$ISK= 000000   	FS.XON= 007000   	MPAR  = 172100   	UISDR5= 177612
CF.EOM= 000004   	D$$L11= 000001   	F$$LVL= 000001   	MPCSR = 177746   	UISDR6= 177614
CF.HDR= 000020   	D$$YNC= 000000   	G$$TPP= 000000   	M$$CRB= 000124   	UISDR7= 177616
CF.LB = 100000   	D$$YNM= 000000   	G$$TSS= 000000   	M$$CRX= 000000   	V$$CTR= 001000
CF.SOM= 000010   	E$$XPR= 000000   	G$$TTK= 000000   	M$$FCS= 000000   	X$$DBT= 000000
CF.SYN= 000040   	FC.CCP= 000020   	G$$WRD= 000000   	M$$MGE= 000000   	$CCBAF= ****** GX
CF.TRN= 000100   	FC.CTL= 000006   	I$$RAR= 000000   	M$$OVR= 000000   	$CCBCT= ****** GX
CMODE = 140000   	FC.KCP= 000016   	I$$RDN= 000000   	N$$LDV= 000001   	$CCBGT  000000RG
CS.ABO= 000100   	FC.KIL= 000004   	KDSAR0= 172360   	N$$MOV= 000010   	$CCBLH= ****** GX
CS.BUF= 000200   	FC.RCE= 000002   	KDSDR0= 172320   	N$$SYS= 000001   	$CCBRT  000360RG
CS.DCR= 000400   	FC.RCP= 000014   	KISAR0= 172340   	N$$USR= 000001   	$CSBGT  000572RG
CS.DEV= 000002   	FC.TIM= 000010   	KISAR5= 172352   	PIRQ  = 177772   	$CSBRT  000652RG
CS.DIS= 000040   	FC.XCP= 000012   	KISAR6= 172354   	PMODE = 030000   	$LDBAF= ****** GX
CS.ENB= 000020   	FC.XME= 000000   	KISAR7= 172356   	PR0   = 000000   	$LDBGT  000040RG
CS.EOF= 000001   	FE.CAL= 000040   	KISDR0= 172300   	PR1   = 000040   	$LDBRT  000230RG
CS.ERR= 100000   	FE.DRV= 000010   	KISDR6= 172314   	PR4   = 000200   	$PDQUE= ****** GX
CS.HFE= 002000   	FE.EXP= 000200   	KISDR7= 172316   	PR5   = 000240   	$RDBAF= ****** GX
CS.LST= 040000   	FE.EXT= 000001   	K$$CNT= 177546   	PR6   = 000300   	$RDBCT= ****** GX
CS.MTL= 004000   	FE.EXV= 000004   	K$$CSR= 177546   	PR7   = 000340   	$RDBGT  000056RG
CS.RNG= 000010   	FE.LSI= 000400   	K$$LDC= 000000   	PS    = 177776   	$RDBLH= ****** GX
CS.ROV= 000004   	FE.MUP= 000002   	K$$TPS= 000074   	P$$P45= 000000   	$RDBQP  000164RG
CS.RSN= 010000   	FE.MXT= 040000   	LD$LP = 000000   	P$$WRD= 000000   	$RDBRT  000230RG
CS.SUC= 000001   	FE.NLG= 100000   	LF.ACT= 100000   	Q$$OPT= 000010   	$RDBSZ= ****** GX
CS.TMO= 020000   	FE.PKT= 000100   	LF.BWT= 000007   	R$$DER= 000000   	$RDBTH= ****** GX
C$$CKP= 000000   	FE.PLA= 000020   	LF.DLO= 000040   	R$$K11= 000001   	$RDBWT  000132RG
C$$ORE= 000400   	FS.AST= 000000   	LF.ENA= 002000   	R$$SND= 000000   	$RDQCT= ****** GX
C$$RSH= 177564   	FS.CIB= 002000   	LF.MDC= 000100   	R$$11M= 000000   	$SDBAF= ****** GX
C.BID   000003   	FS.CRA= 001000   	LF.MFL= 004000   	SISDR0= 172200   	$SDBCT= ****** GX
C.BUF   000014   	FS.DIS= 013000   	LF.MTP= 000020   	SR0   = 177572   	$SDBGT  000422RG
C.BUF1  000014   	FS.DVC= 001000   	LF.RDY= 040000   	SR3   = 172516   	$SDBLH= ****** GX
C.BUF2  000024   	FS.ENB= 012000   	LF.REA= 010000   	SWR   = 177570   	$SDBRT  000510RG
C.CNT   000020   	FS.GET= 006000   	LF.TIM= 000010   	S$$WRG= 000000   	$SDBSZ= ****** GX
C.CNT1  000020   	FS.INI= 000000   	LF.UNL= 020000   	S$$YSZ= 007600   	$SLTTA= ****** GX

. ABS.	000034	   000
      	000702	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  6319 WORDS  ( 25 PAGES)
DYNAMIC MEMORY:  6892 WORDS  ( 26 PAGES)
ELAPSED TIME:  00:00:22
CEBUF,[130,34]CEBUF/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,CEBUF
CEBUF      CREATED BY  MACRO  ON 13-OCT-79 AT 08:07	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

CB.CCB	= 000002	 10-306    
CB.RDB	= 000004	 9-258     
CF.EOM	= 000004	 13-443    
CF.LB 	= 100000	 9-262      13-443    
C.BID 	  000003	*9-258     *10-306    
C.BUF 	  000014	*9-252     *13-440    *13-441     14-469     14-470    
C.BUF2	  000024	 9-252     
C.CNT 	  000020	*9-259     *13-442    
C.CNT2	  000030	*9-260     
C.FLG 	  000022	*9-262     *13-443    
C.FNC 	  000010	*9-263     
FC.RCE	= 000002	 9-263     
FS.RTN	= 001000	 9-263     
KISAR6	= 172354	*11-351     12-395    *12-396    *12-399    
LF.ACT	= 100000	#3-47      
LF.BWT	= 000007	#3-47       8-212     
LF.DLO	= 000040	#3-47      
LF.ENA	= 002000	#3-47      
LF.MDC	= 000100	#3-47      
LF.MFL	= 004000	#3-47      
LF.MTP	= 000020	#3-47      
LF.RDY	= 040000	#3-47      
LF.REA	= 010000	#3-47      
LF.TIM	= 000010	#3-47      
LF.UNL	= 020000	#3-47      
L$$SI1	= ******	 4-74       6-132      6-137      6-146      9-264      9-277      10-308     10-311     11-337    
                         11-365     12-392     12-408    
L.CTL 	  000012	#3-47      
L.DDM 	  000002	#3-47      
L.DDS 	  000004	#3-47      
L.DLC 	  000003	#3-47      
L.DLM 	  000006	#3-47      
L.DLS 	  000010	#3-47      
L.FLG 	  000000	#3-47      
L.LEN 	= 000014	#3-47      
L.UNT 	  000013	#3-47      
M$$MGE	= 000000	 11-339     12-394    
PR7   	= 000340	 4-74       6-132      9-264      10-308     11-337     12-392    
PS    	= 177776	 4-74       4-74       6-132      6-132      6-137      6-146      9-264      9-264      9-277     
                         10-308     10-308     10-311     11-337     11-337     11-365     12-392     12-392     12-408    
X$$BUG	= ******	 9-245      9-254      10-301     12-387    
$CCBAF	= ******  GX	*4-77      
$CCBCT	= ******  GX	*4-81      *10-307    
$CCBGT	  000000 RG	#4-74       13-432    
$CCBLH	= ******  GX	 4-75      *4-80       10-309    *10-310    
$CCBRT	  000360 RG	#10-300     13-438     14-474    
$CSBGT	  000572 RG	#13-432    
$CSBRT	  000652 RG	#14-467    
$LDBAF	= ******  GX	*5-108     
$LDBGT	  000040 RG	#5-106     
$LDBRT	  000230 RG	#9-243     
$PDQUE	= ******  GX	 9-270     
CEBUF      CREATED BY  MACRO  ON 13-OCT-79 AT 08:07	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$RDBAF	= ******  GX	*6-144     
$RDBCT	= ******  GX	 5-106     *6-136     *9-276     
$RDBGT	  000056 RG	 5-107     #6-132     
$RDBLH	= ******  GX	 6-133     *6-135      9-274     *9-275     
$RDBQP	  000164 RG	#8-203     
$RDBRT	  000230 RG	#9-244     
$RDBSZ	= ******  GX	 9-259      9-260     
$RDBTH	= ******  GX	 5-106     
$RDBWT	  000132 RG	#7-172     
$RDQCT	= ******  GX	*7-180     *8-214      9-265     *9-269     
$SDBAF	= ******  GX	*11-363    
$SDBCT	= ******  GX	*11-359    *12-409    
$SDBGT	  000422 RG	#11-336     13-436    
$SDBLH	= ******  GX	 11-340     11-341    *11-352    *11-353     12-397     12-398    *12-400    *12-401    
$SDBRT	  000510 RG	#12-386     14-471    
$SDBSZ	= ******  GX	 13-442    
$SLTTA	= ******  GX	 7-178      8-210     
CEBUF      CREATED BY  MACRO  ON 13-OCT-79 AT 08:07	PAGE 3

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		 9-270      13-432     13-436     13-438     14-471    
CALLR 		#3-45      #14-474    
CCBDF$		#3-44       3-46      
ENABL$		#3-43      #6-137     #6-146     #9-277     #10-311    #11-365    #12-408    
HWDDF$		#3-44      #3-48      
INHIB$		#3-43       4-74       6-132      9-264      10-308     11-337     12-392    
RESRG 		#3-43      
RETURN		 6-139      6-148      7-182      8-217      9-278      10-312     11-366     12-410     13-446    
SAVRG 		#3-43      
SLTDF$		#3-44       3-47