jrd@cc.usu.edu (11/12/90)
MS-DOS Kermit handles COM3/4 as follows: Look in segment 40h for the word corresponding to the port (COM1 uses 40:0, COM2 uses 40:2 etc). If the word is zero then declare no_such_ hardware and revert to Bios calls instead. If the word is non-zero then check the UART hardware for indications that it's compatible with a std 8250 style chip (includes 16550's too, natch). Then the delicate part, and where Telix may have problems, is find which of two IRQs (4 or 3) the port is using by running a live but harmless test of generating a UART condition which in turn generates an interrupt and see which responds. The receive-char interrupt handler in MS-DOS Kermit can manage level sensitive and edge triggered interrupts (PS/2, everyone else, resp) and multiple characters being available (the 16550A fifo mode problem), and it can chain interrupts to the previous owner if the device doing the interrupt generation is not the UART of interest. Maybe here too lies a Telix difficulty. Thus, Kermit can live with multiple interrupters on the same IRQ provided those devices don't clamp the IRQ wire in one state. One quickly gets the idea that there a lot of tiny wheels in motion for these things. The full story is infinitely boring to everyone except those writing code for serial ports. Stray interrupts have to be accomodated, and chip access timing has to be considered, and so on. Joe D.