Difference between .COM and .EXE formats

Asked By 280 points N/A Posted on -
qa-featured

Hi, How are you? What’s the difference between .COM and .EXE formats? Please hurry, I am waiting for answers. Thanks.

SHARE
Best Answer by B.lie
Best Answer
Best Answer
Answered By 25 points N/A #88925

Difference between .COM and .EXE formats

qa-featured

 

A .COM file can be viewed as a replica of the way the program will be seen in main memory whereas an .EXE file experiences further relocation at the time of running thus begins with a relocation header.
 
.COM file has a maximum capacity of 64K altogether, but EXE file has no such limitation – it can be as long as the RAM can execute. If the first two bytes are MZ or ZM, then DOS assumes it is .EXE file, whatever the file extension suggests. Otherwise it will be considered as a .COM file. They must have a length less than 0xFF00 since PSP is 256 bytes long. 
 
Any .COM file can be changed into .EXE file just by adding a header. Other differences also exist.
Entry to the .COM file must be 0x100 but that to the .EXE file can be any address.
The space of 64K that is left unused by the code is the stack size of the .COM file but the stack size of .EXE file does not have such limitations.
 
Answered By 0 points N/A #88926

Difference between .COM and .EXE formats

qa-featured

 

Hello,
 
In Microsoft Windows Operating Systems technology, Component Object Model(.COM) enables software components to communicate. It is used by developers to create re-usable system components, link components together to build applications, and take advantage of windows services. It is used in implementing objects that can be used on environments different from the ones in which they created. In other words, COM act as an interface where different types of object models interact with each other.
 
The .exe on the other hand also known as executable are programs that causes a computer to perform indicated task according to encoded instructions. Executable files can also be made using object oriented programming languages like Visual Basic where your project can generate or create executable file. For example, you created a simple calculator written in visual basic and you requested to create a executable file. That executable file can be opened or work even on other machines without a Visual Basic installed or that file would work directly when being opened without opening a Visual Basic program to run a calculator you have created.
 
Hope you get the picture of this solution,
 
Thank you.
Answered By 0 points N/A #88927

Difference between .COM and .EXE formats

qa-featured

 

COM (Component Object Model) was started by Microsoft and is a binary-interference standard for software component. Programming languages are able to use inter process communication and dynamic object creation because of this. The term COM covers OLE, OLE Automation, ActiveX, COM+ and DCOM technology.
 
The domain name .com is a top level domain of the internet system. The name has come from the word commercial, indicating that the commercial organizations will register under this domain. Now this is not followed after .com, .org and .net made unrestricted. 
 
EXE stands for executable files in different operating systems included DOS, OpenVMS, Microsoft Windows, Symbian, and OS/2. This file contains the program that is executable and can also hold other components known as resources such as images and icons to be used during the execution of the exe file.
Answered By 0 points N/A #88929

Difference between .COM and .EXE formats

qa-featured

.COM file is a copy of the program how it will be in the main memory but an .EXE file requires further relocation at the time of running thus begins with a relocation header.

.COM file has a maximum capacity of 64K altogether, but EXE file has no such limitation – it can be as long as the RAM can execute. If the first two bytes are MZ or ZM, then DOS assumes it is .EXE file, whatever the file extension suggests. Otherwise it will be considered as a .COM file. They must have a length less than 0xFF00 since PSP is 256 bytes long.

Any .COM file can be changed into .EXE file just by adding a header. Other differences also exist.
Entry to the .COM file must be 0x100 but that to the .EXE file can be any address.
The space of 64K that is left unused by the code is the stack size of the .COM file but the stack size of .EXE file does not have such limitations.

During the time of loading of a COM file, all of the free memory (TPA) that DOS has allocated for that COM file is freeze. If you don’t want this then you need to free them clearly. The header of an EXE file, you can tell how much space in TPA that EXE file would take.

Related Questions