Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Header for .EXE file format

Posted on 1998-01-18
6
Medium Priority
?
622 Views
Last Modified: 2011-09-20
Can anyone help me by letting me know the header for .EXE file format?
0
Comment
Question by:justinng
6 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1178457
Go to MSDN and search for EXE header.

http://www.microsoft.com/msdn


0
 

Author Comment

by:justinng
ID: 1178458
I just wanna know the header for .exe only and not the URL to it.
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1178459
For 5 points it's the best you'll get
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:justinng
ID: 1178460
yeah I guess so...
but I really hope that some experts out there could narrow my search a bit regardless of the points allocated.
0
 

Accepted Solution

by:
rjh107 earned 0 total points
ID: 1178461
This is a straight dump from HelpPC, is it what you are looking for?


 HelpPC 2.10           Quick Reference Utility     Copyright 1991 David Jurgens

                     .EXE - DOS EXE File Structure
 
      Offset Size           Description
 
        00   word  "MZ" - Link file .EXE signature (Mark Zbikowski?)
        02   word  length of image mod 512
        04   word  size of file in 512 byte pages
        06   word  number of relocation items following header
        08   word  size of header in 16 byte paragraphs, used to locate
                   the beginning of the load module
        0A   word  min # of paragraphs needed to run program
        0C   word  max # of paragraphs the program would like
        0E   word  offset in load module of stack segment (in paras)
        10   word  initial SP value to be loaded
        12   word  negative checksum of pgm used while by EXEC loads pgm
        14   word  program entry point, (initial IP value)
        16   word  offset in load module of the code segment (in paras)
        18   word  offset in .EXE file of first relocation item
        1A   word  overlay number (0 for root program)
 
        - relocation table and the program load module follow the header
        - relocation entries are 32 bit values representing the offset
          into the load module needing patched
        - once the relocatable item is found, the CS register is added to
          the value found at the calculated offset
 
       Registers at load time of the EXE file are as follows:
 
        AX:      contains number of characters in command tail, or 0
        BX:CX      32 bit value indicating the load module memory size
        DX      zero
        SS:SP      set to stack segment if defined else,  SS = CS and
              SP=FFFFh or top of memory.
        DS      set to segment address of EXE header
        ES      set to segment address of EXE header
        CS:IP      far address of program entry point, (label on "END"
              statement of program)
 
 

0
 

Author Comment

by:justinng
ID: 1178462
Thanks a million rjh107!! It's exactly what I'm looking for! :)

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question