Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently downloaded MS-DOS 6 on my laptop and I want to be able to do all the commands on cmd but I need to go convert the .exe to .com I will download any software to do this.

share|improve this question
    
Which .exe file? –  Synetech Sep 1 '12 at 21:02
    
I suppose in theory a program could disassembly a .com file and recompile it as an .exe, but I for one have never seen one. (Of course this is assuming you are talking about a DOS executable in the first place.) –  Synetech Sep 1 '12 at 21:05
add comment

2 Answers

up vote 21 down vote accepted

Methinks you're confused slightly on the meaning of the .com and .exe extensions.

  • .com is essentially an IMAGE of memory, restricted to less than 64K in size (actually more like 0xFF00 bytes, uh 65,280, technically since first 256 bytes for cmd line and stuff)
  • .exe is a linked program, (possibly) made up of parts of libraries and code, resources and whatnot, size is essentially unlimited, although physical memory limits do exist)

BOTH function equally well as commands, in fact, look in your DOS subdirectory, you'll find a scattering of .com files and a bunch of .exe files. Don't confuse the issue by thinking only .com files are COMmands. Just a naming convention.

It does have something to do with the CP/M roots of MSDOS, since program sizes were limited to 64k, and larger programs had to page themselves into memory... those WERE considered COMmands. But thankfully we've grown past the limitations of CP/M... into a whole new set of limitations... but that's another story.

Hopefully this helps.

share|improve this answer
    
0.S.o0 its ik converting a x644 bit program too x32 bit aka impossibble –  Jake Inc. Jun 18 '12 at 23:49
    
It's pretty much like converting apples to oranges: impossible, since they're very different. –  Renan Jun 18 '12 at 23:51
4  
no, 64-bitness and 32-bitness is a WHOLE 'nother thing. We're just talking about the programs usable in DOS. Although a 64bit version of DOS would be interesting... well interesting in a "ferrari engine in a vw bug" kinda way. –  lornix Jun 18 '12 at 23:56
    
@lornix You gave a very technically detailed answer, but you left out the important part: He can't do what he wants. The below answer is far more on point. In fact, by writing "BOTH function equally well as commands ...", you almost lead the questioner to think he might be able to do what he wants. –  Fran Jun 19 '12 at 0:08
    
he asked about how to convert .exe to .com to use as commands. What the user does past that wasn't specified. If he's trying to USE MSDOS 6 in a Windows environment, he's got other problems. Can only answer what's given, my crystal ball is out for annual maintenance. –  lornix Jun 19 '12 at 0:41
show 2 more comments

Different types of EXE files exist. Some can run on MS-DOS, while others require Windows. Those you can run on MS-DOS would not need any sort of conversion.

EXE files compiled for Windows, even if they accept command-line arguments and generate console output, will not run on DOS. They depend on Windows functionality and APIs (application programming interfaces) to work correctly.

If you try to run a Windows EXE file on DOS, you will get this message:

This program cannot be run in MS-DOS mode.
share|improve this answer
3  
Generally yes, though the behavior when run from dos can be customized. You can create a hybrid exe that will run as win32 console in windows, and also run on real dos. –  psusi Jun 19 '12 at 2:31
    
@psusi, I love dual-exes, but unfortunately they rarely work correctly. I tried combining the Windows calculator from XP with a simple DOS calculator and it did not work. :-( Unfortunately there are few tools that can accomplish this (I only have two) and even fewer that can properly support the variations of formats (e.g. Windows 9x+ PE). –  Synetech Sep 1 '12 at 21:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.