Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Header for .EXE file format

Posted on 1998-01-18
6
Medium Priority
?
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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.

715 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