[comp.sys.ibm.pc.programmer] Windows 3.0 and COM: interrupts

dennis@cbnewsk.att.com (dennis.seipel) (06/07/91)

I have a problem with running a program I wrote inside Windows 3.0.  I
used MS's 'C'.  The problem involves capturing the COM interrupt vector.
My program uses "_dos_setvect()" to install the vector to my interrupt
handler for both COM2 ( IRQ3, vector 11 ) and the timer ( IRQ0, vector 8 ).
When I run the program outside Windows, it works fine.  I run MS's PWB
as a non-windows application in Windows and execute my program from PWB.
It appears that my interrupt service routine is not called for the COM
interrupt but works find for the timer interrupt.  When looking at a
serial protocol analyzer connected to COM2, I see a cntl-S being sent
from the PC even through there is no code in my program to send a
cntl-S.  I have also found that I only have a problem in "386 enhanced"
mode.  When in "real" mode everything works, but "real" mode isn't much
fun after you've gotten used to "enhanced" mode.

I assume Windows is not allowing my program to "take over" the COM
interrupt since it wants to control hardware resources.  If this is
true, is it possible to tell Windows to leave COM2 alone?

Thanks,
Dennis Seipel
AT&T Bell Laboratories