I have a serial communication program which was developed under DOS. This program installs a new 0x0C hardware interrupt handler to read from serial port COM1. Under DOS and Windows NT/XP/2000, it works very well. But when I run it under the DOS-box in Windows 98/Me, it cannot get anything from COM port. I traced the program and found that the new interrupt handler was invoked once and then will never be activated. I know it is due to the V86 mode. Could some one tell me how to code a new hardware interrupt handler for a DOS programme running in V86 mode.

BTW, I tried to install other software interrupt handler, such as 0x1C, it works OK in all the Windows OS.

Could somebody give me a solution about how to code the hardware interrupt handler? Thanks in advance
Posted on 2002-06-26 04:30:06 by CRxyz
Possibly the com port is permanently owned by windows system vm. Check setting COM1AutoAssign in system.ini or insert a new entry:

Posted on 2002-06-26 12:14:07 by japheth
thanks for the answers, but the problem is not solved. I traced the interrupt in VM and found that the DOS interrupt handler did not return to VM correctly. Could somebody give me an example on how to do it?

Posted on 2002-06-27 13:16:31 by CRxyz
As you have told your prog works in native real-mode DOS. There shouldn't be the need to make anything different in v86 mode (if the serial vxd works correctly which I assume is the case).
I dont understand the sentence "... found that the DOS interrupt handler did not return to VM correctly". Does that mean your irq handler is called? Does the machine crash on IRET?

Posted on 2002-06-28 03:59:03 by japheth
Yes, I used SOFTICE to trace the interrupt. I set the breakpoint on port read. When the system is started and recieve a character, the interrupt will be activated once. When the DOS user interrupt handler is finished, it passes the control to the VM(maybe). However, even there is no character comming to the serial port, in SOFTICE, the breakpoint can be activated again and again. Then after back to system, the system craches(SOFTICE is still alive). So I belive that the user interrupt handler makes the system (VM) move to an endless loop. Thus the VM thinks that the interrupt does not finished.

Surprinsingly, if I start DOS at first, then start Windows 98 by type 'win'. It works ok. But the problem is it still cannot work under WindowsMe.

I thought there is some special requirement to code the hardware interrupt handler for V86 mode. There is a book 'Windows Assembly Language and Systems Programming' which may disscuss such topic. But I cannot find this book now. Here is a link for this book,

Please help me out of thus
Posted on 2002-06-28 04:40:25 by CRxyz
somebody help me please
Posted on 2002-07-01 03:35:19 by CRxyz
More infos needed.

post your IRQ handler code!
Posted on 2002-07-01 03:52:43 by japheth
I've experienced a similar problem with DOS communications software in Win98SE, the program worked fine in Win95, maybe it's because Win98SE isn't perfectly DOS compatible?
Posted on 2002-07-04 19:23:26 by AmkG