29 lines
1.6 KiB
C
29 lines
1.6 KiB
C
|
#define EMAGIC 0x5A4D /* Old magic number */
|
||
|
#define NEMAGIC 0x4E45 /* New magic number */
|
||
|
#define ERES2WDS 0x000A /* No. of reserved words in e_res2 */
|
||
|
|
||
|
struct exe_hdr /* DOS 1, 2, 3 .EXE header */
|
||
|
{
|
||
|
unsigned short e_magic; /* Magic number */
|
||
|
unsigned short e_cblp; /* Bytes on last page of file */
|
||
|
unsigned short e_cp; /* Pages in file */
|
||
|
unsigned short e_crlc; /* Relocations */
|
||
|
unsigned short e_cparhdr; /* Size of header in paragraphs */
|
||
|
unsigned short e_minalloc; /* Minimum extra paragraphs needed */
|
||
|
unsigned short e_maxalloc; /* Maximum extra paragraphs needed */
|
||
|
unsigned short e_ss; /* Initial (relative) SS value */
|
||
|
unsigned short e_sp; /* Initial SP value */
|
||
|
unsigned short e_csum; /* Checksum */
|
||
|
unsigned short e_ip; /* Initial IP value */
|
||
|
unsigned short e_cs; /* Initial (relative) CS value */
|
||
|
unsigned short e_lfarlc; /* File address of relocation table */
|
||
|
unsigned short e_ovno; /* Overlay number */
|
||
|
unsigned long e_sym_tab; /* offset of symbol table file */
|
||
|
unsigned short e_flags; /* old exe header flags */
|
||
|
unsigned short e_res; /* Reserved words */
|
||
|
unsigned short e_oemid; /* OEM identifier (for e_oeminfo) */
|
||
|
unsigned short e_oeminfo; /* OEM information; e_oemid specific */
|
||
|
unsigned short e_res2[ERES2WDS];/* Reserved words */
|
||
|
long e_lfanew; /* File address of new exe header */
|
||
|
};
|