Article View: alt.msdos.programmer
Article #1045Re: .com and .exe files
From: Antti Kangas
Date: Tue, 26 Jan 1993 20:19
Date: Tue, 26 Jan 1993 20:19
30 lines
2131 bytes
2131 bytes
Frank E. Prince (fprince@cwis.unomaha.edu) wrote:
: Could anyone tell me the difference between .com and .exe files. The
: most I've come up with is that a com file is an "executable memory image"
: but that definition was somewhat out of context, and I don't really
: understand it. I've done some assembly language programming with MASM so
: I do understand instruction sets, stacks, registers etc. Any information
: regarding this is much appreciated.
: Thanks,
: Frank
Well ,I'm not the expert with this area ,but I know the following things:
First, the .EXE file can be located anywhere in the memory space ,whereas
COM cannot.
Secondly, .EXE files allows four segments: STACK,DATA,CODE and EXTRA
which results in a more modular program.
The disadvantage of .EXE files is that the linker has to add extra code
that the program can be freely located in the memory.
COM can only contain one segment that includes the STACK, DATA and CODE
segments.
--> So, if your program is quite small ,a .COM file is preferable ,because
it's shorter and vice versa.
Hope this makes sense and clear the thing up a bit.
-- Antti
-------------------------------------------------------------------------------
scorpion@phoenix.oulu.fi University of Oulu,Department of Computer Engineering
@zombie.oulu.fi *****************************************************
gigolo@otitsun.oulu.fi ---==< Oulun TietoTeekkarit ry >==---
"The future is not set. There is no fate but what we make for ourselves."
Technical Details
Message-ID:
<1993Jan26.201921.21687@ousrvr.oulu.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!ousrvr.oulu.fi!phoenix.oulu.fi!scorpionReferences:
<1993Jan25.231026.6514@news.unomaha.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!news.funet.fi!ousrvr.oulu.fi!phoenix.oulu.fi!scorpion From: scorpion@phoenix.oulu.fi (Antti Kangas) Newsgroups: alt.msdos.programmer Subject: Re: .com and .exe files Message-ID: <1993Jan26.201921.21687@ousrvr.oulu.fi> Date: 26 Jan 93 20:19:21 GMT References: <1993Jan25.231026.6514@news.unomaha.edu> Sender: news@ousrvr.oulu.fi Organization: University of Oulu, Finland Lines: 30 X-Newsreader: TIN [version 1.1 PL6]