Microsoft KB Archive/26543

= Hardware Errors During CALL INTERRUPT Hang the System =

Article ID: 26543

Article Last Modified on 11/21/2006



This article was previously published under Q26543



SYMPTOMS
DOS interrupt calls that result in a hardware error, such as an open disk-drive door or a bad sector, cause the system to hang.



STATUS
Microsoft has confirmed this to be a bug in QuickBasic Versions 4.00, 4.00b, and 4.50, and in Microsoft Basic Compiler Versions 6.00 and 6.00b (buglist6.00, buglist6.00b) for MS-DOS and MS OS/2. This problem was corrected in Microsoft Basic Professional Development System (PDS) Version 7.00 for MS-DOS and MS OS/2 (fixlist7.00).



MORE INFORMATION
When you are inside the editor and using the DOS interrupt procedures (INT86OD, INTERRUPT) to open a data file that is on a floppy disk, if the disk-drive door is left open, the error is caught and handled by the editor. However, if the program is made into an executable, when the door is left open, the error is not trapped and control is never returned to the Basic program. This effectively hangs the system.

To work around the problem, OPEN a file for input on the floppy disk and trap potential disk errors with ON ERROR GOTO before attempting to CALL INTERRUPT.

Results of testing with earlier versions show that the errors are trapped correctly with QuickBasic Version 3.00; therefore, the problem does not occur in Version 3.00.

The following is example code: TYPE RegType ax   AS INTEGER bx   AS INTEGER cx   AS INTEGER dx   AS INTEGER bp   AS INTEGER si   AS INTEGER di   AS INTEGER flags AS INTEGER END TYPE

DECLARE SUB INTERRUPT (intnum AS INTEGER, inreg AS RegType, outreg AS RegType)

DIM inarray AS RegType, outarray AS RegType

file$ = &quot;a:dummy.dat&quot; + CHR$(0)

inarray.ax = &H3D02 inarray.dx = SADD(file$)

CALL INTERRUPT(&H21, inarray, outarray) PRINT outarray.flags PRINT outarray.ax END

Additional query words: QuickBas BasicCom B_BasicCom buglist4.00 buglist4.00b buglist4.50

Keywords: KB26543

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.