[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Format of .EXE file header:
Offset  Size    Description
 00h  2 BYTEs   .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
 02h    WORD    number of bytes in last 512-byte page of executable
 04h    WORD    total number of 512-byte pages in executable (includes any
                partial last page)
 06h    WORD    number of relocation entries
 08h    WORD    header size in paragraphs
 0Ah    WORD    minimum paragraphs of memory to allocation in addition to
                executable's size
 0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
 0Eh    WORD    initial SS relative to start of executable
 10h    WORD    initial SP
 12h    WORD    checksum (one's complement of sum of all words in executable)
 14h    DWORD   initial CS:IP relative to start of executable
 18h    WORD    offset within header of relocation table (40h for New EXE)
 1Ah    WORD    overlay number (normally 0000h = main program)
---new executable---
 1Ch  4 BYTEs   ???
 20h    WORD    behavior bits
 22h 26 BYTEs   reserved for additional behavior info
 3Ch    DWORD   offset of new executable header within disk file
---Borland TLINK---
 1Ch  2 BYTEs   ??? (apparently always 01h 00h)
 1Eh    BYTE    signature FBh
 1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
 20h  2 BYTEs   ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
---ARJ self-extracting archive---
 1Ch  4 BYTEs   signature "RJSX"
---LZEXE 0.91 compressed executable---
 1Ch  4 BYTEs   signature "LZ91"
---PKLITE compressed executable---
 1Ch  2 BYTEs   ???
 1Eh  6 BYTEs   signature "PKLITE" (followed by copyright message)
---LHarc 1.x self-extracting archive---
 1Ch  4 BYTEs   unused???
 20h  3 BYTEs   jump to start of extraction code
 23h  2 BYTEs   ???
 25h 12 BYTEs   signature "LHarc's SFX "
---LHA 2.x self-extracting archive---
 1Ch  8 BYTEs   ???
 24h 10 BYTEs   signature "LHA's SFX "
---other linkers---
 1Ch    var     optional information
---
  N   N DWORDs  relocation items
Notes:  if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
          versions of the MS linker set it that way
        if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
          program is loaded as high in memory as possible
        the maximum allocation is set to FFFFh by default

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson