EXE2BIN Cannot Convert QuickBasic .EXE Files to .COM Files (37413)



The information in this article applies to:

  • Microsoft QuickBASIC 1.0
  • Microsoft QuickBASIC 1.01
  • Microsoft QuickBASIC 1.02
  • Microsoft QuickBASIC 1.0a
  • 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
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
  • Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
  • Microsoft Basic Professional Development System for MS-DOS 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"
				

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB37413