[comp.sys.ibm.pc.misc] PC Interrupts, urgent request

teg@cci632.UUCP (Thomas Gauger) (01/03/91)

I need an immediate reply to a troublesome interrupt question.
Today is Thursday 1/3/91, quickness is of the essence (sp?).

I have a Real-Time Devices AD1000 A/D conversion board. I am tring to
intercept an external interrupt using the EXTRI input line. This line
is tied to IRQ5 via a jumper on the board. That is the hardware configuration
I seem to have no problem there. Interrupts are received as IRQ5 by software.

The software for the interrupt handler is broken down into 3 parts: an
initialization routine, an interrupt handler, and a clean up routine (for
termination of the process handling the interrupts).

The initialization routine sets up the interrupt vector using (I am using
the MS Quick C compiler) dos_getvect() and dos_setvect(). I do the
dos_getvect() to save the original IRQ5 handler. I then read the OCW1 control
word of the 8259A Intel Interrupt control chip, to get the current
interrupt mask, and then enable IRQ5. Interesting at this point, IRQ5 was
already enabled. I save the current mask for restoration in the clean up
routine. Interrupts are recieved at this point (when generated).

The interrupt handler reads some ports off the AD1000 board and then 
issues a SPECIFIC EOI (end of interrupt) command to the 8259A chip. The
specific interrupt is of course IRQ5. I also reenable the IRQ5 interrupt
in OCW1 (I don't know if this is necessary or not, but it does not seem
to hurt). End of interrupt handler. Please note that I don't currently
chain to the original interrupt handler, maybe this is a problem.

The clean up routine, which is called at process termination, resets the
IRQ5 mask in OCW1 to its original value and restores the original
interrupt vector with a dos_setvect().

Now for my problem, according to all of the documentation that I have, IRQ5
(I am using an Everex IBM PC/XT compatible) is used for LPT2 interrupts.
LPT2 is not installed. Therefore I should have no problem, but when I
exit the program that uses the IRQ5, the floppy drive A: (the box has no B:
drive) no longer functions. I always get a time out error resulting in
drive not ready. A reboot corrects the problem, but this is not acceptable.
I did see in some of my documentation that IRQ5 was used on the original PC
is the floppy disk interrupt.

Is there a conflict here? Should I use a different interrupt line?
I can not use IRQ7, I have another board from another customer (not
currently installed) that will be using IRQ7 with software that they
will be providing. Can anyone tell me what the problem is?

Please E-Mail all responses ASAP, I need the info quickly.

Thanks in advance.
--------------------------------------------------
Thomas E. Gauger
The TEGGER

Rochester's self proclaimed #1 Bill's fan
Section C5, Row 32, Seats 109 & 110

Buffalo: 38
Opponents: 14

dubner@hpspkla.spk.hp.com (Joe Dubner) (01/07/91)

> The initialization routine sets up the interrupt vector using (I am using
> the MS Quick C compiler) dos_getvect() and dos_setvect(). I do the
> dos_getvect() to save the original IRQ5 handler. I then read the OCW1 control

I don't know a lot about the interrupt controller chip in the PC, and
know even less about MS Quick C, but I'd be willing to bet good money
that dos_getvect() works on software interrupts, not hardware IRQ lines.
When you do a dos_getvect() on "5", you're saving the INT 05h vector,
which is used to sense the PrtSc key.

Lots of luck.


... Joe