KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q64877: "File Not Found …" If BASIC RUNs a C 6.00 Overlaid Program

Article: Q64877
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | B_BasicCom S_C SR# S900807-15 | mspl13_basic
Last Modified: 5-SEP-1990

When a Microsoft C Professional Development System (PDS) version 6.00
overlaid program is executed by using the RUN statement from an .EXE
program compiled in Microsoft QuickBASIC version 4.00, 4.00b, or 4.50,
or in Microsoft BASIC Compiler version 6.00 or 6.00b, the error
message "File not found in module ..." will display.

This is due to BASIC not handling the new C 6.00 methods of overlay
management. This incompatibility has been corrected in Microsoft BASIC
Professional Development System (PDS) versions 7.00 and 7.10.

This information applies to Microsoft QuickBASIC versions 4.00, 4.00b,
and 4.50, and to Microsoft BASIC Compiler versions 6.00 and 6.00b for
MS-DOS.

The following programs demonstrate the problem. The first program is
A.BAS:

   print "in basic"
   run "b.exe"

Compile and LINK in QuickBASIC 4.00, 4.00b, and 4.50 or Microsoft
BASIC Compiler version 6.00 or 6.00b:

   BC /O A ;
   LINK A.OBJ ;         [ This LINK creates A.EXE. ]

The following two programs are the C code that the BASIC program
calls. The first is B.C:

   void f(void);
   void main(void)
   {
       printf("here is c 6.00\n");
       f();
   }

The following is C.C:

   void f(void)
   {
       printf("in overlay\n");
   }

Compile and LINK using Microsoft C PDS 6.00, as follows:

   CL /c /AL b.c ;
   CL /c /AL c.c ;
   LINK b.obj (c.obj) ;

When A.EXE is run, the following message displays:

   File not found in module A        at address 246B:0042

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.