Google
 

Trailing-Edge - PDP-10 Archives - BB-R595B-SM_11-9-85 - mcb/xpt/tli16.b16
There is 1 other file named tli16.b16 in the archive. Click here to see a list.
module TLI16	(
		IDENT = 'X01100'
		) =
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 GETSDB, RETSDB, $CDBV, MAPIN, GETXDB, and $CBDMG
!	from the TLI -16 module.
!
! 1.05	L. Webber, 23-Feb-81
!	Fix LOG_EVENT class and event buffer specification.
!
! 1.06	L. Webber, 3-Apr-81
!	Signal the ENTITY value in LOG_EVENT.
!
! 1.07	L. Webber, 24-Sep-81
!	Take out routines EP_VERSION, EP_RCVNOD, EP_REASON.
!
! 1.08	L. Webber, 24-Sep-81
!	Take out reference to Event_Buffer in LOG_EVENT.
!
! 1.09	A. Peckham, 19-Apr-82
!	Add XPT$GET_LINE_DB and XPT$GET_NODE_DB routines.
!
! 1.10	A. Peckham, 6-May-82
!	Eliminate GETLINE, GETNODE, LOG_EVENT, RLS_BLK, GET_BLK, OC_ADD.
!
!--
!
! INCLUDE FILES:
!

require 'XPTMAC';

!
! TABLE OF CONTENTS
!

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

!
! 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 GET_EX (PTR) =

!++
! FUNCTIONAL DESCRIPTION:
!
!  Gets an extended field of up to 2 bytes (14 significant bits)
!
! FORMAL PARAMETERS
!
!	PTR - Character pointer to message from which the extended
!	      field is to be fetched
!
! IMPLICIT INPUTS
!
!	NONE.
!
! ROUTINE VALUE: Value of the field or failure code
! COMPLETION CODES:
!
!	> 0	Value of the extended field
!	< 0	Failure - field was too long
!
! SIDE EFFECTS:
!
!	PTR is updated to point past the field
!
!--

begin

local WORK,RET;
pointer P;
P = ..PTR;

WORK = getb(P);
if biton(.WORK,%o'200') then begin	!Extension on -
    WORK<7,8> = getb(P);		!  Get next byte
    if biton(.WORK,%o'40000') then RET = -1 !  Extension on here - return error
    else RET = .WORK;
    end
else RET = .WORK;

.PTR = .P;			!Update pointer
.RET
end;				!End of GET_EX
end				!End of module TLI16
eludom