Using the interrupt Keyword

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

In order to associate the address of the INCcount function with the vector number 75, define the function as in the following listing.

Listing: Definition of the INCcount() interrupt function


interrupt 75 void INCcount(void) {
int card1;

tcount++;

}