Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!ira.uka.de!smurf!nadia!ananke!kaiser From: kaiser@ananke.stgt.sub.org (Andreas Kaiser) Newsgroups: comp.lang.c Subject: interrupt far functions in Microsoft 5.1 Message-ID: <74.279B57CF@ananke.stgt.sub.org> Date: 21 Jan 91 20:38:28 GMT Organization: Subnet-Fidonet Gateway, Stuttgart, FRG Lines: 25 In a message of , Don Lorvig (lorvig@gsg.UUCP ) writes: DL> have been using void far interrupt routines for some time now. The DL> addresses of this routines are passed to a TSR which executes them. DL> Recently I began attempting to make this functions more complex. (They DL> merely set flags before). When I attempt function calls from within DL> these interrupt routines, strange behavior results. I don't know if this is applicable to your problem, but the following is a common problem with interrupt routines in C (and perhaps the reason for the more sophisticated interrupt library in Zortech C): Interrupt functions are called from everywhere, so you cannot assume the stack segment is the same as the data segment, which is a requirement at least for the small data models (small, medium). Thus an address within the interrupt function's stack frame (of a local variable) cannot be addressed via a near pointer, not even within the interrupt function itself. Should not be a problem in MSC's large model unless pointers are explicitly qualified as "near", but you didn't tell the model used. Andreas