Computing.Net > Forums > Programming > com,exe,bat, whats the difference?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

com,exe,bat, whats the difference?

Reply to Message Icon

Name: DickyDoo
Date: April 16, 2003 at 13:17:45 Pacific
OS: Windows XP
CPU/Ram: pentium4, 256Mb
Comment:

Windows uses file extensions to deternmine if a file is executable and the type of executable that it is but why does it need different types of executable and what are the technical difference in the way that it is executed. Surely the unix method of file mode permissions and checking the content of the file for the type is a safer and more flexible method as any file can potentially be executed and the problems occuring from incorrect extensions are eliminated.

Any thoughts would be much appreciated.



Sponsored Link
Ads by Google

Response Number 1
Name: egkenny
Date: April 16, 2003 at 14:38:50 Pacific
Reply:

Both COM and EXE are both binary executables files that contain processor instructions.
COM files are:
* limited in size to 64K
* start at 100 hex in memory
EXE files are
* not limited to 64K
* can start anywhere in memory
As can be seen COM files are very limited in use. EXE files are almost always uesd today.
EXE and COM files usually start out as text files containing keywords for a particular programming language such as Assembler, Basic, C, Pascal, etc. A compiler and linker are used to convert these keywords into a binary executable.

BAT files are ordinary text files. They cantain regular DOS commands plus special DOS commands created for use with batch files. Since these are regular text files DOS must read each line one by one when the batch file is run and perform actions based on its interpretation of that line.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: com,exe,bat, whats the difference?

g++ What the heck is it? www.computing.net/answers/programming/g-what-the-heck-is-it/6952.html

What the heck are binary bytes? www.computing.net/answers/programming/what-the-heck-are-binary-bytes/14333.html

What do you prefer high or low level www.computing.net/answers/programming/what-do-you-prefer-high-or-low-level/1673.html