interrupt type in Turbo C
Naoto Kimura
abcscnuk at csuna.csun.edu
Sun Jul 30 18:05:56 AEST 1989
The "interrupt" keyword is should be available with MSC 5.1, as this
was available on MSC 5.0 (but was never mentioned anywhere in the
manual except for the phrase "make sure that you declare the function
as an interrupt" -- for each of the functions that manipulated the
system interrupt table). Another thing to watch out is to make sure
that you declare all functions that are declared as "interrupt" that
you make also make it "far" or you may have problems in linking (this
one was another thing that made me scratch my head for nearly 3 days).
If you are using hardware interrupts, you probably want the header to
look something like:
void far interrupt intserver() /* note lack of args */
I don't recall if the compiler generated the code to push all the
registers or not. You might want to use the appropriate flags to
generate assembly language output and check to make sure that it does.
If it doesn't then you should use some inline assembly (I don't recall
if MSC had it or not) or write the interrupt service routine in
assembly.
//-n-\\ Naoto Kimura
_____---=======---_____ (abcscnuk at csuna.csun.edu)
====____\ /.. ..\ /____====
// ---\__O__/--- \\ Enterprise... Surrender or we'll
\_\ /_/ send back your *&^$% tribbles !!
More information about the Comp.lang.c
mailing list