EXE file header

Length
Offset (bytes) Description
────────────────────────────────────────────────────────────────────────

00h 1 EXE file signature - always 4Dh 5Ah (MZ)
02h 2 Length of image remainder (modulus 512)
04h 2 Length of image in pages (div 512)
06h 2 Number of relocation table items
08h 2 Header size in paragraps (used to locate beginning
of the load module in the file)
0Ah 2 Minimum number of paragraphs required above the
loaded program
0Ch 2 Maximum number of paragraphs required above the
loaded program
0Eh 2 Offset of stack segment in load file
10h 2 Stack offset (initial SP)
12h 2 File check sum - negative sum of all the words in
the file, ignoring overflow
14h 4 Initial CS:IP (offset from PSP)
18h 2 Offset of relocation table within file
1Ah 2 Overlay number (0 for resident part)