Keil™, An ARM® Company

Technical Support

CX51: FILLING UNUSED INTERRUPT VECTORS WITH SJMP $


Information in this article applies to:

  • Cx51 All Versions

QUESTION

I need to certify my application and one of the requirements is that I must fill unused interrupt vectors with an SJMP $ instruction. How can I do this?

ANSWER

Add a small assembler module to your application that defines absolute segments for each unused interrupt vector location. For example:

          CSEG AT 0x0013  ; external interrupt 1
          SJMP   $

          CSEG AT 0x001B  ; timer 1 interrupt
          SJMP   $

          CSEG AT 0x0023  ; UART interrupt
          SJMP   $

          CSEG AT 0x002B  ; timer 2 interrupt
          SJMP   $

          END

SEE ALSO

Last Reviewed: Wednesday, April 21, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure