New Executable

A Win16 által bevezetett New Executable fájlformátumának fejléce:

Table 1282
Format of new executable header:
Offset  Size    Description     
 00h  2 BYTEs   "NE" (4Eh 45h) signature
 02h  2 BYTEs   linker version (major, then minor)
 04h    WORD    offset from start of this header to entry table (see #1289)
 06h    WORD    length of entry table in bytes
 08h    DWORD   file load CRC (0 in Borland's TPW)
 0Ch    BYTE    program flags (see #1283)
 0Dh    BYTE    application flags (see #1284)
 0Eh    WORD    auto data segment index
 10h    WORD    initial local heap size
 12h    WORD    initial stack size (added to data seg, 0000h if SS <> DS)
 14h    DWORD   program entry point (CS:IP), "CS" is index into segment table
 18h    DWORD   initial stack pointer (SS:SP), "SS" is segment index

if SS=automatic data segment and SP=0000h, the stack pointer is
                  set to the top of the automatic data segment, just below the
                  local heap
 1Ch    WORD    segment count
 1Eh    WORD    module reference count
 20h    WORD    length of nonresident names table in bytes
 22h    WORD    offset from start of this header to segment table (see #1287)
 24h    WORD    offset from start of this header to resource table
 26h    WORD    offset from start of this header to resident names table
 28h    WORD    offset from start of this header to module reference table
 2Ah    WORD    offset from start of this header to imported names table
                (array of counted strings, terminated with a string of length
                  00h)
 2Ch    DWORD   offset from start of file to nonresident names table

 30h    WORD    count of moveable entry point listed in entry table
 32h    WORD    file alignment size shift count
                0 is equivalent to 9 (default 512-byte pages)
 34h    WORD    number of resource table entries
 36h    BYTE    target operating system
                00h unknown
                01h OS/2
                02h Windows
                03h European MS-DOS 4.x
                04h Windows 386
                05h BOSS (Borland Operating System Services)
                81h PharLap 286|DOS-Extender, OS/2
                82h PharLap 286|DOS-Extender, Windows
 37h    BYTE    other EXE flags (see #1285)
 38h    WORD    offset to return thunks or start of gangload area
 3Ah    WORD    offset to segment reference thunks or length of gangload area
 3Ch    WORD    minimum code swap area size

 3Eh  2 BYTEs   expected Windows version (minor version first)
Note:   this header is documented in detail in the Windows 3.1 SDK Programmer's
          Reference, Vol 4.

Ha képernyővédőről van szó, akkor kell még egy discreptor is:

ahol azt a nevet adjuk meg a kimélőnek, amivel a vezérlőpult legördülő menüjében majd kiválaszthatjuk.

Nézzünk egy példát:
0000  4D 5A CB 01 01 00 00 00-04 00 00 00 FF FF 00 00   MZ..............
0010  B8 00 00 00 00 00 00 00-40 00 00 00 00 00 00 00   ........@.......
0020  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
0030  00 00 00 00 00 00 00 00-00 00 00 00 80 00 00 00   ................
0040  0E 1F BA 0E 00 B4 09 CD-21 B8 01 4C CD 21 54 68   ........!..L.!Th
0050  69 73 20 70 72 6F 67 72-61 6D 20 72 65 71 75 69   is program requi
0060  72 65 73 20 4D 69 63 72-6F 73 6F 66 74 20 57 69   res Microsoft Wi
0070  6E 64 6F 77 73 2E 0D 0A-24 00 00 00 00 00 00 00   ndows...$.......
0080  4E 45 05 32 55 01 2D 00-00 00 00 00 0A 03 02 00   NE.2U.-.........
0090  40 1F 88 13 36 15 01 00-00 00 02 00 02 00 03 00   @...6...........
00A0  AF 00 40 00 50 00 36 01-3E 01 44 01 02 02 00 00   ..@.P.6.>.D.....
00B0  07 00 04 00 00 00 02 08-2E 00 6E 03 00 00 0A 03   ..........n.....
00C0  30 00 29 29 50 1D 29 29-00 03 B9 07 51 0C B9 07   0.))P.))....Q...
00D0  04 00 0E 80 01 00 00 00-00 00 9C 03 03 00 30 1C   ..............0.
00E0  64 80 00 00 00 00 02 80-04 00 00 00 00 00 9F 03   d...............
00F0  BF 92 30 1C C8 00 00 00-00 00 5E 96 45 49 30 1C   ..0.......^.EI0.
0100  D3 00 00 00 00 00 A3 DF-3C 02 30 1C DD 00 00 00   ........<.0.....
0110  00 00 DF E1 27 00 30 1C-7F 80 00 00 00 00 05 80   ....'.0.........
0120  04 00 00 00 00 00 06 E2-18 00 30 1C D3 87 00 00   ..........0.....
0130  00 00 1E E2 11 00 30 1C-D0 87 00 00 00 00 2F E2   ......0......./.
0140  13 00 30 1C D1 87 00 00-00 00 42 E2 0B 00 30 1C   ..0.......B...0.
0150  D2 87 00 00 00 00 06 80-02 00 00 00 00 00 7E 03   ..............~.
0160  11 00 70 1C 3F 80 00 00-00 00 90 03 09 00 70 1C   ..p.?.........p.
0170  40 80 00 00 00 00 03 80-02 00 00 00 00 00 4D E2   @.............M.
0180  8B 00 30 1C 01 80 00 00-00 00 D8 E2 2F 00 30 1C   ..0........./.0.
0190  02 80 00 00 00 00 00 00-0A 42 49 54 4D 41 50 5F   .........BITMAP_
01A0  32 35 36 09 42 49 54 4D-41 50 5F 31 36 08 43 4F   256.BITMAP_16.CO
01B0  52 50 4C 4F 47 4F 04 47-54 53 53 00 00 00 01 00   RPLOGO.GTSS.....
01C0  08 00 0C 00 00 06 4B 45-52 4E 45 4C 03 47 44 49   ......KERNEL.GDI
01D0  04 55 53 45 52 07 FF 01-CD 3F 01 72 1C 01 CD 3F   .USER....?.r...?
01E0  01 BA 1F 01 CD 3F 01 F0-07 01 CD 3F 01 62 0D 01   .....?.....?.b..
01F0  CD 3F 01 72 12 01 CD 3F-01 7E 14 01 CD 3F 01 AA   .?.r...?.~...?..
0200  05 00 0F 53 43 52 4E 53-41 56 45 20 3A 42 20 4D   ...SCRNSAVE :B M
0210  20 57 00 00 12 44 4C 47-49 4E 56 41 4C 49 44 50    W...DLGINVALIDP
0220  41 53 53 57 4F 52 44 06-00 0F 53 43 52 45 45 4E   ASSWORD...SCREEN
0230  53 41 56 45 52 50 52 4F-43 01 00 10 41 52 52 4F   SAVERPROC...ARRO
0240  57 43 4F 4E 54 52 4F 4C-50 52 4F 43 03 00 0E 44   WCONTROLPROC...D
0250  4C 47 47 45 54 50 41 53-53 57 4F 52 44 05 00 1A   LGGETPASSWORD...
0260  53 43 52 45 45 4E 53 41-56 45 52 43 4F 4E 46 49   SCREENSAVERCONFI
0270  47 55 52 45 44 49 41 4C-4F 47 02 00 1D 48 45 4C   GUREDIALOG...HEL
0280  50 4D 45 53 53 41 47 45-46 49 4C 54 45 52 48 4F   PMESSAGEFILTERHO
0290  4F 4B 46 55 4E 43 54 49-4F 4E 07 00 11 44 4C 47   OKFUNCTION...DLG
02A0  43 48 41 4E 47 45 50 41-53 53 57 4F 52 44 04 00   CHANGEPASSWORD..