| |||||
Technical Support Support Resources
Product Information | A166: DETECTING UNUSED INTERRUPTSInformation in this article applies to:
QUESTIONHow can I detect unused interrupts in my assembly programs? ANSWERThere are a number of ways to do detect unused interrupts. One method involves creating an UnusedInterrupt function and placing a call to that function in each unused interrupt vector. The following code illustrates this idea. Note that you must create the UnusedInterrupt function to use this example.
%*DEFINE (VECTORX (intfunction)) (
EXTERN %intfunction:NEAR
JMP %intfunction
)
INTERRUPT_VECTORS SECTION CODE PUBLIC 'VECTORS'
TABLE PROC NEAR
; Trap
ORG 0h ;
%VECTORX (?C_STARTUP) ; 0x00 RESET (4 bytes)
ORG 8h ;
%VECTORX (UnusedInterrupt) ; 0x02 NMITRAP Non-maskable int (4 bytes)
ORG 10h ;
%VECTORX (UnusedInterrupt) ; 0x04 STOTRAP Stack overflow
ORG 18h ;
%VECTORX (UnusedInterrupt) ; 0x06 STUTRAP Stack underflow
ORG 20h ;
%VECTORX (UnusedInterrupt) ; 0x08 V_INT_UNKNOWN Not supported (a gap)
ORG 28h ;
%VECTORX (UnusedInterrupt) ; 0x0A BTRAP HW Traps Flags
ORG 2Ch ;
%VECTORX (UnusedInterrupt) ; 0x0B RESERVED_0 Do not use
ORG 30h
;
TABLE ENDP
INTERRUPT_VECTORS ENDS
END
FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Thursday, June 10, 2004 | ||||
| |||||