Path: utzoo!mnetor!uunet!husc6!cmcl2!phri!manhat!mancol!jh From: jh@mancol.UUCP (John Hanley) Newsgroups: comp.sys.ibm.pc Subject: Re: _dos_setvect in MS C 5.0 Message-ID: <277@mancol.UUCP> Date: 22 Feb 88 21:25:30 GMT References: <788@imsvax.UUCP> Reply-To: hanley@nyu.edu (John Hanley) Organization: Manhattan College Lines: 24 Keywords: example requested Has anyone succesfully used the _dos_setvect() library function in MS C? A complete example program would be GREATLY appreciated. Page 224 of the run-time library manual gives the following information: #include void _dos_setvect( intnum, void(handler)()); unsigned intnum; /* Target interrupt vector */ interrupt far *handler; /* Interrupt handler to assign intnum to */ but I have _no_ idea how to call it correctly. The idea is that you write a handler function that gets called every INT 'intnum' is generated. The handler can be a C function previously declared with the interrupt attribute. I did that but then none of the dozen or so combinations I tried for calling _dos_setvect got past the compiler without a 'must be a function/pointer to a function' error ocassionally, or a 'redifinition' error when handler was declared as a type other than void. BTW, cdecl (from info-server@sh.cs.net) is usually great for declaration problems like this, but it doesn't seem to handle "void". -- --John Hanley System Programmer, Manhattan College soon to be a former E.E./CS undergrad (May is fast approaching!) ..!cmcl2.nyu.edu!manhat!jh or hanley@nyu.edu (CMCL2<=>NYU.EDU)