Google
 

Trailing-Edge - PDP-10 Archives - BB-R595B-SM_11-9-85 - mcb/xpt/xpe16.b16
There is 1 other file named xpe16.b16 in the archive. Click here to see a list.
module XPE16	(
		IDENT = 'X01140'
		) =
begin

!
!                    COPYRIGHT (c) 1980, 1981, 1982
!                    DIGITAL EQUIPMENT CORPORATION
!                        Maynard, Massachusetts
!
!     This software is furnished under a license and may  be  used
!     and copied only in accordance with the terms of such license
!     and with the inclusion of the above copyright notice.   This
!     software  or any other copies thereof may not be provided or
!     otherwise made available to any other person.  No  title  to
!     and ownership of the software is hereby transferred.
!
!     The information  in  this  software  is  subject  to  change
!     without  notice  and should not be construed as a commitment
!     by DIGITAL EQUIPMENT CORPORATION.
!
!     DIGITAL assumes no responsibility for the use or reliability
!     of  its  software  on  equipment  which  is  not supplied by
!     DIGITAL.
!

!++
! FACILITY:	Transport
!
! ABSTRACT:
!
!	16-bit or RSX-11M dependent routines for transport
!
! ENVIRONMENT:	MCB
!
! AUTHOR: L. Webber , CREATION DATE: 20-Jul-79
!
! MODIFIED BY:
!
!	20-Jul-79 : VERSION 1.00
!
! 1.01	L. Webber, 21-Oct-80
!	Change C_BUF and C_BUFA references to C_BIAS and C_ADDR
!
! 1.02	L. Webber, 11-Dec-80
!	Modify to support MCB 3.1
!
! 1.03	L. Webber, 11-Feb-81
!	Made XPT16 into three parallel modules: XPT16, TLI16 and XPE16.
!	This mod. also comprises the addition of several new entry points
!	over the last year.  This is the last of the identically numbered
!	mods. for the three -16 modules.
!
! 1.04	L. Webber, 11-Feb-81
!	Delete entries GET_EX, GET_BLK, GETSDB, RETSDB, $CDBV, GETXDB and
!	$CBDMG from the XPE -16 module.
!
! 1.05	L. Webber, 23-Feb-81
!	Fix LOG_EVENT class and event buffer specification.
!
! 1.06	L. Webber, 25-Feb-81
!	Move $CDBV and $CBDMG over from XPT16
!
! 1.07	L. Webber, 27-Feb-81
!	Make $CDBV and $CBDMG CALL$
!
! 1.08	L. Webber, 16-Mar-81
!	Add UNSPAWN routine
!
! 1.09	L. Webber, 3-Apr-81
!	Signal the ENTITY in LOG_EVENT.
!
! 1.10	L. Webber, 30-Jun-81
!	Fix UNSPAWN to return a buffer of the right length.
!
! 1.11	L. Webber, 24-Sep-81
!	Take out routines EP_REASON, EP_EXNODE.
!
! 1.12	L. Webber, 24-Sep-81
!	Take out reference to Event_Buffer in LOG_EVENT.
!
! 1.13	A. Peckham, 19-Apr-82
!	Add XPT$GET_LINE_DB and XPT$GET_NODE_DB routines.
!	Move $CBDMG and $CDBV back to XPT16.
!
! 1.14	A. Peckham, 6-May-82
!	Eliminate GETLINE, GETNODE, LOG_EVENT, MAPIN, RLS_BLK.
!
!--
!
! INCLUDE FILES:
!

require 'XPTMAC';

!
! TABLE OF CONTENTS
!

forward routine
	XPT$GET_LINE_DB: XPT$LKG_NUM,
	XPT$GET_NODE_DB: XPT$LKG_NUM;

!
! MACROS:
!

!
! EQUATED SYMBOLS:
!

!
! OWN STORAGE:
!

!
! EXTERNAL REFERENCES:
!
global routine XPT$GET_LINE_DB (LINE) : XPT$LKG_NUM =

!++
! FUNCTIONAL DESCRIPTION:
!
! Returns the base address of the line data base entry for
! the specified line
!
! FORMAL PARAMETERS
!
!	LINE	Line number whose data base entry is to be
!		located
!
! IMPLICIT INPUTS
!
!	XPTDB
!
! ROUTINE VALUE:
!
!	The address of the line data base entry for .LINE
!
! SIDE EFFECTS:
!
!	NONE.
!
!--

begin
require 'XPTSYM';

LINE = .LINE - 1;
if .LINE lssu NLN
then
    begin
    LINE = .LINE*LINElength;
    .XPTDB[XPTlindb] + .LINE
    end
else
    0
end;				!End of XPT$GET_LINE_DB
global routine XPT$GET_NODE_DB (NODE) : XPT$LKG_NUM =

!++
! FUNCTIONAL DESCRIPTION:
!
! Returns the base address of the node data base entry for
! the specified node number
!
! FORMAL PARAMETERS
!
!	NODE	Node number of the node whose data base is to be
!		located
!
! IMPLICIT INPUTS
!
!	XPTDB
!
! ROUTINE VALUE:
!
!	Address of the node data base entry for .NODE
!
! SIDE EFFECTS:
!
!	NONE.
!
!--

begin
require 'XPTSYM';

NODE = .NODE - 1;
if .NODE lssu NN
then
    begin
    NODE = .NODE*NODElength;
    .XPTDB[XPTnoddb] + .NODE
    end
else
    0
end;				!End of XPT$GET_NODE_DB
global routine UNSPAWN(CCB): novalue =

!++
! FUNCTIONAL DESCRIPTION:
!
! Untangles a CCB spawned by Transport:
!
!	1.  If the CCB has a buffer of its own, release it.
!	2.  If the pass-through CCB (the one the spawned CCB points to)
!	    has had its buffer pointer adjusted, un-adjust it.
!	3.  Release the spawned CCB.
!
! FORMAL PARAMETERS
!
!	CCB	Address of the spawned CCB.
!
! IMPLICIT INPUTS
!
!	NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
!	NONE.
!
! SIDE EFFECTS:
!
!	NONE.
!
!--

begin

map CCB: ref block field(C_XPT_fields);
bind CCB_P = .CCB[C_STK]: block field(C_fields);
local ADJ;

if ((ADJ=.CCB[C_XPT_ADJUST]) neq 0) then begin  ! Nonzero adjustment factor:
    CCB_P[C_ADDR] = ch$plus(.CCB_P[C_ADDR],-.ADJ); !   readjust pass-through
    CCB_P[C_CNT] = .CCB_P[C_CNT] + .ADJ;	   !   buffer descriptor
    end;
if ((.CCB[C_CHN] neq 0)			! If the spawned CCB
and (.CCB[C_BIAS] neq 0)) then		!   has an SDB of
    $MCB_RETURN_CCB_AND_BUFFER		!   its own, release
	(.CCB[C_XPT_ALLOCATION],.CCB)	!   them both
else $MCB_RETURN_CCB(.CCB);		! Otherwise, just release the CCB

end;				!End of UNSPAWN

end				!End of module XPE16
eludom