Mail Archives: djgpp/1996/04/10/18:51:41
On 9 Apr 1996, Paul Derbyshire wrote:
> This may be slowly heading off topic, but I'm curious: what IS the
> difference between a .COM and a .EXE, aside from the MZ ZM thing and the
> file extension?
> Is there a difference in the code, in its functioning, in how DOS
> allocates it memory?
A com file is a binary image of a program. Dos allocates 64k, loads the
com file at offset 100h (512), creates a psp (info from dos to the
executable) at offset 0, and JMPs to 100h into the segment.
An exe file, can be many formats. The standard dos is something like this
(don't expect it to be right, but the idea is right):
MZ/ZM
Followed by info about the exe file, such as the expected entry point
(offset within the first segment), memory required and stuff, followed by
(i think) all the seperate segments (data,stack,code,etc) and I have no
idea how dos handles this......
Cia0, Joker/JAM Australia
- Raw text -