Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsh!rkl From: rkl@cbnewsh.ATT.COM (kevin.laux) Newsgroups: comp.sys.ibm.pc Subject: Re: Two Reply's: HW interrupts and COM port's Message-ID: <1506@cbnewsh.ATT.COM> Date: 16 Jun 89 16:22:02 GMT References: <2073@iesd.dk> Organization: AT&T Bell Laboratories Lines: 87 In article <2073@iesd.dk>, kjeld@iesd.dk (Kjeld Flarup) writes: > I have noted some questions concerning interrupts and COM ports. > First there is a reply to Dave Vasko: > PORT ADDRESS INTERRUPT > COM1 3F8-3FF IRQ4 > COM2 2F8-2FF IRQ3 > COM3 2F0-2F7 IRQ4 ( or IRQ2 ) > COM4 3F0-3F7 IRQ3 ( or IRQ5 ) > > I think. because noone seems to know for sure. COM3 and COM4 can be set to interrupt on IRQs 3 and 4, but they don't have to be. They can be *polled* and not interrupt driven. Some serial port cards also allow the user to set them up for IRQ 2 or 5. On at AT class machine, you can't use IRQ 2, because that's used for the interrupt from the second PIC (Programmable Interrupt Controller), or, if you have and EGA/VGA card installed, the video card takes over IRQ 2 for itself (and then has to do the work of intercepting and passing on the interrupts from the second PIC). On an XT class machine, both IRQs 2 and 5 are free. If COM3 and COM4 (as well as COM1 and COM2) are all to be interrupt driven, then you must have a special interrupt handler that will check to see which one of the COM ports actually generated the interrupt. > Let's look at the HW interrupt list Jonatan Vail wasn't sure about. > > IRQ 0 - Timer. > IRQ 1 - Keyboard. > IRQ 2 - EGA vertical retrace. > IRQ 3 - COM2. > IRQ 4 - COM1. > IRQ 5 - Fixed disk. <--only on *XT* class machines > IRQ 6 - Diskette. > IRQ 7 - LPT1. > IRQ 8 - Real time clock. > IRQ 9 - LAN adapter 1. > IRQ 10 - Reserved. > IRQ 11 - Reserved. > IRQ 12 - Mouse. > IRQ 13 - Coprocessor. > IRQ 14 - Fixed Disk. > IRQ 15 - Reserved. > Here is the *default* IRQ list for *XT* class machines: IRQ0 - Timer Channel 0 IRQ1 - Keyboard IRQ2 - Reserved IRQ3 - COM2 IRQ4 - COM1 IRQ5 - Fixed Disk IRQ6 - Diskette IRQ7 - LPT1 Here is the *default* IRQ list for *AT* class machines (286,386): 1st PIC: IRQ0 - Timer Channel 0 IRQ1 - Keyboard IRQ2 - Interrupt from 2nd PIC IRQ3 - COM2 IRQ4 - COM1 IRQ5 - LPT2 IRQ6 - Diskette IRQ7 - LPT1 2nd PIC: IRQ8 - Real Time Clock IRQ9 - Streaming Tape Unit IRQ10 - Reserved IRQ11 - Reserved IRQ12 - Reserved IRQ13 - Coprocessor IRQ14 - Fixed Disk IRQ15 - Reserved Now depending on what hardware you put in your system, various IRQs get taken over. For example, in XT class machines, the mouse would go on IRQ 2, but in an AT class machine, it would go on IRQ 5 (denying the use of LPT2). Note that sometimes, you can't use some hardware devices together because of the IRQ conflicts (like 3 individually interrupt driven COM ports (COM3 on IRQ 5) with a Mouse). --rkl