Trailing-Edge
-
PDP-10 Archives
-
BB-P363B-SM_1985
-
mcb/drivers/dteini.b16
There are no other files named dteini.b16 in the archive.
module DTEINI ( ! DTE20 Driver Initialization
ident = 'X01070',
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 DTE Driver
!
! ABSTRACT:
!
! This module contains the DTE driver Initialization routines.
!
! ENVIRONMENT: MCB V3.2
!
! AUTHOR: Alan D. Peckham CREATION DATE: 13-Jun-81
!
! MODIFIED BY:
!
! Alan D. Peckham, 13-Jun-81: Version 1
! 01 - Split off from DTENMX module.
! 03 - Fix device register existence checking.
! 04 - Fix for getting device name for NMX functions.
! 05 - Save NMX PIX for later.
! 06 - Support system specific line counters.
! 07 - Zero counters on startup.
!--
!
! INCLUDE FILES:
!
library 'MCBLIB';
library 'XPORTX';
library 'NMXLIB';
library 'DTEDAT';
!
! TABLE OF CONTENTS:
!
linkage
DTE_CSR_NUM = jsr (register = 0, register = 1);
forward routine
DTEDBI : novalue,
DTEDVI,
DTENMI,
NXM_CATCHER,
REGISTER_NXM : DTE_CSR_NUM;
!
! MACROS:
!
! None
!
! EQUATED SYMBOLS:
!
literal
TRUE = 1 EQL 1,
FALSE = 1 EQL 0,
NO_OPERATION = 0;
!
! OWN STORAGE:
!
! None
!
! EXTERNAL REFERENCES:
!
external routine
DTEIN : MCB_INTERRUPT novalue;
external
MCB$GAW_PROCESS_DATA_BASE : vector [2],
MCB$GW_PROCESS_HANDLE;
bind
DB_BIAS = MCB$GAW_PROCESS_DATA_BASE [0];
macro
GET_DTE_DATA_BASE (NAME) =
%if %declared (NAME)
%then map NAME : ref
%else bind NAME = .MCB$GAW_PROCESS_DATA_BASE [1] :
%fi block field (D_FIELDS); %;
global routine DTEDBI : novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
! None
!
! IMPLICIT INPUTS:
! None
!
! IMPLICIT OUTPUTS:
! None
!
! ROUTINE VALUE:
! COMPLETION CODES:
! None
!
! SIDE EFFECTS:
! None
!--
begin
GET_DTE_DATA_BASE (DB)
DB [$SUB_FIELD (D_REGISTER, 0, 0, 5, 0)] = CSTOFF*%upval;
$NM_TIME (DB [D_TIME_LINE_ZEROED]);
end; !of routine DTEDBI
global routine DTEDVI =
!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
! None
!
! IMPLICIT INPUTS:
! None
!
! IMPLICIT OUTPUTS:
! None
!
! ROUTINE VALUE:
! COMPLETION CODES:
! None
!
! SIDE EFFECTS:
! None
!--
begin
GET_DTE_DATA_BASE (DB)
DB [D_DEVICE_STATE] = DD_CLEARED;
if .DB [D_REGISTER] lssa %o'160000'
then
begin
COUNTER_INCREMENT (DB, D_INVALID_CONTROLLER_REGISTER);
COUNTER_INCREMENT (DB, D_CONFIGURATION_ERRORS);
return FALSE
end;
if REGISTER_NXM ((.DB [D_REGISTER] and not %o'37'), 16)
then
begin
COUNTER_INCREMENT (DB, D_NXM_CONTROLLER_REGISTER);
COUNTER_INCREMENT (DB, D_CONFIGURATION_ERRORS);
return FALSE
end;
begin
local
STATUS;
STATUS = $MCB_SET_VECTOR (.DB [D_VECTOR], DTEIN, .DB [D_PRIORITY]);
if not .STATUS
then
begin
selectone .STATUS of
set
[CE$VEC]:
COUNTER_INCREMENT (DB, D_INVALID_VECTOR);
[CE$VCU]:
COUNTER_INCREMENT (DB, D_CONFLICTING_VECTOR);
[CE$PRI]:
COUNTER_INCREMENT (DB, D_INVALID_PRIORITY);
tes;
COUNTER_INCREMENT (DB, D_CONFIGURATION_ERRORS);
return FALSE
end;
end;
DB [D_DEVICE_STATE] = DD_RUNNING;
TRUE
end; !of routine DTEDVI
global routine DTENMI =
!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
! None
!
! IMPLICIT INPUTS:
! None
!
! IMPLICIT OUTPUTS:
! None
!
! ROUTINE VALUE:
! COMPLETION CODES:
! None
!
! SIDE EFFECTS:
! None
!--
begin
GET_DTE_DATA_BASE (DB)
local
NAME_BUFFER : vector [ch$allocation (17)],
NMXID,
NMXPIX;
bind
NAME_PTR = ch$ptr (NAME_BUFFER,, 8);
if not $MCB_GET_PROCESS_HANDLE (%rad50_11 'NMX', NMXPIX) then return FALSE;
DB [D_NMX_PIX] = .NMXPIX;
$MCB_GET_DEVICE_NAME (.DB [D_LINE_ENTITY], NAME_PTR);
NMX$CREATE_LINE (.NMXPIX, NAME_PTR, 0, NMXID);
NMX$MODIFY_LINE_PROVIDER (.NMXPIX, NAME_PTR,
.MCB$GW_PROCESS_HANDLE^8 + DTE_K_LINE_PROVIDER,
DB [D_LINE_ENTITY]);
NMX$MODIFY_LINE_OWNER (.NMXPIX, NAME_PTR,
.MCB$GW_PROCESS_HANDLE^8 + DTE_K_LINE_OWNER,
NMXID);
NMX$CREATE_CIRCUIT (.NMXPIX, NAME_PTR, 0, NMXID);
NMX$MODIFY_CIRCUIT_PROVIDER (.NMXPIX, NAME_PTR,
.MCB$GW_PROCESS_HANDLE^8 + DTE_K_CIRCUIT_PROVIDER,
DB [D_CIRCUIT_ENTITY]);
TRUE
end; !of routine DTENMI
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
routine REGISTER_NXM
!++
! FUNCTIONAL DESCRIPTION:
!
!
! FORMAL PARAMETERS:
(CSR : ref vector volatile,
NUM)
!
! IMPLICIT INPUTS:
! None
!
! IMPLICIT OUTPUTS:
! None
!
! ROUTINE VALUE:
: DTE_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