Microsoft KB Archive/37413

From BetaArchive Wiki
Knowledge Base


EXE2BIN Cannot Convert QuickBasic .EXE Files to .COM Files

Article ID: 37413

Article Last Modified on 11/21/2006



APPLIES TO

  • Microsoft QuickBasic 1.0
  • Microsoft QuickBasic 1.01
  • Microsoft QuickBasic 1.02
  • Microsoft QuickBASIC 1.0b
  • Microsoft QuickBASIC 1.0b
  • Microsoft QuickBasic 2.0
  • Microsoft QuickBasic 2.01
  • Microsoft QuickBasic 3.0
  • Microsoft QuickBasic 4.0
  • Microsoft QuickBASIC 4.0b
  • Microsoft QuickBasic 4.5 for MS-DOS
  • Microsoft BASIC Compiler 6.0
  • Microsoft BASIC Compiler 6.0b
  • Microsoft BASIC Professional Development System 7.0



This article was previously published under Q37413

SUMMARY

With the introduction of the first MS-DOS operating system, the .EXE program and file structure came into existence. .EXE files allow much more flexibility than .COM files do. .COM files mimic the binary files of the earlier CP/M-80 operating system. (CP/M-80 was developed by Digital Research, Inc.)

Because .COM files allow the use of only one 64K segment and no stack segment (the so-called "tiny" memory model), .EXE files produced in QuickBasic cannot be converted to .COM files. QuickBasic uses the medium-memory model, which utilizes one data segment and one or more code segments. QuickBasic's far addressing capability also makes its .EXE files incompatible with the MS-DOS EXE2BIN.EXE program, which converts .EXE files to .COM files.

MORE INFORMATION

The EXE2BIN.EXE utility gives a "file cannot be converted" error message if you attempt to convert a QuickBasic .EXE compiled program.

Please refer to "The MS-DOS Encyclopedia," published by Microsoft Press, for more information on .EXE versus .COM files.

The following is a code example:

'Make a stand-alone .EXE named X.EXE from this program.
'Give the MS-DOS command: EXE2BIN X.EXE X.COM
'The "file cannot be converted" message results.
PRINT "TEST"
                


Additional query words: QuickBas BasicCom

Keywords: KB37413