🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2742

Re: what is the format of a .exe file?

#2742
From: Dave The DM
Date: Sun, 21 Oct 1990 18:30
24 lines
1425 bytes
   The first 1024 bytes of an .EXE file is a header containing
(among other things) relocation and file-size information. This
is not executable code but is instead used by the DOS loader.

   YOu cannot just copy the .EXE file into an array of char

and execute it. One of the things that makes a .EXE file superior
to the much older .COM file (aside from the fact that it is not
limited to 64 KB) is that it is relocatable during run-time.

   So...if you want to perform all the address calculations and 
the like that the DOS loader performs when executing a .EXE file,
have fun. You can do things like that (if I see where you are
heading, you're looking to write an interpreter of some sort) 
but there's a whole lot of homework and bookkeeping involved that
is normally handled by DOS.

   Suggested reading: The Waite Group's "MS-DOS Developer's
Guide   2nd Edition"   Published by Howard and Sams. Also
Dettman's "DOS Programmer's Reference  2nd Edition" published
by QUE.

Dave
Technical Details
Message-ID: <1990Oct21.183039.1601@ncsuvx.ncsu.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!cs.utexas.edu!wuarchive!emory!gatech!ncsuvx!news
References: <1990Oct18.184341.25578@nntp-server.caltech.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!sun-barr!cs.utexas.edu!wuarchive!emory!gatech!ncsuvx!news
From: bank@lea.ncsu.edu (Dave The DM)
Newsgroups: comp.os.msdos.programmer
Subject: Re: what is the format of a .exe file?
Message-ID: <1990Oct21.183039.1601@ncsuvx.ncsu.edu>
Date: 21 Oct 90 18:30:39 GMT
References: <1990Oct18.184341.25578@nntp-server.caltech.edu>
Organization: /etc/organization
Lines: 24