I have been given some vendor supplied driver code written in C that runs on DOS (yes DOS) to access hardware. I am trying to work out what this code does, so far without much success. In particular I am having problems understanding the following code
void (interrupt *oldcan)(void);
void interrupt far can_isr(void)
{
/* function body */
}
I am guessing the first line defines a function pointer but I have never seen the interrupt
word which I am assuming is some kind of DOS API function. I have never used DOS before, and the function definition above looks to me that it has 3 return types - void
, interrupt
and far
which clearly is not possible. The function actually has void return type, but what is the meaning of interrupt far
?? Any assistance will be gratefully received.