Google
 

Trailing-Edge - PDP-10 Archives - cuspjul86upd_bb-jf24a-bb - 10,7/decmai/mx/mxnint.bli
There are 2 other files named mxnint.bli in the archive. Click here to see a list.
!DSKT:NMUINT.BLI[10,6026,NML703], 14-Sep-84 10:25:04, Edit by DAVENPORT
!
!	Integrate TOPS-10 and TOPS-20 versions of NMUINT.
!
!NET:<DECNET20-V3P1.NMU>NMUINT.BLI.2 16-Jun-81 13:05:55, Edit by JENNESS
!
!    Change completely to simpler form of interrupt handling.
!
module NMUINT (					! Interrupt handling facility
		ident = 'X00.01'
		) =
begin
!
!                       Copyright (C) 1981 BY
!    DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS  01754
!
! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE
! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY 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
! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE
! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES
! REMAIN IN DEC.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT
! CORPORATION.
!
! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
!

!++
! Facility: LSG DECnet Network Management
!
! Abstract:
!
!       This set of routines provides an interface to the
!       software interrupt system.
!
! Environment: TOPS20 user mode
!
! Author: Steven M. Jenness, Creation date: 18 August 1980
!
!--

!
! Include files
!

library 'MXNLIB';			! All required definitions

%if $TOPS20
    %then
	library 'MONSYM';		! Monitor symbols
	library 'MXJLNK';		! JSYS linkage definitions
    %fi

!
! Global routines
!

forward routine
    NMU$INTERRUPT_INITIALIZE : novalue;

!
! Local routines
!

forward routine
    ARITH_OVRFLW: novalue,		! Arithmetic error interrupt
    PDL_OVRFLW: novalue,		! Stack overflow
    ILL_INST: novalue,			! Illegal instruction
    ILL_MREF: novalue,			! Illegal memory reference
    SYS_FAILURE : novalue;		! System resource failure

!
! Own variables
!

INTERRUPT_DATA_BASE;				! Setup interrupt data base

!
! Global variables
!

global
    INTNST;				! Nesting count for PION/PIOFF

!
! External references
!

external routine
    NMU$TEXT_MANAGER,
    NMU$SCHED_MANAGER;

%global_routine ('NMU$INTERRUPT_INITIALIZE') : novalue =

!++
! Functional description:
!
!	This routine in initializes the interrupt system and
!	clears any pending interrupts.  The interrupt system
!       is enabled on completion of this routine.
!
! Formal parameters: none
!
! Routine value: none
! Side effects: none
!
!--

    begin
!
! Clear current state of interrupt system
!
    CLEAR_INTERRUPT_SYSTEM;
!
! Initialize interrupt system and data base
!
    INITIALIZE_INTERRUPT_SYSTEM;
!
! Set up calls for panic interrupts
!

    ARITHMETIC_OVERFLOW (ARITH_OVRFLW);
    STACK_OVERFLOW (PDL_OVRFLW);
    ILLEGAL_INSTRUCTION (ILL_INST);
    ILLEGAL_MEMORY_REFERENCE (ILL_MREF);
    SYSTEM_RESOURCE_FAILURE (SYS_FAILURE);
    end;					! End of NMU$INTERRUPT_INITIALIZE

%routine ('ARITH_OVRFLW', PC, ARG) : novalue =

!++
! Functional description:
!
!	This is the routine that receives that Panic interrupt
!	when an arithmetic error occurs in the process.
!
! Formal parameters:
!
!	PC		Address when interrupt PC is stored
!
! Routine value: none
! Side effects: none
!
!--

    begin
    external
	NMLDIE;
    local
         TASK : ref TASK_BLOCK;

    TASK = CURRENT_TASK;
    $NMU$TEXT (%ref (ch$ptr (TASK [TB_ERROR_BUFFER])),
		100,
		'Arithmetic overflow at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

%if not $MCB
%then
    TASK_INFO (ch$ptr (TASK [TB_ERROR_BUFFER]));
%fi

    TASK [TB_ERROR_PC] = .(.PC) <0, 18, 0> - 1;
    .PC = NMLDIE;
    end;					! End of ARITH_OVRFLW
%routine ('PDL_OVRFLW', PC, ARG) : novalue =

!++
! Functional description:
!
!	This is the routine that receives the push down list
!	overflow Panic interrupt.
!
! Formal parameters: none
!
!	PC		Address when interrupt PC is stored
!
! Routine value: none
! Side effects: none
!
!--

    begin
    external
	NMLDIE;
    local
         TASK : ref TASK_BLOCK;

    TASK = CURRENT_TASK;
    $NMU$TEXT (%ref (ch$ptr (TASK [TB_ERROR_BUFFER])),
		100,
		'Stack overflow at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

%if not $MCB
%then
    TASK_INFO (ch$ptr (TASK [TB_ERROR_BUFFER]));
%fi

    TASK [TB_ERROR_PC] = .(.PC) <0, 18, 0> - 1;
    .PC = NMLDIE;
    end;					! End of PDL_OVRFLW
%routine ('ILL_INST', PC, ARG) : novalue =

!++
! Functional description:
!
!	This is the routine that receives the illegal instruction
!	trap Panic interrupts.
!
! Formal parameters: none
!
!	PC		Address when interrupt PC is stored
!
! Routine value: none
! Side effects: none
!
!--

    begin
    local
         TASK : ref TASK_BLOCK;

    TASK = CURRENT_TASK;
    $NMU$TEXT (%ref (ch$ptr (TASK [TB_ERROR_BUFFER])),
		100,
		'Illegal instruction at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

    TASK [TB_ERROR_PC] = .(.PC) <0, 18, 0> - 1;
    .PC = NMU$SCHED_COMPLETE;
    end;					! End of ILL_INST
%routine ('ILL_MREF', PC, ARG) : novalue =

!++
! Functional description:
!
!	This is the routine that receives the illegal memory
!	reference Panic interrupts.
!
! Formal parameters: none
!
!	PC		Address when interrupt PC is stored
!
! Routine value: none
! Side effects: none
!
!--

    begin
    local
         TASK : ref TASK_BLOCK;

    TASK = CURRENT_TASK;
    $NMU$TEXT (%ref (ch$ptr (TASK [TB_ERROR_BUFFER])),
		100,
		'Illegal memory reference at PC: %(6)P',
		.(.PC) <0, 18, 0>);

    TASK [TB_ERROR_PC] = .(.PC) <0, 18, 0>;
    .PC = NMU$SCHED_COMPLETE;
    end;					! End of ILL_MREF
%routine ('SYS_FAILURE', PC, ARG) : novalue =

!++
! Functional description:
!
!	This is the routine that receives the system
!	resource failure Panic interrupts.
!
! Formal parameters: none
!
!	PC		Address when interrupt PC is stored
!
! Routine value: none
! Side effects: none
!
!--

    begin
    local
         TASK : ref TASK_BLOCK;

    TASK = CURRENT_TASK;
    $NMU$TEXT (%ref (ch$ptr (TASK [TB_ERROR_BUFFER])),
		100,
		'System resource failure at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

    TASK [TB_ERROR_PC] = .(.PC) <0, 18, 0> - 1;
    .PC = NMU$SCHED_COMPLETE;
    end;					! End of SYS_FAILURE
end						! End of module NMUINT

eludom