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
Solved

Header for .EXE file format

Posted on 1998-01-18
6
611 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

856 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