Microsoft KB Archive/59399

= Basic 7.0 UEVENT Example Causes Subsequent Programs to Hang =

Article ID: 59399

Article Last Modified on 11/21/2006



This article was previously published under Q59399



SYMPTOMS
The sample program for trapping a user-defined event on Pages 310-312 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; for Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 contains a misprint, but even if corrected, this sample program may cause the computer to hang after it is run.



STATUS
Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
Page 311 of &quot;Microsoft Basic 7.0: Programmer's Guide&quot; contains a misprint in the MASM programming example for trapping a user-defined event. If the code is not corrected, an &quot;A2009: Symbol not defined&quot; error will result when the code is assembled.

The last section of code for this example reads as follows: RestInt proc  uses ds       lds dx, cs:OldVector mov x, 251CH          ; <== this line contains the misprint To correct the code, make the following change: RestInt proc  uses ds       lds dx, cs:OldVector mov ax, 251CH         ; <== change &quot;x&quot; to &quot;ax&quot; However, even when this misprint is corrected, if the Basic program is compiled so that it requires a run-time module or if the assembly code is put into a Quick library, running the program may cause the computer to hang. The problem does not occur if the Basic program is compiled with the BC /O option.

The following compiling and linking steps will reproduce the problem:

  Assemble the MASM code as follows: MASM MASMPROG.ASM;   Compile the Basic code so that it requires a run-time module (no /O) and enables event trapping (/V). If the program is compiled as a stand-alone program (with the /O option), the problem does not exist. BC BASPROG.BAS /V;   LINK the program using the Basic PDS 7.00 or 7.10 linker, as follows: LINK BASPROG.OBJ + MASMPROG.OBJ;  Run the program. The computer may hang instantly or may hang after attempting to run another program, such as QBX.EXE.

Additional query words: BasicCom SR# S900222-46 docerr buglist7.00 buglist7.10

Keywords: KB59399

-

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

© Microsoft Corporation. All rights reserved.