Xref: utzoo comp.sys.ibm.pc.misc:5716 comp.lang.c:35375 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!samsung!uunet!mcsun!ukc!mucs!logitek!martino From: martino@logitek.co.uk (Martin O'Nions) Newsgroups: comp.sys.ibm.pc.misc,comp.lang.c Subject: Re: interrupt far functions in Microsoft 5.1 Message-ID: Date: 21 Jan 91 14:03:31 GMT References: <801@gsg.UUCP> Organization: Logitek Plc. Lines: 28 lorvig@gsg.UUCP (Don Lorvig) writes: > have been using void far interrupt routines for some time now. The >addresses of this routines are passed to a TSR which executes them. >Recently I began attempting to make this functions more complex. (They >merely set flags before). When I attempt function calls from within >these interrupt routines, strange behavior results. Probable causes are assumptions made by the C as to the state of segment registers, or stretching the stack beyond its intended length. I normally use an assembler interrupt handler, and call the compiled C after setting the stack and registers to appropriate values,changing them back afterwards. Mail me if you want details - I may be able to resurect some code if I dig deep enough. Martin -- DISCLAIMER: All My Own Work (Unless stated otherwise) -------------------------------------------------------------------------- Martin O'Nions Logitek Group Support martino@logitek.co.uk -------------------------------------------------------------------------- Down the drinking well / Which the plumber built her Aunt Mathilda fell / - We should buy a filter.... (Harry Graham - Ruthless Rhymes for Heartless Homes)