Xref: utzoo comp.lang.c:20266 alt.msdos.programmer:246 comp.sys.ibm.pc:32367 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!usc!sdsu!csun!csuna!abcscnuk From: abcscnuk@csuna.csun.edu (Naoto Kimura) Newsgroups: comp.lang.c,alt.msdos.programmer,comp.sys.ibm.pc Subject: Re: interrupt type in Turbo C Message-ID: <2102@csuna.csun.edu> Date: 30 Jul 89 08:05:56 GMT References: <2388@pur-phy> <24259@abbott.mips.COM> Reply-To: abcscnuk@csuna.csun.edu (Naoto Kimura) Distribution: na Organization: CSU Northridge Lines: 25 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@csuna.csun.edu) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !!