viraf@seas.gwu.edu (Viraf Bankwalla) (01/17/91)
Hi, The Waite Group's, MS-DOS Developer's Guide, Chapter 8, Programming the Serial Port, pg 471, has the following isr: /*---------------- C O D E --------------------* void interrupt far s_inthndlr(void) { int c; register int int_id, intmask; _enable(); /* Enable interrupts immediately */ while(TRUE) { ini_id = inp(IIR); if (bit0(int_id) == 1) { /* If bit 0 is 1, then no interrupts pending. ** Send an end of interrupt signal to the ** 8259A Programmable Interrupt Controller ** and return. */ outp(P8259_0, END_OF_INT); return; } /* If it is receive data ready interrupt ** enable interrupts for "transmit holding ** register empty" */ if (int_id >= RXDATARDY) turnon_int(THREINT, intmask); /* Process interrupt according to ID. The ** following list is in increasing order of ** priority. */ switch(int_id) { case MDMSTAT: /* Read modem status */ s_modemstatus = inp(MSR); break; case TXREGEMPTY: s_trmty(); break; case RXDATAREADY: s_rda(); break; case RLINESTATUS: /* Read line status */ s_linestatus = inp(LSR); break; } } } /*---------------- E N D C O D E --------------------* My question is, why are THRE interrupts enabled, if (int_id > RXDATAREADY). Is it to do with the interrupt priority ?. Any help would be greatly appreciated. Thanks in advance. viraf bankwalla viraf@seas.gwu.edu ...!uunet!gwusun!viraf