X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "MattFlyer" Newsgroups: comp.os.msdos.djgpp Subject: DJGPP and hardware interrupts Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Thu, 15 Jul 2004 22:04:58 GMT NNTP-Posting-Host: 66.56.170.13 X-Complaints-To: abuse AT rr DOT com X-Trace: twister.southeast.rr.com 1089929098 66.56.170.13 (Thu, 15 Jul 2004 18:04:58 EDT) NNTP-Posting-Date: Thu, 15 Jul 2004 18:04:58 EDT Organization: RoadRunner - Triad To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com All, I seem to be having some problems with hooking a hardware interrupt in a program compiled with djgpp. Since it is a hardware interrupt, it requires inports / outports to setup the hardware that drives the interrupt pins. However, the code (and hardware) work fine when compiled with borland in real mode. Of course the ISR installer is quite different, the other aspects are for the most part the same. The hardware uses irq 10, or int 0x72 as it translates to the 8259. I am enabling this int on the 8259 and calling the _go32 functions to get the old vetor, saving it, allocating a wrapper, creating the info structs that contain the PM offset and CS seg .. etc, and so forth and setting (I don't care about chaining but have tried that too) the interrupt. I don't have any code handy, as I am writing from home and this is at work, or else I would post an example to show. I have read about every tutorial on interrupts I can find to no avail. If I try to hook a different int such as int 8 the timer int on irq 0, and vector to the same handler, the routine executes, but I can't seem to hook the irq 10. Again, the hardware and software that setup and enable the ints outside of the int installer is pretty much identical - so it should work. Has anybody done something similar to this or have any suggestions. If necessary I could post part of the code here.