Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/cex/cexint.lst
There are no other files named cexint.lst in the archive.
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21
CEXINT.M11    29-DEC-82 16:00		TABLE OF CONTENTS

  2648		DECLARATIONS
  2697		$EX10	- Illegal Instruction Exception
  2737		$EX114	- Parity Error Exception
  2783		$EX14	- Breakpoint or T-bit Exception
  2823		$EX20	- IOT Instruction Exception
  2863		$EX24	- Power failure Exception
  2910		$EX250	- Segment Fault Exception
  2952		$EX30	- EMT Instruction Exception
  2997		$EX34	- TRAP Instruction Exception
  3044		$EX4	- Odd Address or Stack Overflow Exception
  3093		$INTCE - Dispatch an interrupt
  3192		$INTDS - Inhibit Interrupts for given Priority
  3244		$INTEN - Allow Interrupts for given Priority
  3294		$SYNCH - Synchronize with process
  3356		CEXSV	- Spring an Interrupt SIGNAL
  3402		TESTM	- Test if in EXEC Mode
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 1
CEXINT.M11    29-DEC-82 16:00

     1						.TITLE	CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER
     2						.IDENT	/003160/
     3						.ENABL	LC
     4
     5					;
     6					;                    COPYRIGHT (c) 1980, 1981, 1982
     7					;                    DIGITAL EQUIPMENT CORPORATION
     8					;                        Maynard, Massachusetts
     9					;
    10					;     This software is furnished under a license and may  be  used
    11					;     and copied only in accordance with the terms of such license
    12					;     and with the inclusion of the above copyright notice.   This
    13					;     software  or any other copies thereof may not be provided or
    14					;     otherwise made available to any other person.  No  title  to
    15					;     and ownership of the software is hereby transferred.
    16					;
    17					;     The information  in  this  software  is  subject  to  change
    18					;     without  notice  and should not be construed as a commitment
    19					;     by DIGITAL EQUIPMENT CORPORATION.
    20					;
    21					;     DIGITAL assumes no responsibility for the use or reliability
    22					;     of  its  software  on  equipment  which  is  not supplied by
    23					;     DIGITAL.
    24					;
    25
    26					;++
    27					; FACILITY: MCB Communications Executive
    28					;
    29					; FUNCTIONAL ABSTRACT:
    30					;
    31					;	This module contains the routines to handle processor
    32					;	exceptions, device interrupts, and process synchronization
    33					;	requests.
    34					;
    35					; ENVIRONMENT: RSX kernel mode with EIS
    36					;
    37					; AUTHOR: Alan D. Peckham, CREATION DATE: 21-MAR-80
    38					;
    39					; MODIFIED BY:
    40					;
    41					;	Alan D. Peckham, 8-Jul-80: VERSION 3.0
    42					; 01	- Globalize references to I/O page.
    43					; 02	- Remove LIX requirement from $SYNCH.
    44					; 03	- Add "active SYNCH block" flag support and diagnostic crash.
    45					; 04	- Update CRSH$S contexts.
    46					; 05	- Add processor exception handlers.
    47					; 06	- Have exception routine funnel through INTR in CEXSGE.
    48					;	  Add power failure handler with check for DTE "magic finger".
    49					; 07	- Rename SS$ODD to SS$NXM.
    50					; 08	- Rename SS$OVR to SS$STK.
    51					;	  Eliminate direct access to PS.
    52					;	  Change support for X.PRI in $INTCE.
    53					; 09	- Handle parity errors.
    54					; 10	- Save MMU registers in proper order in $EX250.
    55					;	  Pop resume address off of stack if CE$SYN error detected.
    56					;	Alan D. Peckham, 10-Dec-80: VERSION 3.1
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 1-1
CEXINT.M11    29-DEC-82 16:00

    57					; 11	- Alter input conditions for $SYNCH routine.
    58					;	  Change interrupt handler to use interrupt priority blocks.
    59					; 12	- Do checking to catch a under-prioritized device.
    60					; 13	- Fix test polarity in deciding a priority violation.
    61					;	  Add mapped DDM data base support.
    62					;	Alan D. Peckham, 30-Jan-80: VERSION 3.2
    63					; 14	- Priority violation test was not fixed in $INTCE.
    64					;	  Fix offset bug in $EX30, $EX34.
    65					;	  Support new SYNCH block in $SYNCH.
    66					; 15	- Fix bugs in $EX30, $EX34 to back up PC before fetching instruction.
    67					;	  Catch RSX in user mode before checking for active CEX in TESTM.
    68					; 16	- Add support for interrupts serviced statistics in $INTCE.
    69					;--
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 2
CEXINT.M11    29-DEC-82 16:00		DECLARATIONS

    71						.SBTTL	DECLARATIONS
    72
    73					;
    74					; INCLUDE FILES:
    75					;
    76
    77						.MCALL	CRSH$S
    78						.GLOBL	$DQLM1,$DQLM2,$DRLM1,$DRLM2,$HEADR,$INTX1,$STACK,$STKDP
    79						.GLOBL	$EMTRP,$ILINS,$IOTRP,$SGFLT,$TRACE,$TRP04,$TRTRP
    80						.GLOBL	KISAR5,SR0,SR1,SR2,V$$CTR,$STOP
    81
    82					;
    83					; MACROS:
    84					;
    85
    86						.MACRO	CEXGO$ sts,cnt
    87						CALL	CEXG'cnt
    88							sts
    89						.ENDM	CEXGO$
    90
    91						.MACRO	CEXSV$
    92						.ENDM	CEXSV$
    93
    94						.MACRO	TESTM adr
    95						JSR	R5,TESTM
    96						.WORD	adr
    97						.ENDM	TESTM
    98
    99					;
   100					; EQUATED SYMBOLS:
   101					;
   102					;	None
   103					;
   104					; OWN STORAGE:
   105					;
   106
   107						.GLOBL	.DTERG		; Master DTE that can "finger" us.
   108						.GLOBL	.INTCB		; Interrupt priority block list.
   109						.GLOBL	.INTC4		; Priority 4 block
   110						.GLOBL	.INTC5		; Priority 5 block
   111						.GLOBL	.INTC6		; Priority 6 block
   112						.GLOBL	.INTC7		; Priority 7 block
   113
   114					;
   115					; VALIDATION DECLARATIONS:
   116					;
   117						.IIF	NE,<X.PDB-4>,.ERROR X.PDB; must follow dispatch JSR
   118						.IIF	NE,<X.DSP-X.PDB-2>,.ERROR X.DSP; must follow X.PDT word
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 3
CEXINT.M11    29-DEC-82 16:00		$EX10	- ILLEGAL INSTRUCTION EXCEPTION

   120						.SBTTL	$EX10	- Illegal Instruction Exception
   121					;++
   122					; FUNCTIONAL DESCRIPTION:
   123					;
   124					;	None
   125					;
   126					; CALLING SEQUENCE:
   127					;
   128					;	None
   129					;
   130					; INPUT PARAMETERS:
   131					;
   132					;	None
   133					;
   134					; IMPLICIT INPUTS:
   135					;
   136					;	None
   137					;
   138					; OUTPUT PARAMETERS:
   139					;
   140					;	None
   141					;
   142					; IMPLICIT OUTPUTS:
   143					;
   144					;	None
   145					;
   146					; CONDITION CODES:
   147					;
   148					;	None
   149					;
   150					; SIDE EFFECTS:
   151					;
   152					;	None
   153					;--
   154
   155		000000'				.PSECT	$CODE$,I,RO
   156	000000'				$EX10::	TESTM	$ILINS		;;; check if RSX should handle it.
   157	000006'					CEXSV$			;;;
   158	000006'					CEXGO$	SS$INS,1	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 4
CEXINT.M11    29-DEC-82 16:00		$EX114	- PARITY ERROR EXCEPTION

   160						.SBTTL	$EX114	- Parity Error Exception
   161					;++
   162					; FUNCTIONAL DESCRIPTION:
   163					;
   164					;	None
   165					;
   166					; CALLING SEQUENCE:
   167					;
   168					;	None
   169					;
   170					; INPUT PARAMETERS:
   171					;
   172					;	None
   173					;
   174					; IMPLICIT INPUTS:
   175					;
   176					;	None
   177					;
   178					; OUTPUT PARAMETERS:
   179					;
   180					;	None
   181					;
   182					; IMPLICIT OUTPUTS:
   183					;
   184					;	None
   185					;
   186					; CONDITION CODES:
   187					;
   188					;	None
   189					;
   190					; SIDE EFFECTS:
   191					;
   192					;	None
   193					;--
   194
   195		000014'				.PSECT	$CODE$,I,RO
   196	000014'				$EX114::CEXSV$			;;;
   197	000014'					PUSH$S	R0
   198	000016'	012700	000040G			MOV	#$PARTB+2+<15.*2>,R0 ;;;
   199	000022'				10$:	PUSH$S	@-(R0)		;;;
   200	000024'	022700	000002G			CMP	#$PARTB+2,R0	;;;
   201	000030'	103774				BLO	10$		;;;
   202	000032'	016600	000036			MOV	<15.*2>(SP),R0	;;;
   203	000036'	017766	000040G	000036		MOV	@$PARTB+2+<15.*2>,<15.*2>(SP) ;;;
   204	000044'					CEXGO$	SS$MPE,21	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 5
CEXINT.M11    29-DEC-82 16:00		$EX14	- BREAKPOINT OR T-BIT EXCEPTION

   206						.SBTTL	$EX14	- Breakpoint or T-bit Exception
   207					;++
   208					; FUNCTIONAL DESCRIPTION:
   209					;
   210					;	None
   211					;
   212					; CALLING SEQUENCE:
   213					;
   214					;	None
   215					;
   216					; INPUT PARAMETERS:
   217					;
   218					;	None
   219					;
   220					; IMPLICIT INPUTS:
   221					;
   222					;	None
   223					;
   224					; OUTPUT PARAMETERS:
   225					;
   226					;	None
   227					;
   228					; IMPLICIT OUTPUTS:
   229					;
   230					;	None
   231					;
   232					; CONDITION CODES:
   233					;
   234					;	None
   235					;
   236					; SIDE EFFECTS:
   237					;
   238					;	None
   239					;--
   240
   241		000052'				.PSECT	$CODE$,I,RO
   242	000052'				$EX14::	TESTM	$TRACE		;;; check if RSX should handle it.
   243	000060'					CEXSV$			;;;
   244	000060'					CEXGO$	SS$BPT,1	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 6
CEXINT.M11    29-DEC-82 16:00		$EX20	- IOT INSTRUCTION EXCEPTION

   246						.SBTTL	$EX20	- IOT Instruction Exception
   247					;++
   248					; FUNCTIONAL DESCRIPTION:
   249					;
   250					;	None
   251					;
   252					; CALLING SEQUENCE:
   253					;
   254					;	None
   255					;
   256					; INPUT PARAMETERS:
   257					;
   258					;	None
   259					;
   260					; IMPLICIT INPUTS:
   261					;
   262					;	None
   263					;
   264					; OUTPUT PARAMETERS:
   265					;
   266					;	None
   267					;
   268					; IMPLICIT OUTPUTS:
   269					;
   270					;	None
   271					;
   272					; CONDITION CODES:
   273					;
   274					;	None
   275					;
   276					; SIDE EFFECTS:
   277					;
   278					;	None
   279					;--
   280
   281		000066'				.PSECT	$CODE$,I,RO
   282	000066'				$EX20::	TESTM	$IOTRP		;;; check if RSX should handle it.
   283	000074'					CEXSV$			;;;
   284	000074'					CEXGO$	SS$IOT,1	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 7
CEXINT.M11    29-DEC-82 16:00		$EX24	- POWER FAILURE EXCEPTION

   286						.SBTTL	$EX24	- Power failure Exception
   287					;++
   288					; FUNCTIONAL DESCRIPTION:
   289					;
   290					;	None
   291					;
   292					; CALLING SEQUENCE:
   293					;
   294					;	None
   295					;
   296					; INPUT PARAMETERS:
   297					;
   298					;	None
   299					;
   300					; IMPLICIT INPUTS:
   301					;
   302					;	None
   303					;
   304					; OUTPUT PARAMETERS:
   305					;
   306					;	None
   307					;
   308					; IMPLICIT OUTPUTS:
   309					;
   310					;	None
   311					;
   312					; CONDITION CODES:
   313					;
   314					;	None
   315					;
   316					; SIDE EFFECTS:
   317					;
   318					;	None
   319					;--
   320
   321		000102'				.PSECT	$CODE$,I,RO
   322	000102'				$EX24::	CEXSV$			;;;
   323	000102'					PUSH$S	@#4		;;; Save NXM trap address
   324	000106'	012737	000142'	000004		MOV	#80$,@#4	;;; and set up our own.
   325	000114'	005777	000000G			TST	@.DTERG		;;; If the boot RAM is not there
   326	000120'					POP$S	@#4		;;; then
   327	000124'	103403				BCS	10$		;;; we have been fingered.
   328	000126'					CEXGO$	SS$PWF,1	;;;
   329	000134'				10$:	CEXGO$	SS$DTE,1	;;;
   330	000142'	005266	000002		80$:	INC	2(SP)		;;; Set his carry
   331	000146'	000002				RTI			;;; and let him continue.
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 8
CEXINT.M11    29-DEC-82 16:00		$EX250	- SEGMENT FAULT EXCEPTION

   333						.SBTTL	$EX250	- Segment Fault Exception
   334					;++
   335					; FUNCTIONAL DESCRIPTION:
   336					;
   337					;	None
   338					;
   339					; CALLING SEQUENCE:
   340					;
   341					;	None
   342					;
   343					; INPUT PARAMETERS:
   344					;
   345					;	None
   346					;
   347					; IMPLICIT INPUTS:
   348					;
   349					;	None
   350					;
   351					; OUTPUT PARAMETERS:
   352					;
   353					;	None
   354					;
   355					; IMPLICIT OUTPUTS:
   356					;
   357					;	None
   358					;
   359					; CONDITION CODES:
   360					;
   361					;	None
   362					;
   363					; SIDE EFFECTS:
   364					;
   365					;	None
   366					;--
   367
   368		000150'				.PSECT	$CODE$,I,RO
   369	000150'				$EX250::TESTM	$SGFLT		;;;
   370	000156'					CEXSV$			;;;
   371	000156'					PUSH$S	<@#SR2,@#SR1,@#SR0> ;;;
   372	000172'	042737	160000	000000G		BIC	#160000,@#SR0	;;; Unfreeze the segment unit.
   373	000200'					CEXGO$	SS$MMU,4	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 9
CEXINT.M11    29-DEC-82 16:00		$EX30	- EMT INSTRUCTION EXCEPTION

   375						.SBTTL	$EX30	- EMT Instruction Exception
   376					;++
   377					; FUNCTIONAL DESCRIPTION:
   378					;
   379					;	None
   380					;
   381					; CALLING SEQUENCE:
   382					;
   383					;	None
   384					;
   385					; INPUT PARAMETERS:
   386					;
   387					;	None
   388					;
   389					; IMPLICIT INPUTS:
   390					;
   391					;	None
   392					;
   393					; OUTPUT PARAMETERS:
   394					;
   395					;	None
   396					;
   397					; IMPLICIT OUTPUTS:
   398					;
   399					;	None
   400					;
   401					; CONDITION CODES:
   402					;
   403					;	None
   404					;
   405					; SIDE EFFECTS:
   406					;
   407					;	None
   408					;--
   409
   410		000206'				.PSECT	$CODE$,I,RO
   411	000206'				$EX30::	TESTM	$EMTRP		;;; check if RSX should handle it.
   412	000214'					CEXSV$			;;;
   413	000214'	011646				MOV	(SP),-(SP)	;;; Back up PC
   414	000216'	162716	000002			SUB	#2,(SP)		;;; to
   415	000222'	006536				MFPI	@(SP)+		;;; get  EMT instruction,
   416	000224'	105066	000001			CLRB	1(SP)		;;; isolate the number,
   417	000230'	006316				ASL	(SP)		;;; and turn into offset.
   418	000232'					CEXGO$	SS$EMT,2	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 10
CEXINT.M11    29-DEC-82 16:00		$EX34	- TRAP INSTRUCTION EXCEPTION

   420						.SBTTL	$EX34	- TRAP Instruction Exception
   421					;++
   422					; FUNCTIONAL DESCRIPTION:
   423					;
   424					;	None
   425					;
   426					; CALLING SEQUENCE:
   427					;
   428					;	None
   429					;
   430					; INPUT PARAMETERS:
   431					;
   432					;	None
   433					;
   434					; IMPLICIT INPUTS:
   435					;
   436					;	None
   437					;
   438					; OUTPUT PARAMETERS:
   439					;
   440					;	None
   441					;
   442					; IMPLICIT OUTPUTS:
   443					;
   444					;	None
   445					;
   446					; CONDITION CODES:
   447					;
   448					;	None
   449					;
   450					; SIDE EFFECTS:
   451					;
   452					;	None
   453					;--
   454
   455		000240'				.PSECT	$CODE$,I,RO
   456	000240'	005767	000000G		$EX34::	TST	.CEXDP		;;; If in RSX
   457	000244'	100002				BPL	10$		;;; then
   458	000246'	000167	000000G			JMP	$TRTRP		;;; let RSX handle it.
   459	000252'				10$:	CEXSV$			;;;
   460	000252'	011646				MOV	(SP),-(SP)	;;; Back up PC
   461	000254'	162716	000002			SUB	#2,(SP)		;;; to
   462	000260'	006536				MFPI	@(SP)+		;;; get TRAP instruction,
   463	000262'	105066	000001			CLRB	1(SP)		;;; isolate the number,
   464	000266'	006316				ASL	(SP)		;;; and turn into offset.
   465	000270'					CEXGO$	SS$TRP,2	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 11
CEXINT.M11    29-DEC-82 16:00		$EX4	- ODD ADDRESS OR STACK OVERFLOW EXCEPTION

   467						.SBTTL	$EX4	- Odd Address or Stack Overflow Exception
   468					;++
   469					; FUNCTIONAL DESCRIPTION:
   470					;
   471					;	None
   472					;
   473					; CALLING SEQUENCE:
   474					;
   475					;	None
   476					;
   477					; INPUT PARAMETERS:
   478					;
   479					;	None
   480					;
   481					; IMPLICIT INPUTS:
   482					;
   483					;	None
   484					;
   485					; OUTPUT PARAMETERS:
   486					;
   487					;	None
   488					;
   489					; IMPLICIT OUTPUTS:
   490					;
   491					;	None
   492					;
   493					; CONDITION CODES:
   494					;
   495					;	None
   496					;
   497					; SIDE EFFECTS:
   498					;
   499					;	None
   500					;--
   501
   502		000276'				.PSECT	$CODE$,I,RO
   503	000276'	022706	000004G		$EX4::	CMP	#V$$CTR+4,SP	;;;
   504	000302'	101006				BHI	10$		;;;
   505	000304'					TESTM	$TRP04		;;; check if RSX should handle it.
   506	000312'					CEXSV$			;;;
   507	000312'					CEXGO$	SS$NXM,1	;;;
   508	000320'	010667	000000G		10$:	MOV	SP,.USRSP	;;; Save SP position
   509	000324'					POP$S	$STACK-4	;;; PC
   510	000330'					POP$S	$STACK-2	;;; and PS.
   511	000334'	012706	177774G			MOV	#$STACK-4,SP	;;; Set up provisional SP
   512	000340'					CEXSV$			;;; and enter exception mode.
   513	000340'					PUSH$S	.USRSP		;;;
   514	000344'					CEXGO$	SS$STK,2	;;;
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 12
CEXINT.M11    29-DEC-82 16:00		$INTCE - DISPATCH AN INTERRUPT

   516						.SBTTL	$INTCE - Dispatch an interrupt
   517					;++
   518					; FUNCTIONAL DESCRIPTION:
   519					;
   520					;	Transfer an interrupt to a process interrupt handler.
   521					;	This is done by:
   522					;
   523					;	1)  Doing RSX-related processing and saving context that
   524					;	    will be modified.
   525					;	2)  Recording that an interrupt is being processed.
   526					;	3)  Setting device priority, line table address, mapping to
   527					;	    the process, and dispatching to the handler.
   528					;
   529					;	After handler processing, context must be restored and
   530					;	control must be passed to RSX for rescheduling.
   531					;
   532					; CALLING SEQUENCE:
   533					;
   534					;	JSR	R5,$INTCE
   535					;	.WORD	^C<priority>
   536					;	.WORD	<line table address>
   537					;	.WORD	<mapping bias>
   538					;	.WORD	<dispatch address>
   539					;
   540					; INPUT PARAMETERS:
   541					;
   542					;	None
   543					;
   544					; IMPLICIT INPUTS:
   545					;
   546					;	PS = priority 7.
   547					;
   548					; OUTPUT PARAMETERS:
   549					;
   550					;	None
   551					;
   552					; IMPLICIT OUTPUTS:
   553					;
   554					;	None
   555					;
   556					; CONDITION CODES:
   557					;
   558					;	None
   559					;
   560					; SIDE EFFECTS:
   561					;
   562					;	None
   563					;--
   564
   565		000352'				.PSECT	$CODE$,I,RO
   566	000352'	005337	000000G		$INTCE::DEC	@#$STKDP	;;; If switching to system state
   567	000356'	001002				BNE	10$		;;; then
   568	000360'	010677	000000G			MOV	SP,@$HEADR	;;; save current stack position.
   569
   570		   001				.IF	NDF,M$$MGE
   571						MOV	#$STACK,SP	;;; Load system stack pointer.
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 12-1
CEXINT.M11    29-DEC-82 16:00		$INTCE - DISPATCH AN INTERRUPT

   572		   000				.ENDC
   573
   574	000364'				10$:	PUSH$S	#$INTX1		;;; Set to exit to RSX
   575	000370'	004767	000000G			CALL	$CEXSV		;;; and become the Comm/Exec.
   576
   577		   001				.IF	NE,D$$BUG
   578						TST	2(R4)		;;; If priority block already active
   579						BNE	100$		;;; then make notification.
   580						.IFTF
   581
   582	000374'	016724	000000G			MOV	.INTCB,(R4)+	;;; Push on priority block,
   583	000400'	010467	000000G			MOV	R4,.INTCB
   584	000404'	012524				MOV	(R5)+,(R4)+	;;; set the process descriptor,
   585	000406'	005224				INC	(R4)+		;;; (update the interrupt counter)
   586	000410'	001002				BNE	20$
   587	000412'	005364	177776			DEC	-2(R4)
   588	000416'				20$:	MTPS	(R4)		;;; and drop priority.
   589	000422'	011504				MOV	(R5),R4		;; Get dispatch address
   590	000424'	014505				MOV	-(R5),R5	;; and recover process descriptor.
   591	000426'					PUSH$S	@#KISAR5	;; Save
   592	000432'					SMAP$S			;; mapping registers,
   593	000436'	011537	000000G			MOV	(R5),@#KISAR5	;; map to process,
   594	000442'					MAP$	Z.DAT+0(R5)	;; map to data base,
   595	000450'	016505	000006			MOV	Z.DAT+2(R5),R5	;; get data base address,
   596	000454'	004714				CALL	(R4)		;; and give him the interrupt.
   597	000456'					MAP$S			;; Restore
   598	000462'					POP$S	@#KISAR5	;; mapping registers,
   599	000466'	016704	000000G			MOV	.INTCB,R4	;; remove priority block,
   600
   601						.IFT
   602						CLR	(R4)
   603						.IFTF
   604
   605	000472'	014467	000000G			MOV	-(R4),.INTCB
   606	000476'	000167	000000G		90$:	JMP	$CEXXT		;; Schedule the Comm/Exec if necessary.
   607
   608						.IFT
   609					100$:	CALL	101$		;;; Make notification
   610						BR	90$		;;; and drop out.
   611
   612					101$:	CRSH$S	IPR		;;; Bad interrupt priority.
   613		   000				.ENDC
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 13
CEXINT.M11    29-DEC-82 16:00		$INTDS - INHIBIT INTERRUPTS FOR GIVEN PRIORITY

   615						.SBTTL	$INTDS - Inhibit Interrupts for given Priority
   616					;++
   617					; FUNCTIONAL DESCRIPTION:
   618					;
   619					;
   620					;
   621					; CALLING SEQUENCE:
   622					;
   623					;	CALL	$INTDS
   624					;
   625					; INPUT PARAMETERS:
   626					;
   627					;	R0 = address of interrupt vector for device
   628					;	     to inhibit interrupts from.
   629					;
   630					; IMPLICIT INPUTS:
   631					;
   632					;	None
   633					;
   634					; OUTPUT PARAMETERS:
   635					;
   636					;	None
   637					;
   638					; IMPLICIT OUTPUTS:
   639					;
   640					;	None
   641					;
   642					; CONDITION CODES:
   643					;
   644					;	None
   645					;
   646					; SIDE EFFECTS:
   647					;
   648					;	None
   649					;--
   650
   651		000502'				.PSECT	$CODE$,I,RO
   652	000502'				$INTDS::PLVL$			; Crash if not at process level.
   653	000502'					MFPS	-(SP)		; Get current PS
   654
   655		   001				.IF	NE,D$$BUG
   656						.IFTF
   657
   658	000506'	011000				MOV	(R0),R0
   659	000510'	016000	000002			MOV	2(R0),R0
   660	000514'	156016	000010			BISB	10(R0),(SP)	; raise to device priority,
   661	000520'					MTPS	(SP)+
   662	000524'	000207				RETURN			; and go away.
   663
   664						.IFT
   665		   000				.ENDC
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 14
CEXINT.M11    29-DEC-82 16:00		$INTEN - ALLOW INTERRUPTS FOR GIVEN PRIORITY

   667						.SBTTL	$INTEN - Allow Interrupts for given Priority
   668					;++
   669					; FUNCTIONAL DESCRIPTION:
   670					;
   671					;
   672					;
   673					; CALLING SEQUENCE:
   674					;
   675					;	CALL	$INTEN
   676					;
   677					; INPUT PARAMETERS:
   678					;
   679					;	R0 = address of interrupt vector for device
   680					;	     to allow interrupts from.
   681					;
   682					; IMPLICIT INPUTS:
   683					;
   684					;	None
   685					;
   686					; OUTPUT PARAMETERS:
   687					;
   688					;	None
   689					;
   690					; IMPLICIT OUTPUTS:
   691					;
   692					;	None
   693					;
   694					; CONDITION CODES:
   695					;
   696					;	None
   697					;
   698					; SIDE EFFECTS:
   699					;
   700					;	None
   701					;--
   702
   703		000526'				.PSECT	$CODE$,I,RO
   704	000526'				$INTEN::PLVL$			; Crash if not at process level.
   705	000526'					MFPS	-(SP)		; Get current PS
   706
   707		   001				.IF	NE,D$$BUG
   708						.IFTF
   709
   710	000532'	142716	000340			BICB	#7*40,(SP)	; drop priority to 0
   711	000536'					MTPS	(SP)+
   712	000542'	000207				RETURN			; and go away.
   713
   714						.IFT
   715		   000				.ENDC
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 15
CEXINT.M11    29-DEC-82 16:00		$SYNCH - SYNCHRONIZE WITH PROCESS

   717						.SBTTL	$SYNCH - Synchronize with process
   718					;++
   719					; FUNCTIONAL DESCRIPTION:
   720					;
   721					;	This routine is provided to interrupt handler routines to
   722					;	allow them to suspend processing until their associated
   723					;	process context can be set up.  This is done by saving the
   724					;	return address in the provided SYNCH block and scheduling
   725					;	it to be run after the current process has completed
   726					;	processing.
   727					;
   728					; CALLING SEQUENCE:
   729					;
   730					;	CALL	$SYNCH
   731					;
   732					; INPUT PARAMETERS:
   733					;
   734					;	R4 = address of synch block containing:
   735					;	    S.DSP = Routine to call on SYNCHronizing.
   736					;
   737					; IMPLICIT INPUTS:
   738					;
   739					;	PS = device priority.
   740					;
   741					; OUTPUT PARAMETERS:
   742					;
   743					;	None
   744					;
   745					; IMPLICIT OUTPUTS:
   746					;
   747					;	None
   748					;
   749					; CONDITION CODES:
   750					;
   751					;	None
   752					;
   753					; SIDE EFFECTS:
   754					;
   755					;	None
   756					;--
   757
   758		000544'				.PSECT	$CODE$,I,RO
   759	000544'				$SYNCH::ILVL$			; Crash if not at interrupt level.
   760
   761		   001				.IF	NE,D$$BUG
   762						TST	S.PDB(R4)	; If SYNCH block is active
   763						BNE	100$		; then crash about it,
   764						.IFTF
   765
   766	000544'	017764	000000G	000002		MOV	@.INTCB,S.PDB(R4) ; otherwise set PDB
   767	000552'	005014				CLR	(R4)		; Reset the link pointer.
   768	000554'					DSABL$			; No interrupts, please!
   769	000566'	010477	000002G			MOV	R4,@.SYNQH+2	;;; Link to last block
   770	000572'	010467	000002G			MOV	R4,.SYNQH+2	;;; and make this the last block.
   771	000576'					ENABL$			;;; reenable interrupts
   772	000602'	005267	000000G			INC	.CEXRQ		; indicate scheduling requested
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 15-1
CEXINT.M11    29-DEC-82 16:00		$SYNCH - SYNCHRONIZE WITH PROCESS

   773	000606'	000207				RETURN			; and go away.
   774
   775						.IFT
   776					100$:	CRSH$S	SYN		; and say SYNCH block already active.
   777		   000				.ENDC
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 16
CEXINT.M11    29-DEC-82 16:00		CEXSV	- SPRING AN INTERRUPT SIGNAL

   779						.SBTTL	CEXSV	- Spring an Interrupt SIGNAL
   780					;++
   781					; FUNCTIONAL DESCRIPTION:
   782					;
   783					;	None
   784					;
   785					; CALLING SEQUENCE:
   786					;
   787					;	None
   788					;
   789					; INPUT PARAMETERS:
   790					;
   791					;	None
   792					;
   793					; IMPLICIT INPUTS:
   794					;
   795					;	None
   796					;
   797					; OUTPUT PARAMETERS:
   798					;
   799					;	None
   800					;
   801					; IMPLICIT OUTPUTS:
   802					;
   803					;	None
   804					;
   805					; CONDITION CODES:
   806					;
   807					;	None
   808					;
   809					; SIDE EFFECTS:
   810					;
   811					;	None
   812					;--
   813
   814		000610'				.PSECT	$CODE$,I,RO
   815						.IRP	n,<1,2,21,3,4>
   816					CEXG'n:	PUSH$S	<@(SP)+,#n>
   817						JMP	CEXGO
   818						.ENDM
   819
   820	000672'	004767	000000G		CEXGO:	CALL	$IGNAL		;; Signal the exception,
   821	000676'	006316				ASL	(SP)		;; remove
   822	000700'	062606				ADD	(SP)+,SP	;; the parameters
   823	000702'	000006				RTT			;; and dismiss the exception.
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 17
CEXINT.M11    29-DEC-82 16:00		TESTM	- TEST IF IN EXEC MODE

   825						.SBTTL	TESTM	- Test if in EXEC Mode
   826					;++
   827					; FUNCTIONAL DESCRIPTION:
   828					;
   829					;	None
   830					;
   831					; CALLING SEQUENCE:
   832					;
   833					;	None
   834					;
   835					; INPUT PARAMETERS:
   836					;
   837					;	None
   838					;
   839					; IMPLICIT INPUTS:
   840					;
   841					;	None
   842					;
   843					; OUTPUT PARAMETERS:
   844					;
   845					;	None
   846					;
   847					; IMPLICIT OUTPUTS:
   848					;
   849					;	None
   850					;
   851					; CONDITION CODES:
   852					;
   853					;	None
   854					;
   855					; SIDE EFFECTS:
   856					;
   857					;	None
   858					;--
   859
   860		000704'				.PSECT	$CODE$,I,RO
   861	000704'	012546			TESTM:	MOV	(R5)+,-(SP)	;; PICK UP EXEC TRAP ROUTINE ADDRESS
   862	000706'	005737	000000G			TST	@#$STKDP	;; ALLOW EXEC TO HANDLE TRAP?
   863	000712'	003025				BGT	80$		;; IF GT YES, TRAP WAS IN USER MODE
   864	000714'	002423				BLT	70$		;; IF LT NO, BAD STACK DEPTH
   865	000716'	005767	000000G			TST	.CEXDP		;; If in RSX
   866	000722'	100020				BPL	70$		;; then
   867	000724'	026627	000004	000000G		CMP	4(SP),#$DRLM1	;; TRAP OCCUR IN DIRECTIVE DISPATCHER?
   868	000732'	103404				BLO	10$		;; IF LO NO
   869	000734'	026627	000004	000000G		CMP	4(SP),#$DRLM2	;; TRAP OCCUR IN DIRECTIVE DISPATCHER?
   870	000742'	101411				BLOS	80$		;; IF LO YES, PASS TRAP TO EXEC
   871	000744'	026627	000004	000000G	10$:	CMP	4(SP),#$DQLM1	;; TRAP OCCUR IN QIO DIRECTIVE?
   872	000752'	103404				BLO	70$		;; IF LO NO
   873	000754'	026627	000004	000000G		CMP	4(SP),#$DQLM2	;; TRAP OCCUR IN QIO DIRECTIVE?
   874	000762'	101401				BLOS	80$		;; IF LOS YES, ALLOW EXEC TO HANDLE TRAP
   875	000764'	010516			70$:	MOV	R5,(SP)		;; SET TO XDT ADDRESS
   876	000766'	012605			80$:	MOV	(SP)+,R5	;; SET RETURN ADDRESS
   877	000770'	000205				RTS	R5		;; PROCESS TRAP
   878
   879		000001				.END
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 18
CEXINT.M11    29-DEC-82 16:00		CROSS REFERENCE TABLE -- USER SYMBOLS

CEXGO   000672R    002	  818	  820#
CEXG1   000610R    002	  158*	  244*	  284*	  328*	  329*	  507*	  818#
CEXG2   000622R    002	  418*	  465*	  514*	  818#
CEXG21  000634R    002	  204*	  818#
CEXG3   000646R    002	  818#
CEXG4   000660R    002	  373*	  818#
D$$BUG= 000000        	  577	  652	  655	  704	  707	  759	  761
KISAR5= ****** G      	   80#	  591	  593*	  598*
KISAR6= ****** G      	  592#	  594#*	  597#*
M$$MGE= 000001        	  570
PS    = ****** G      	  588#*	  653#	  661#*	  705#	  711#*	  768#*	  771#*
P$$BPS= 000001        	  588	  653	  661	  705	  711	  768	  771
P$$WPS= 000001        	  768
SR0   = ****** G      	   80#	  371	  372*
SR1   = ****** G      	   80#	  371
SR2   = ****** G      	   80#	  371
SS$BPT= ****** G      	  244
SS$DTE= ****** G      	  329
SS$EMT= ****** G      	  418
SS$INS= ****** G      	  158
SS$IOT= ****** G      	  284
SS$MMU= ****** G      	  373
SS$MPE= ****** G      	  204
SS$NXM= ****** G      	  507
SS$PWF= ****** G      	  328
SS$STK= ****** G      	  514
SS$TRP= ****** G      	  465
S.PDB   000002        	  766*
TESTM   000704R    002	  156	  242	  282	  369	  411	  505	  861#
V$$CTR= ****** G      	   80#	  503
X.DSP   000006        	  118
X.PDB   000004        	  117	  118
Z.DAT   000004        	  594	  595
$CEXSV= ****** GX     	  575*
$CEXXT= ****** GX     	  606
$DQLM1= ****** G      	   78#	  871
$DQLM2= ****** G      	   78#	  873
$DRLM1= ****** G      	   78#	  867
$DRLM2= ****** G      	   78#	  869
$EMTRP= ****** G      	   79#	  411
$EX10   000000RG   002	  156#
$EX114  000014RG   002	  196#
$EX14   000052RG   002	  242#
$EX20   000066RG   002	  282#
$EX24   000102RG   002	  322#
$EX250  000150RG   002	  369#
$EX30   000206RG   002	  411#
$EX34   000240RG   002	  456#
$EX4    000276RG   002	  503#
$HEADR= ****** G      	   78#	  568*
$IGNAL= ****** GX     	  820*
$ILINS= ****** G      	   79#	  156
$INTCE  000352RG   002	  566#
$INTDS  000502RG   002	  652#
$INTEN  000526RG   002	  704#
$INTX1= ****** G      	   78#	  574
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 18-1
CEXINT.M11    29-DEC-82 16:00		CROSS REFERENCE TABLE -- USER SYMBOLS

$IOTRP= ****** G      	   79#	  282
$PARTB= ****** GX     	  198	  200	  203
$SGFLT= ****** G      	   79#	  369
$STACK= ****** G      	   78#	  509*	  510*	  511
$STKDP= ****** G      	   78#	  566*	  862
$STOP = ****** G      	   80#
$SYNCH  000544RG   002	  759#
$TRACE= ****** G      	   79#	  242
$TRP04= ****** G      	   79#	  505
$TRTRP= ****** G      	   79#	  458
.CEXDP= ****** GX     	  456	  865
.CEXRQ= ****** GX     	  772*
.DTERG= ****** G      	  107#	  325
.INTCB= ****** G      	  108#	  582	  583*	  599	  605*	  766
.INTC4= ****** G      	  109#
.INTC5= ****** G      	  110#
.INTC6= ****** G      	  111#
.INTC7= ****** G      	  112#
.SYNQH= ****** GX     	  769*	  770*
.USRSP= ****** GX     	  508*	  513
CEXINT - COMM/EXEC DEVICE INTERRUPT HANDLER	DNMAC X24.07-563  28-MAY-85  14:21  PAGE 19
CEXINT.M11    29-DEC-82 16:00		CROSS REFERENCE TABLE -- MACRO NAMES

CEXGO$	   86#	  158	  204	  244	  284	  328	  329	  373	  418	  465	  507	  514
CEXSV$	   91#	  157	  196	  243	  283	  322	  370	  412	  459	  506	  512
CRSH$S	   77#
DSABL$	  768
ENABL$	  771
ILVL$	  759
MAP$	  594
MAP$S	  597
MFPS	  653	  705	  768
MTPS	  588	  661	  711	  771
PLVL$	  652	  704
POP$S	  326	  509	  510	  598
PUSH$S	  197	  199	  323	  371	  513	  574	  591	  818
SMAP$S	  592
TESTM	   94#	  156	  242	  282	  369	  411	  505


. ABS.  000000     000	   CON   RW    ABS   LCL   I  
        000000     001	   CON   RW    REL   LCL   I  
$CODE$  000772     002	   CON   RO    REL   LCL   I  


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  8

 CEXINT,CEXINT/CR=MCB:RSXLIB/PA:1,MCBLIB/PA:1,CEX:CEXLIB/PA:1,CEXINT
 RUN-TIME: 4 2 .3 SECONDS
 RUN-TIME RATIO: 28/6=4.0
 CORE USED:  15K  (29 PAGES)