Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-08 - 43,50512/pickup.b36
There are no other files named pickup.b36 in the archive.
MODULE PICKUP=
!Routine to pick up dropped interrupts and simulate them
!This is for use with PISSISER on TOPS-10
!without which this would not have been necessary
BEGIN
!
! Table of Contents
!
FORWARD ROUTINE
PICKUP;

!
! Conditional compilation
!
COMPILETIME FTDEBUG=-1;

!
! Require & Library files
!
REQUIRE 'INTR.REQ';
!
! Version
!
THIS_IS [PICK]	VERSION [1]	EDIT [2]	DATE [8,AUG,78]

!
! Revision history
!
%(
[2]	Additional control over debug messages printed from here
)%

!
! Global data
!
GLOBAL
	VIPTYPE,	!Type out 'VIP left on' if MESSAGE DEBUG set
	DRPTYPE,	!Type out 'dropped interrupt detected if MESSAGE DEBUG
	VIPCNT,		!# of times PS.VIP was left on
	DRPCNT;		!# of dropped interrupts
!
! Literals
!

!
! Macros
!
MACRO PREFIX='PIK'%;

!
! Externals
!
!EXTERNAL ROUTINE
!	INTSIG;
!EXTERNAL INTMAX;
!EXTERNAL INTVEC: INTVECSTR[30], INTTBL: VECTOR[30];

!
! Routines
!


GLOBAL ROUTINE PICKUP=
!Routine to pick up dropped interrupts and simulate them
!This is for use with PISSISER on TOPS-10
!without which this would not have been necessary
BEGIN
INCR I FROM 0 TO (INTMAX-1) DO
	BEGIN
	!See if any bits are on.  If so do INTSIG.
	LOCAL J;
	J=.I*4;

	IF .INTVEC[.J,INTVEC$VIP] THEN
		BEGIN
		IF .VIPTYPE
		 THEN	DEBUGMSG(
			 WRN_NCRLF('VIP left on (');TNUM(.J,8);TYPE(')',CRLF));
		VIPCNT=.VIPCNT+1;
		END;

	IF .INTVEC[.J,INTVEC$REASON] NEQ 0 THEN
		BEGIN
		BIND INT=.INTTBL[.I]: INT_BLOCK;	!Get block for interrupt
		IF .DRPTYPE
		 THEN	DEBUGMSG(WRN_NCRLF('Dropped interrupt detected (');
			 TNUM(.J,8);TYPE(')',CRLF));
		DRPCNT=.DRPCNT+1;
		IF INT NEQ 0
		 THEN INTSIG(INT)			!Make it happen
		 ELSE	BEGIN
			INTVEC[.J,INTVEC$REASON]=0;	!Shouldn't happen
			DEBUGMSG(WRN('No interrupt block'));
			END;
		END
	END;
END;
END ELUDOM