Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!usc!srhqla!nrcvax!kosman!kosman.uucp!kevin From: kevin@kosman.uucp (Kevin O'Gorman) Newsgroups: comp.sys.ibm.pc Subject: Beginner's question: interrupt handlers in MS-C 5.1. Message-ID: <1127@kosman.UUCP> Date: 2 Feb 90 07:43:24 GMT Sender: kevin@kosman.UUCP Organization: K.O.'s Manor - Vital Computer Systems, Oxnard, CA 93035 Lines: 29 I feel both annoyed and stupid. Maybe someone can help. I've been programming in C for a while, but this is my first crack at an Intel machine, let alone MSDOS. I'm working at a new place and I would like to look at least better than incompetent, so I don't want to mess up something that should be obvious. This is my first task: take an interrupt handler from a TSR, writtem in MASM, and rewrite it in C. This is a 286 running DOS as an imbedded controller. I found _dos_setvect() and friends to do the INT 25H for me, but I read in the manual: interrupt far *handler; and If _handler_ is a C function, it must have been previously de- clared with the interrupt attribute. Otherwise, you must make sure that the function satisfies the requirements for an interrupt-handling routine." Sounds good, but I have been completely unable to find any reference on the "interrupt attribute" or on the requirements for ... Anybody out there ever write one of these things? What they talking about, anyway??? About all I can think of is that the attribute may set up DX for me on entry to the function. The MASM examples all have code to do that that assumes a tiny model, it seems, and that's not what I have here. Is that it???