Unsupported code

EN NL TR

The previous snipset

Home

The next snipset

Auto detecting the IRQ's of your COM ports / UART IRQ Detection

How does it work?

The program works by initializing all the UART's in the system. In a next phase it will flip the OUT2-bit of the Modem Control Register per COM. Flipping this bit will trigger an IRQ. Because the program took control of all interrupts, it knows exactly which IRQ belongs to which UART.
 

The code...

I've tested the code on different systems and it worked. You should take care of the fact that some hardware devices (mouse, CDROM, ...) may trigger an IRQ while the program is executing, thus resulting in incorrect results.

It's recommended that you know about programming the UART and IRQ's. If that's not the case, I don't think you will understand what is going on. But please... try!
 

Borland C++ Version view the source code download the executable (zipped)
DJGPP version view the source code download the executable


When it does not work...

This program will not be able to detect the IRQ's of PCI add-on cards because they have an interrupt mechanism of their own.  Therefor this piece of code will only work with ISA/EISA related UART cards.

 

The previous snipset

Home

The next snipset