Solved

Header for .EXE file format

Posted on 1998-01-18
6
607 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Handle Exceptions during instantiation 28 415
ADO Memory leak with DELPHI 2007 37 181
Issue accessing member variable of atomic class 16 115
How can i compile this github project?? 2 82
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

786 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