From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,53bba8695cf47299 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!prodigy.com!border1.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!cyclone1.gnilink.net!gnilink.net!wns14feed!worldnet.att.net!attbi_s04.POSTED!53ab2750!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: <41a47994$0$13459$ba620e4c@news.skynet.be> Subject: Re: system interrupt handler programming on a PC under windows X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: NNTP-Posting-Host: 24.22.63.157 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s04 1101308136 24.22.63.157 (Wed, 24 Nov 2004 14:55:36 GMT) NNTP-Posting-Date: Wed, 24 Nov 2004 14:55:36 GMT Organization: Comcast Online Date: Wed, 24 Nov 2004 14:55:36 GMT Xref: g2news1.google.com comp.lang.ada:6419 Date: 2004-11-24T14:55:36+00:00 List-Id: IMHO it is very likely you would be better off interfacing to the vendors library using the C interface. Ada has very nice capabilites for interfacing with C (see Interfaces.C). In my experience interfacing with hardware only starts with following the documentation. It is followed by identifying what features of the hardware don't work properly and creating work-arounds. Several years ago I started to write a serial driver for a PC. Well defined interface to hardware, right? When I started having difficulties with misbehavior, I took a look at IBM's driver that was included with OS/2. IBM's driver had a bunch of extra code to identify the maker of the serial hardware and disable specific features that didn't work for specific hardware. Better to use someone elses work on this. Also, I have run into several cases when I asked vendors about library support for Ada (thinking they might already have a binding), the common response is: can't be done. I usually generate my own binding, which demonstrates their ignorance. Steve (The Duck) "Adrien Plisson" wrote in message news:41a47994$0$13459$ba620e4c@news.skynet.be... > hello everyone ! > > i wonder if anyone can explain me (or give me a pointer to an explanation) how > i can set up an interrupt handler under windows to interact with a PCI board > plugged into my computer. > > in my company we are using a PCI I/O board which is only programmable through > the use of a library available only for C, VB and Pascal. i would like to > interract with this board from Ada, but writing a thin binding over the library > does not lead to anything useful. so i would like to create a really thick > binding by interacting directly with the board. > > this board is very well documented: i have all the interresting values address > expressed in term of BASE address + offset and all seems ok for me to read or > write them (or they wouldn't have documented this). > > but i need to set up an interrupt handler to get notified of events. i started > using Ada.Interrupts but discovered that the I/O board interrupt is reserved so > i can't register my own interrupt handler. > > so, how can I override the default handler ? is it safe to do it ? what about > shared interrupts ? in short, i want to know everything you can tell me about > system interrupt handling from Ada... > > thanks in advance. > > -- > rien