From: richard AT stardate DOT bc DOT ca Newsgroups: comp.os.msdos.djgpp Subject: Re: Detecting interrupt on printer port Date: Wed, 19 Aug 1998 04:02:07 GMT Organization: Rapidnet Technologies Internet Lines: 37 Message-ID: <35da4047.6260440@news.rapidnet.net> References: <_yLB1.90$Na1 DOT 583337 AT sapphire DOT mtt DOT net> <35d7c57b DOT 36585684 AT news DOT rapidnet DOT net> <6rba5l$b9v$1 AT groa DOT uct DOT ac DOT za> NNTP-Posting-Host: wlp47.rapidnet.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 19 Aug 1998 01:01:19 GMT, "Michel Gallant" wrote: > >Fabian Nunez wrote in message <6rba5l$b9v$1 AT groa DOT uct DOT ac DOT za>... > >>??? Are you sure about that? I'm pretty sure that '1' on port 21h >>means "mask out this IRQ"... (although I'm in the lab at uni, and my >>inter57 is sitting several K's away at home) Yup I got it backwards. > >Fabian, you are right. I looked it up myself in a reference manual I >have. I did incorporate an interrupt-unmasking routine into my >program (CLEARING bit 7 of 0x21) and my program still doesn't work. >Any other suggestions? Thanks. One thought strikes me. Interrupt 7 has the lowest priority, meaning all other interrupts get seviced first. Is it possible that by the time the interrupt has a chance to be serviced, the acknowledge line has gone high again and the interrupt is never called? Interrupt 15, that you have been catching should have a high priority because it is a hard drive interrupt. I don't think the 8259 latches its inputs. Have you tried connecting the acknowledge line to ground with a 1-2k resistor. This would force the interrupt to be on constantly and should get a responce, even if only once. Better yet would be a 555 time set up as an oscilator, then you can tweek both frequency and the percent of the frequencys period that is low. Just about any osilator that uses an RC network to control the frequency would work. If all else fails you could have a programme loop calling interrupt 7. This is not a normal situation but it can be done.