Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11m-bm - t20src/m20int.b36
There are 7 other files named m20int.b36 in the archive. Click here to see a list.
module NMUINT (					! Interrupt handling facility
		ident = 'X00.01'
		) =
begin
!	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1985, 1989.
!	ALL RIGHTS RESERVED.
!
!	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 THAT IS NOT SUPPLIED BY DIGITAL.
!++
! 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

library 'MONSYM';			! Monitor symbols

library 'MXJLNK';			! JSYS linkage definitions

!
! 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
    CRSPTR,
    NMLDIE,
    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') : novalue =

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

    begin
    local
         TASK : ref TASK_BLOCK;

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

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

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

    begin
    local
         TASK : ref TASK_BLOCK;

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

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

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

    begin
    local
         TASK : ref TASK_BLOCK;

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

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

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

    begin
    local
         TASK : ref TASK_BLOCK;

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

    TASK [TB_ERROR_PC] = .LEV1PC <0, 18, 0>;
    LEV1PC = NMLDIE;
    end;					! End of ILL_MREF
%routine ('SYS_FAILURE') : novalue =

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

    begin
    local
         TASK : ref TASK_BLOCK;

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

    TASK [TB_ERROR_PC] = .LEV1PC <0, 18, 0> - 1;
    LEV1PC = NMLDIE;
    end;					! End of SYS_FAILURE
end						! End of module NMUINT

eludom