Google
 

Trailing-Edge - PDP-10 Archives - BB-JR93K-BB_1990 - 10,7/decmai/mx/m10int.b36
There are 5 other files named m10int.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

%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
    CRSPC,
    CRSPTR;

external routine
    NMLDIE: NOVALUE,
    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
    local
         TASK : ref TASK_BLOCK;

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

    TASK [TB_ERROR_PC] = CRSPC = .(.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
    local
         TASK : ref TASK_BLOCK;

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

    TASK [TB_ERROR_PC] = CRSPC = .(.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 (CRSPTR = TASK [TB_ERROR_BUFFER])),
		100,
		'Illegal instruction at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

    TASK [TB_ERROR_PC] = CRSPC = .(.PC) <0, 18, 0> - 1;
    .PC = NMLDIE;
    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 (CRSPTR = TASK [TB_ERROR_BUFFER])),
		100,
		'Illegal memory reference at PC: %(6)P',
		.(.PC) <0, 18, 0>);

    TASK [TB_ERROR_PC] = CRSPC = .(.PC) <0, 18, 0>;
    .PC = NMLDIE;
    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 (CRSPTR = TASK [TB_ERROR_BUFFER])),
		100,
		'System resource failure at PC: %(6)P',
		.(.PC) <0, 18, 0> - 1);

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