Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!dmssyd.syd.dms.CSIRO.AU!ditsydh.syd.dit.CSIRO.AU!evans From: evans@syd.dit.CSIRO.AU (Bruce.Evans) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: sharing hardware interrupts Message-ID: <1991May30.125133.527@syd.dit.CSIRO.AU> Date: 30 May 91 12:51:33 GMT References: <1991May29.014824.16278@ux1.cso.uiuc.edu> Organization: CSIRO Division of Info Tech, Sydney, Australia Lines: 29 In article <1991May29.014824.16278@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes: >Suppose you have two or more different serial ports in a PC. Surely >there is a register somewhere on there that indicates its status as to >whether or not it has changed state, or has a state that needs to be >dealt with. When any one of the serial ports causes an interrupt (for ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ it won't >the sake of discussion let's say it is #4 and nothing else uses #4) >the software driver will get into control, scan all the known serial >port addresses for states to deal with, and performs the appropriate >action for all of them that need it. > >Given the above software, why could it not be possible to have two or >more devices share the same interrupt. Because if 2 devices are driving the same interrupt line, the one driving it low wins. For some reason the PC interrupt h/w is designed so that low == no interrupt. This is the reverse of what is needed for easy interrupt sharing. It is easy to have 2 ports sharing the same interrupt line if you don't want them both to generate interrupts in the same application. The OUT2 port is wired as an interrupt-line enable. Turning it off allows another serial device to drive the shared line. It is important for applications that use it to restore it when they finish. I often have to clean up after Windows has left it hot for COM1 in order to use an old version of Mirror on COM3. Outputting 3 to port 3FC hex turns off the OUT2 bit (8) for COM1. -- Bruce Evans evans@syd.dit.csiro.au