FIX: MASM BELL and SNAP TSR Program Examples IncorrectLast reviewed: September 16, 1997Article ID: Q85877 |
6.00 6.00a 6.00b | 6.00 6.00a 6.00b
MS-DOS | OS/2kbtool kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSThe BELL and SNAP TSR (terminate-and-stay-resident) sample programs that ship with the Microsoft Macro Assembler (MASM) versions 6.0, 6.0a, and 6.0b are not correct. Because of the errors in this program, other programs that are executed after the BELL or SNAP TSR program has been installed may hang the computer.
CAUSEBecause of the segment ordering and the way memory is released when the BELL or SNAP TSR program goes resident, the BeepCount variable is being freed. Because this variable is changed in the interrupt service routine (ISR), any program that is run after the BELL or SNAP TSR program has gone resident may have its memory corrupted.
RESOLUTIONTo keep BeepCount from being released when BELL.EXE or SNAP.EXE terminates and goes resident, use one of the following solutions:
STATUSMicrosoft has confirmed this to be a problem in MASM versions 6.0, 6.0a, and 6.0b. This problem was corrected in MASM for MS-DOS version 6.1.
MORE INFORMATIONIn MASM 6.0, this program also generates the run-time error:
R6001 - null pointer assignmentThis particular problem was corrected in MASM 6.0a and 6.0b by stubbing out the function that checked for null pointer assignments. The R6001 error also occurs because of segment ordering and can be corrected with the first solution above. For more information on this problem, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q76945 TITLE : FIX: Sample Program BELL.C Causes R6001 Error |
Additional reference words: 6.00 6.00a 6.00b
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |