Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcnc!rti!ge-rtp!edison!uvacs!mac From: mac@uvacs.CS.VIRGINIA.EDU (Alex Colvin) Newsgroups: comp.sys.ibm.pc Subject: Re: MSC and signal catching Message-ID: <1482@uvacs.CS.VIRGINIA.EDU> Date: Wed, 13-May-87 11:53:02 EDT Article-I.D.: uvacs.1482 Posted: Wed May 13 11:53:02 1987 Date-Received: Sat, 16-May-87 12:42:41 EDT References: <2681@mtgzz.UUCP> Organization: University of Virginia Lines: 21 Summary: MSC interrupts In article <2681@mtgzz.UUCP>, rosen@mtgzz.UUCP writes: > Someone wrote me mail asking: > ctrl-C's. Can the signal() function be used to > trap hardware interrupts? Have you seen any go > software to do this (for MSC 4.0)? > Does anyone else have any opinions/suggestions. I once had to chain to a > hardware interrupt. I wrote some general purpose C routines, and an assembly > program callable from C that will let me chain any C routine to any interrupt > vector. Is there a better way? The numbers defined for SIGINT and SIGFPE have no relation to real interrupts on the PC. This suggests that this mechanism can't be extended to other interrupts. All the interrupt handling code I've seen for MSC is in assembler. In some cases it sets up a stack and calls C code. There's no documentation about this, and I suspect you're taking your chances. System library routines (including Floating Point) are often not re-entrant. Be especially ware of anything involving allocation. Personally I prefer CII's C86, which supports this stuff, albeit clumsily.