From: Eduardo TUDA Lorenzetti Pellini Newsgroups: comp.os.msdos.djgpp Subject: RE: Basic IRQ mapping ... What am I doing wrong ? Date: Mon, 9 Apr 2001 19:19:12 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3AD3B039@MailAndNews.com> X-InterChange-Posted-By: dochell AT MailAndNews DOT com Sender: Eduardo TUDA Lorenzetti Pellini X-EXP32-SerialNo: 50000000 Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: InterChange (Hydra) News v3.61.08 X-Complaints-To: newsabuse AT supernews DOT com Lines: 62 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Thanks Eli, >> I'm trying to hook a &^@&^#&^ IRQ with my DJGPP program. >> I hate to post code on the newsgroup, but i don't have more options. >> The program is running over plain DOS (IO.SYS, MSDOS.SYS and COMMAND.COM >> ONLY). > >Are you sure this is plain DOS? Does that machine has Windows >installed? If so, please describe how did you boot it into plain >DOS. >Also, what do you load in CONFIG.SYS and AUTOEXEC.BAT? Yes, i'm sure it is a plain DOS: a boot disk with only IO.SYS, MSDOS.SYS and COMMAND.COM from the Windows 98 distribution (ripped the DRVSPACE.BIN) There's no Autoexec.bat or Config.SYS (not even a SHELL=C:\COMMAND.COM blablablabla) >Finally, are you using CWSDPMI as the DPMI server? What version of >CWSDPMI? The last one, release 5 (according to my MANIFEST directory). >What does it mean ``doesn't work''? Does the counter in the interrupt >routine stay at its zero value, or does something else go wrong? Well, after the redirection of the ISR 8 routine, the program do not finnish ! The counter never arrives at the final value to trigger the rest of the code to finnish the program. I expected to have the IRQ 0 ticking at 18.2 times/sec and my counter to be updated with that frequency... but nothing happens... Do I need to reactivate the IRQ 0 generation on any system timer port inside my new ISR (for example, the IRQ is generated for the first time, the ISR needs to reactivate it again for the next loop and so on...) >Hooking the protected-mode interrupt is all you need. Hardware >interrupts are always reflected to protected mode. Ok... i was very confused after reading so many how-to's and comments over the NET. >I don't see anything wrong in your code, except that I'd suggest to >explicitly disable interrupts (with a call to disable()) before you >call hookint in your main function, and then re-enable them with a >call to enable(). I agree with you... I will do that. I will try the modifications you suggested... Thanks one more time my friend... Eduardo TUDA DocHell Lorenzetti Pellin PEA - Electrical Energy and Automation Department USP - Politechnical School of Sao Paulo University - BRAZIL http://www.pea.usp.br/~epellini --------------------------------- And if you have a time to loose, an open mind, and right to choose, would you care to take a look, or can you read me like a book... time's is allways on my side... --------------------------------- (Up the Irons !!!)