KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q68111: No Mouse with GRDEMO.EXE Sample Program May Cause M6111

Article: Q68111
Product(s): See article
Version(s): 2.50 2.51
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist2.50 s_quickasm | mspl13_c
Last Modified: 17-JAN-1991

The Microsoft QuickC versions 2.50 and 2.51 compiler includes a sample
program called GRDEMO.EXE that is created using GRDEMO.MAK. The module
MOUSE.C incorrectly returns from the function MouseInit() when no
mouse is found. It will return without cleaning up the stack, which
may cause the following error:

   run-time error M6111: MATH
   floating-point error: stack underflow

To work around this problem, make the following programming changes in
MOUSE.C, and rebuild the program:

1. Change line 74 from

      ret

   to the following:

      jmp    nomouse

2. Add the label "nomouse" just prior to the end of the inline
   assembly code:

   ...
      mov   mi.cBtn, bx      ; Save...
   nomouse:
   }

Microsoft has confirmed this to be a problem in QuickC versions 2.50
and 2.51. We are researching this problem and will post new
information here as it becomes available.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.