Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/drivers/kdpini.b16
There are no other files named kdpini.b16 in the archive.
module KDPINI (	! KMC11/DUP11 Driver Initialization
		ident = 'X04030',
		language (bliss16)
		) =
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: MCB KDP Driver
!
! ABSTRACT:
!
!	This is the DDM process which services the KMC11 microprocessor
!	which controls DUP11 synchronous line devices.
!
! ENVIRONMENT: MCB V3.0
!
! AUTHOR: Alan D. Peckham	CREATION DATE: 9-Mar-81
!
! MODIFIED BY:
!
!	S. I. GOLDFARB, 25-MAR-1977
!	R. H. ROSENBAUM, 30-AUG-1977
!	L. J. TWAITS, 10-SEP-1977
!	D. B. TUTTLE, 10-OCT-1977
!
!	Alan D. Peckham, 9-Mar-81: Version 4
! 01	- Split off from KDP module.
! 02	- Avoid NXM signal unwinding by using flag (.CRDSP).
! 03	- Get NMXID for event logging.
!--
!
! INCLUDE FILES:
!

library 'MCBLIB';

library 'XPORT';

library 'NMXLIB';

library 'KDPDAT';

!
! TABLE OF CONTENTS:
!

forward routine
    KDPNMI,
    NXM_CATCHER,
    REGISTER_NXM : KDP_CSR_NUM;

!
! MACROS:
!

!
! EQUATED SYMBOLS:
!

literal
    FALSE = 1 EQL 0,
    NO_OPERATION = 0,
    TRUE = 1 EQL 1;

!
! OWN STORAGE:
!

!
! EXTERNAL REFERENCES:
!

external
    MCB$GAW_PROCESS_DATA_BASE : vector [2],
    MCB$GW_PROCESS_HANDLE;

bind
    DB_BIAS = %name ('.CRDAT') [0];

macro
    GET_DUP_DATA_BASE (NAME) =
	%if %declared (NAME)
	%then map NAME : ref DUP_DATA_BASE
	%else bind NAME = .MCB$GAW_PROCESS_DATA_BASE [1] : DUP_DATA_BASE
	%fi %,
    GET_KMC_DATA_BASE (NAME) =
	%if %declared (NAME)
	%then map NAME : ref KMC_DATA_BASE
	%else bind NAME = .MCB$GAW_PROCESS_DATA_BASE [1] : KMC_DATA_BASE
	%fi %;
global routine KDPNMI =

!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!	None
!
! IMPLICIT INPUTS:
!	None
!
! IMPLICIT OUTPUTS:
!	None
!
! ROUTINE VALUE:
! COMPLETION CODES:
!	None
!
! SIDE EFFECTS:
!	None
!--

    begin
    GET_DUP_DATA_BASE (DB);

    local
	NAME_BUFFER : vector [ch$allocation (17)],
	NMXID,
	NMXPIX,
	SAVE_MAP;

    bind
	NAME_PTR = ch$ptr (NAME_BUFFER);

    if not $MCB_GET_PROCESS_HANDLE (%rad50_11 'NMX', NMXPIX) then return FALSE;

    SMAP$ (SAVE_MAP);
    MAP$ (.DB [D_EXT_BIAS]);
    $MCB_GET_DEVICE_NAME (.block [.DB [D_EXT_ADDR], E_ENTITY], NAME_PTR);
    NMX$OBTAIN_LINE_PROVIDER (.NMXPIX, NAME_PTR, NMXPIX, NMXID);
    block [.DB [D_EXT_ADDR], E_ENTITY] = .NMXID;
    MAP$ (.SAVE_MAP);
    TRUE
    end;			!of routine KDPNMI
routine NXM_CATCHER (SIG, MCH, ENB) =

!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
!	SIG = signal vector address
!	MCH = mechanism vector address
!	ENB = enable vector address
!
! IMPLICIT INPUTS:
!	None
!
! IMPLICIT OUTPUTS:
!	None
!
! ROUTINE VALUE:
! COMPLETION CODES:
!	None
!
! SIDE EFFECTS:
!	None
!--

    begin

    map
	ENB : ref vector,
	MCH : ref vector,
	SIG : ref vector;

    if .SIG [1] neq SS$NXM then return FALSE;

    .ENB [1] = TRUE;
    TRUE
    end;			!of routine NXM_CATCHER
global routine REGISTER_NXM

!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
       (CSR : ref vector volatile,
	NUM)
!
! IMPLICIT INPUTS:
!	None
!
! IMPLICIT OUTPUTS:
!	None
!
! ROUTINE VALUE:
	: KDP_CSR_NUM =
!
! SIDE EFFECTS:
!	None
!--

    begin

    local
	FLAG : volatile, %(BLISS initializes to 0 = FALSE)%
	TEMP;

    enable
	NXM_CATCHER (FLAG);

    do
	begin
	TEMP = .CSR [0];
	CSR = CSR [1];
	end
    while (NUM = .NUM - 1) nequ 0;

    .FLAG
    end;			!of routine REGISTER_NXM
end
eludom