Using the Interrupt Keyword

When using the interrupt keyword, you may directly associate your interrupt function with a vector number in the ANSI C-source code file. For that purpose, specify the vector number next to the keyword interrupt.

To associate the address of the INCcount() function with the vector number 42, define the function as in the following listing.

Listing: Definition of the INCcount() Interrupt Function


interrupt 42 void INCcount(void) {
int card1;

tcount++;

}