so@brownie.cs.wisc.edu (Bryan So) (06/16/90)
Somebody must have posted this before, but I am relatively new to this newsgroup, so... can somebody show me the general method to speak to COM3 and COM4? Can I simply service IRQ3 & IRQ4 as if they are COM1 and COM2? If so, how can I distinguish whether the interrupt is raised by COM1 or COM3 (take IRQ3 for example)? Thanks in advance. Bryan So
david@csource.OZ.AU (david nugent) (06/18/90)
In <10595@spool.cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan So) writes: >Somebody must have posted this before, but I am relatively new to >this newsgroup, so... can somebody show me the general method to >speak to COM3 and COM4? Can I simply service IRQ3 & IRQ4 as if >they are COM1 and COM2? In general, yes. >If so, how can I distinguish whether the >interrupt is raised by COM1 or COM3 (take IRQ3 for example)? Test each UART's EID register. Bit 0 will be low if there's an interrupt active. The rest of the bits in this register identify the interrupt type(s). Most cards with 4 ports don't support sharing of interrupts between ports correctly (unless they explicitly state that they do), but if they do you can look at both to determine which it was. Depending on the speed of the links, you may have to service received characters on both ports before moving on and servicing other less urgent things. david -- * Unique Computing Pty Ltd, Melbourne, Australia. * david@csource.oz.au 3:632/348@fidonet 28:4100/1@signet