Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!linus!mwunix.mitre.org!jcmorris From: jcmorris@mwunix.mitre.org (Joe Morris) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: sharing hardware interrupts Message-ID: Date: 30 May 91 15:47:39 GMT References: <1991May29.014824.16278@ux1.cso.uiuc.edu> <1991May29.095441.1@dev8j.mdcbbs.com> Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation, Bedford MA Lines: 33 Nntp-Posting-Host: mwunix.mitre.org campbell@dev8j.mdcbbs.com (Tim Campbell) writes: >In article <1991May29.014824.16278@ux1.cso.uiuc.edu>, phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes: [question about sharing interrupts between two devices] >Ok - here's the skinny. When an interrupt occurs in a PC (say #4) the >state of the CPU is pushed onto the stack and the machine jumps to the >address pointed to by the ISR (interrupt service request) table. This >table is the first thing in memory. It's basically a bunch of address >(far pointers). IRQ0 would be at address 0000:0000, IRQ1 would be at >address 0000:0004, etc. (4 bytes to an interrupt to hold the far pointer). >IRQ4 would then be at address 0000:0010 (hex) OR 0001:0000 (however you >care to look at it) - this address would then contain the far pointer >to the invocation point of the interrupt handler. Something of a nitpick not directly related to the original question, but I think you meant to refer to "INTERRUPT 0 would be at 0000:0000, INTERRUPT 1 at 0000:0004" etc. The IRQ (Interrupt ReQuest) lines are signals on the I/O channel (and some other specialized items like the system clock) and don't map one-to-one with the hardware interrupt vectors. The offset is controlled by the initialization of the interrupt controller chip. IRQ0 (system timer) is produces the same effect as an INT 8 opcode; the two standard comm port interrupt request lines are IRQ4 (COM1; equivalent to INT 0Ch) and IRQ3 (COM2; equivalent to INT 0Bh). Don't ask me why COM1 is IRQ4 but COM2 is IRQ3. Take a look at the documentation for the SYSTEM.INI file in Windows and you'll see that the default layout for comm ports shares IRQ4 between COM1 and COM3, and shares IRQ3 between COM2 and COM4. No, I haven't tried it. Joe