Article View: comp.sys.ibm.pc
Article #41524Re: Beginner's question: interrupt handlers in MS-C 5.1.
From: Doug Thompson
Date: Fri, 02 Feb 1990 23:11
Date: Fri, 02 Feb 1990 23:11
36 lines
2096 bytes
2096 bytes
In article <1127@kosman.UUCP> kevin@kosman.uucp (Kevin O'Gorman) writes:
>I feel both annoyed and stupid. Maybe someone can help.
>
>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???
Microsoft Systems Journal had an article on the 'interrupt' attribute.
It was about a year ago, I believe I have the article but its at home.
Send me your net address and I'll see about mailing a copy if you'd
like.
--
Douglas Thompson UUCP: ..{tektronix,ogicse,uunet}!sequent!norsk
Sequent Computer Systems Phone: (503) 526-5727
15450 SW Koll Parkway !"The scientist builds to learn;the engineer learns in
Beaverton OR 97006 !order to build." Fred Brooks
Technical Details
Message-ID:
<28838@sequent.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!sequent!norskReferences:
<1127@kosman.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!mit-eddie!uw-beaver!zephyr.ens.tek.com!tektronix!sequent!norsk From: norsk@sequent.UUCP (Doug Thompson) Newsgroups: comp.sys.ibm.pc Subject: Re: Beginner's question: interrupt handlers in MS-C 5.1. Message-ID: <28838@sequent.UUCP> Date: 2 Feb 90 23:11:53 GMT References: <1127@kosman.UUCP> Reply-To: norsk@crg2.UUCP (Doug Thompson) Organization: Sequent Computer Systems, Inc. Lines: 36