home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / INTER32C.ZIP / INT2GUID.ZIP / INT2GUID.TAB < prev   
Encoding:
Text File  |  1992-03-14  |  28.9 KB  |  718 lines

  1. ;Text for INT2GUID conversion program, topic 21.
  2. ;INT2GUID converts INTERRUP.LST files to input for GUIDE.
  3. ;
  4. ;This file contains tables extracted from the INTERRUP.LST file. Tabs in
  5. ;the extracted text were filtered to 1 - 8 spaces.
  6. ;
  7. ;This file includes 4 extra topics. Reserve additionally 6 topics, or a
  8. ;total of 10.
  9. ;
  10. ;Topic headings are included in the GUIDE main index unless the configuration
  11. ;file specifies mask 0x8000.
  12. ;
  13. PSP Format, Environment Block, Country Specific Information, Error List
  14.  
  15. This entry gives access to tables extracted from the INTERRUP.LST file.
  16.  
  17.   22PSP + Env.   Program Segment Prefix Format + Environment
  18.   23Country      Specific Information
  19.   24Errors       Returned by DOS Funtion Calls
  20.   25EXE          *.EXE File Header etc.
  21. ;
  22. !TOPIC 22 PSP Format
  23. !! 0x8000
  24. !NOINDEX
  25. !! 0
  26. ;
  27. ----------2126-------------------------------
  28. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  29.         AH = 26h
  30.         DX = segment at which to create PSP (see below for format)
  31. Notes:  new PSP is updated with memory size information; INTs 22h, 23h, 24h
  32.           taken from interrupt vector table
  33.         (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  34.           copy
  35. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  36.  
  37. Format of PSP:
  38. Offset  Size    Description
  39.  00h  2 BYTEs   INT 20 instruction for CP/M CALL 0 program termination
  40.  02h    WORD    segment of first byte beyond memory allocated to program
  41.  04h    BYTE    unused filler
  42.  05h    BYTE    CP/M CALL 5 service request (FAR JMP to 000C0h)
  43.                 BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  44.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  45.  08h  2 BYTEs   remainder of FAR JMP at 05h
  46.  0Ah    DWORD   stored INT 22 termination address
  47.  0Eh    DWORD   stored INT 23 control-Break handler address
  48.  12h    DWORD   DOS 1.1+ stored INT 24 critical error handler address
  49.  16h    WORD    segment of parent PSP
  50.  18h 20 BYTEs   DOS 2+ Job File Table, one byte per file handle, FFh = closed
  51.  2Ch    WORD    DOS 2+ segment of environment for process
  52.  2Eh    DWORD   DOS 2+ process's SS:SP on entry to last INT 21 call
  53.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  54.  34h    DWORD   DOS 3+ pointer to JFT (default PSP:0018h)
  55.  38h    DWORD   DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  56.                 used by SHARE in DOS 3.3
  57.  3Ch  4 BYTEs   unused by DOS versions <= 5.00
  58.  40h  2 BYTEs   DOS 5.0 version to return on INT 21/AH=30h
  59.  42h 14 BYTEs   unused by DOS versions <= 5.00
  60.  50h  3 BYTEs   DOS 2+ service request (INT 21/RETF instructions)
  61.  53h  9 BYTEs   unused in DOS versions <= 5.00
  62.  5Ch 16 BYTEs   first default FCB, filled in from first commandline argument
  63.                 overwrites second FCB if opened
  64.  6Ch 16 BYTEs   second default FCB, filled in from second commandline argument
  65.                 overwrites beginning of commandline if opened
  66.  7Ch  4 BYTEs   unused
  67.  80h 128 BYTEs  commandline / default DTA
  68.                 command tail is BYTE for length of tail, N BYTEs for the tail,
  69.                 followed by a BYTE containing 0Dh
  70. Notes:  in DOS versions 3.0 and up, the limit on simultaneously open files may
  71.           be increased by allocating memory for a new open file table, filling
  72.           it with FFh, copying the first 20 bytes from the default table, and
  73.           adjusting the pointer and count at 34h and 32h.  However, DOS
  74.           versions through  at least 3.30 will only copy the first 20 file
  75.           handles into a child PSP (including the one created on EXEC).
  76.         network redirectors based on the original MS-Net implementation use
  77.           values of 80h-FEh in the open file table to indicate remote files
  78.         MSDOS 5.00 incorrectly fills the FCB fields when loading a program
  79.           high; the first FCB is empty and the second contains the first
  80.           parameter
  81. Format of environment block:
  82. Offset  Size    Description
  83.  00h  N BYTEs   first environment variable, ASCIZ string of form "var=value"
  84.       N BYTEs   second environment variable, ASCIZ string
  85.         ...
  86.       N BYTEs   last environment variable, ASCIZ string of form "var=value"
  87.         BYTE    00h
  88. ---DOS 3+---
  89.         WORD    number of strings following environment (normally 1)
  90.       N BYTEs   ASCIZ full pathname of program owning this environment
  91.                 other strings may follow
  92. ;
  93. !TOPIC 23 Country Info
  94. !! 0x8000
  95. !NOINDEX
  96. !! 0
  97. ;
  98. ----------2138-------------------------------
  99. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  100.         AH = 38h
  101. --DOS 2.x--
  102.         AL = 00h get current-country info
  103.         DS:DX -> buffer for returned info (see below)
  104. Return: CF set on error
  105.             AX = error code (02h)
  106.         CF clear if successful
  107.             AX = country code (MSDOS 2.11 only)
  108.             buffer at DS:DX filled
  109. --DOS 3+--
  110.         AL = 00h for current country
  111.         AL = 01h thru 0FEh for specific country with code <255
  112.         AL = 0FFh for specific country with code >= 255
  113.            BX = 16-bit country code
  114.         DS:DX -> buffer for returned info (see below)
  115. Return: CF set on error
  116.             AX = error code (02h)
  117.         CF clear if successful
  118.             BX = country code
  119.             DS:DX buffer filled
  120. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  121.  
  122. Format of PCDOS 2.x country info:
  123. Offset  Size    Description
  124.  00h    WORD    date format  0 = USA    mm dd yy
  125.                              1 = Europe dd mm yy
  126.                              2 = Japan  yy mm dd
  127.  02h    BYTE    currency symbol
  128.  03h    BYTE    00h
  129.  04h    BYTE    thousands separator char
  130.  05h    BYTE    00h
  131.  06h    BYTE    decimal separator char
  132.  07h    BYTE    00h
  133.  08h 24 BYTEs   reserved
  134.  
  135. Format of MSDOS 2.x,DOS 3+ country info:
  136. Offset  Size    Description
  137.  00h    WORD    date format (see above)
  138.  02h  5 BYTEs   ASCIZ currency symbol string
  139.  07h  2 BYTEs   ASCIZ thousands separator
  140.  09h  2 BYTEs   ASCIZ decimal separator
  141.  0Bh  2 BYTEs   ASCIZ date separator
  142.  0Dh  2 BYTEs   ASCIZ time separator
  143.  0Fh    BYTE    currency format
  144.                 bit 2 = set if currency symbol replaces decimal point
  145.                 bit 1 = number of spaces between value and currency symbol
  146.                 bit 0 = 0 if currency symbol precedes value
  147.                         1 if currency symbol follows value
  148.  10h    BYTE    number of digits after decimal in currency
  149.  11h    BYTE    time format
  150.                 bit 0 = 0 if 12-hour clock
  151.                         1 if 24-hour clock
  152.  12h    DWORD   address of case map routine
  153.                 (FAR CALL, AL = character to map to upper case [>= 80h])
  154.  16h  2 BYTEs   ASCIZ data-list separator
  155.  18h 10 BYTEs   reserved
  156.  
  157. Values for country code:
  158.  001h   United States
  159.  002h   Canadian-French
  160.  003h   Latin America
  161.  01Fh   Netherlands
  162.  020h   Belgium
  163.  021h   France
  164.  022h   Spain
  165.  024h   Hungary (not supported by DR-DOS 5.0)
  166.  026h   Yugoslavia (not supported by DR-DOS 5.0)
  167.  027h   Italy
  168.  029h   Switzerland
  169.  02Ah   Czechoslovakia (not supported by DR-DOS 5.0)
  170.  02Bh   Austria (DR-DOS 5.0)
  171.  02Ch   United Kingdom
  172.  02Dh   Denmark
  173.  02Eh   Sweden
  174.  02Fh   Norway
  175.  030h   Poland (not supported by DR-DOS 5.0)
  176.  031h   Germany
  177.  037h   Brazil (not supported by DR-DOS 5.0)
  178.  03Dh   International English [Australia in DR-DOS 5.0]
  179.  051h   Japan (DR-DOS 5.0)
  180.  052h   Korea (DR-DOS 5.0)
  181.  15Fh   Portugal
  182.  166h   Finland
  183.  311h   Middle East (DR-DOS 5.0)
  184.  3CCh   Israel (DR-DOS 5.0)
  185. ----------2138-------------------------------
  186. INT 21 - DOS 3+ - SET COUNTRY CODE
  187.         AH = 38h
  188.         AL = 01h thru 0FEh for specific country with code <255
  189.         AL = FFh for specific country with code >= 255
  190.            BX = 16-bit country code
  191.         DX = FFFFh
  192. Return: CF set on error
  193.             AX = error code (see AH=59h)
  194.         CF clear if successful
  195. Note:   not supported by OS/2
  196. SeeAlso: INT 2F/AX=1403h
  197. ----------2165-------------------------------
  198. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  199.         AH = 65h
  200.         AL = info ID
  201.             01h get general internationalization info
  202.             02h get pointer to uppercase table
  203.             04h get pointer to filename uppercase table
  204.             05h get pointer to filename terminator table
  205.             06h get pointer to collating sequence table
  206.             07h (DOS 4+) get pointer to Double-Byte Character Set table
  207.         BX = code page (-1=global code page)
  208.         DX = country ID (-1=current country)
  209.         ES:DI -> country information buffer (see below)
  210.         CX = size of buffer (>= 5)
  211. Return: CF set on error
  212.             AX = error code (see AH=59h)
  213.         CF clear if succesful
  214.             CX = size of country information returned
  215.             ES:DI -> country information
  216. Notes:  AL=05h appears to return same info for all countries and codepages; it
  217.           has been documented for DOS 5.0, but was undocumented in ealier
  218.           versions
  219.         NLSFUNC must be installed to get info for countries other than the
  220.           default
  221.         subfunctions 02h and 04h are identical under OS/2
  222. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h
  223.  
  224. Format of country information:
  225. Offset  Size    Description
  226.  00h    BYTE    info ID
  227. ---if info ID = 01h---
  228.  01h    WORD    size
  229.  03h    WORD    country ID
  230.  05h    WORD    code page
  231.  07h 34 BYTEs   country-dependent info (see AH=38h)
  232. ---if info ID = 02h---
  233.  01h    DWORD   pointer to uppercase table (see below)
  234. ---if info ID = 04h---
  235.  01h    DWORD   pointer to filename uppercase table (see below)
  236. ---if info ID = 05h---
  237.  01h    DWORD   pointer to filename character table (see below)
  238. ---if info ID = 06h---
  239.  01h    DWORD   pointer to collating table (see below)
  240. ---if info ID = 07h (DOS 4+)---
  241.  01h    DWORD   pointer to DBCS lead byte table (see below)
  242.  
  243. Format of uppercase table:
  244. Offset  Size    Description
  245.  00h    WORD    table size
  246.  02h 128 BYTEs  uppercase equivalents (if any) of chars 80h to FFh
  247.  
  248. Format of collating table:
  249. Offset  Size    Description
  250.  00h    WORD    table size
  251.  02h 256 BYTEs  values used to sort characters 00h to FFh
  252.  
  253. Format of filename terminator table:
  254. Offset  Size    Description
  255.  00h    WORD    table size (not counting this word)
  256.  02h    BYTE    ??? (01h for MSDOS 3.30-5.00)
  257.  03h    BYTE    lowest permissible character value for filename
  258.  04h    BYTE    highest permissible character value for filename
  259.  05h    BYTE    ??? (00h for MSDOS 3.30-5.00)
  260.  06h    BYTE    first excluded character in range \ all characters in this
  261.  07h    BYTE    last excluded character in range  / range are illegal
  262.  08h    BYTE    ??? (02h for MSDOS 3.30-5.00)
  263.  09h    BYTE    number of illegal (terminator) characters
  264.  0Ah  N BYTES   characters which terminate a filename:  ."/\[]:|<>+=;,
  265. Note:   partially documented for DOS 5.0, but undocumented for earlier versions
  266.  
  267. Format of filename uppercase table:
  268. Offset  Size    Description
  269.  00h    WORD    table size
  270.  02h 128 BYTEs  uppercase equivalents (if any) of chars 80h to FFh
  271.  
  272. Format of DBCS lead byte table:
  273. Offset  Size    Description
  274.  00h    WORD    length
  275.  02h 2N BYTEs   start/end for N lead byte ranges
  276.         WORD    0000h   (end of table)
  277. ----------2165-------------------------------
  278. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  279.         AH = 65h
  280.         AL = function
  281.             20h capitalize character
  282.                 DL = character to capitalize
  283.                 Return: DL = capitalized character
  284.             21h capitalize string
  285.                 DS:DX -> string to capitalize
  286.                 CX = length of string
  287.             22h capitalize ASCIZ string
  288.                 DS:DX -> ASCIZ string to capitalize
  289. Return: CF set on error
  290.             AX = error code (see AH=59h)
  291.         CF clear if successful
  292. Note:   these calls have been documented for DOS 5+, but were undocumented in
  293.           DOS 4.x.
  294. ----------216523-----------------------------
  295. INT 21 - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  296.         AX = 6523h
  297.         DL = character
  298.         DH = second character of double-byte character (if applicable)
  299. Return: CF set on error
  300.         CF clear if successful
  301.             AX = type
  302.                 00h no
  303.                 01h yes
  304.                 02h neither yes nor no
  305. ----------2165-------------------------------
  306. INT 21 - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  307.         AH = 65h
  308.         AL = function
  309.             A0h capitalize filename character
  310.                 DL = character to capitalize
  311.                 Return: DL = capitalized character
  312.             A1h capitalize counted filename string
  313.                 DS:DX -> filename string to capitalize
  314.                 CX = length of string
  315.             A2h capitalize ASCIZ filename
  316.                 DS:DX -> ASCIZ filename to capitalize
  317. Return: CF set on error
  318.             AX = error code (see AH=59h)
  319.         CF clear if successful
  320. Note:   nonfunctional in DOS 4.00 through 5.00 due to a bug (the code sets a
  321.           pointer depending on the high bit of AL, but doesn't clear the
  322.           bit before branching by function number).
  323. ----------216601-----------------------------
  324. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  325.         AX = 6601h
  326. Return: CF set on error
  327.             AX = error code (see AH=59h)
  328.         CF clear if successful
  329.             BX = active code page (see AX=6602h)
  330.             DX = system code page
  331. SeeAlso: AX=6602h
  332. ----------216602-----------------------------
  333. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  334.         AX = 6602h
  335.         BX = active code page
  336.             437 US
  337.             850 Multilingual
  338.             852 Slavic/Latin II (DOS 5+)
  339.             857 Turkish
  340.             860 Portugal
  341.             861 Iceland
  342.             863 Canada (French)
  343.             865 Norway/Denmark
  344.         DX = system code page (active page at boot time)
  345. Return: CF set on error
  346.             AX = error code (see AH=59h)
  347.         CF clear if successful
  348. SeeAlso: AX=6601h
  349. !TOPIC 24 Error Codes
  350. !! 0x8000
  351. !NOINDEX
  352. !! 0
  353. ;
  354. ----------2159--BX0000-----------------------
  355. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  356.         AH = 59h
  357.         BX = 0000h
  358. Return: AX = extended error code (see below)
  359.         BH = error class (see below)
  360.         BL = recommended action (see below)
  361.         CH = error locus (see below)
  362.         CL, DX, SI, DI, BP, DS, and ES destroyed
  363. Notes:  functions available under DOS 2.x map the true DOS 3+ error code into
  364.           one supported under DOS 2.x
  365.         you should call this function to retrieve the true error code when an
  366.           FCB or DOS 2.x call returns an error
  367. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  368.  
  369. Values for extended error code:
  370.         00h no error
  371.         01h function number invalid
  372.         02h file not found
  373.         03h path not found
  374.         04h too many open files (no handles available)
  375.         05h access denied
  376.         06h invalid handle
  377.         07h memory control block destroyed
  378.         08h insufficient memory
  379.         09h memory block address invalid
  380.         0Ah environment invalid (usually >32K in length)
  381.         0Bh format invalid
  382.         0Ch access code invalid
  383.         0Dh data invalid
  384.         0Eh reserved
  385.         0Fh invalid drive
  386.         10h attempted to remove current directory
  387.         11h not same device
  388.         12h no more files
  389. ---DOS 3+---
  390.         13h disk write-protected
  391.         14h unknown unit
  392.         15h drive not ready
  393.         16h unknown command
  394.         17h data error (CRC)
  395.         18h bad request structure length
  396.         19h seek error
  397.         1Ah unknown media type (non-DOS disk)
  398.         1Bh sector not found
  399.         1Ch printer out of paper
  400.         1Dh write fault
  401.         1Eh read fault
  402.         1Fh general failure
  403.         20h sharing violation
  404.         21h lock violation
  405.         22h disk change invalid
  406.             ES:DI -> ASCIZ volume label of required disk
  407.         23h FCB unavailable
  408.         24h sharing buffer overflow
  409.         25h (DOS 4+) code page mismatch
  410.         26h (DOS 4+) cannot complete file operation (out of input)
  411.         27h (DOS 4+) insufficient disk space
  412.         28h-31h reserved
  413.         32h network request not supported
  414.         33h remote computer not listening
  415.         34h duplicate name on network
  416.         35h network name not found
  417.         36h network busy
  418.         37h network device no longer exists
  419.         38h network BIOS command limit exceeded
  420.         39h network adapter hardware error
  421.         3Ah incorrect response from network
  422.         3Bh unexpected network error
  423.         3Ch incompatible remote adapter
  424.         3Dh print queue full
  425.         3Eh queue not full
  426.         3Fh not enough space to print file
  427.         40h network name was deleted
  428.         41h network: Access denied
  429.         42h network device type incorrect
  430.         43h network name not found
  431.         44h network name limit exceeded
  432.         45h network BIOS session limit exceeded
  433.         46h temporarily paused
  434.         47h network request not accepted
  435.         48h network print/disk redirection paused
  436.         49h (LANtastic) invalid network version
  437.         4Ah (LANtastic) account expired
  438.         4Bh (LANtastic) password expired
  439.         4Ch (LANtastic) login attempt invalid at this time
  440.         4Dh (LANtastic v3+) disk limit exceeded on network node
  441.         4Eh (LANtastic v3+) not logged in to network node
  442.         4Fh reserved
  443.         50h file exists
  444.         51h reserved
  445.         52h cannot make directory
  446.         53h fail on INT 24h
  447.         54h (DOS 3.3+) too many redirections
  448.         55h (DOS 3.3+) duplicate redirection
  449.         56h (DOS 3.3+) invalid password
  450.         57h (DOS 3.3+) invalid parameter
  451.         58h (DOS 3.3+) network write fault
  452.         59h (DOS 4+) function not supported on network
  453.         5Ah (DOS 4+) required system component not installed
  454.  
  455. Values for Error Class:
  456.         01h out of resource (storage space or I/O channels)
  457.         02h temporary situation (file or record lock)
  458.         03h authorization (denied access)
  459.         04h internal (system software bug)
  460.         05h hardware failure
  461.         06h system failure (configuration file missing or incorrect)
  462.         07h application program error
  463.         08h not found
  464.         09h bad format
  465.         0Ah locked
  466.         0Bh media error
  467.         0Ch already exists
  468.         0Dh unknown
  469.  
  470. Values for Suggested Action:
  471.         01h retry
  472.         02h delayed retry
  473.         03h prompt user to reenter input
  474.         04h abort after cleanup
  475.         05h immediate abort
  476.         06h ignore
  477.         07h retry after user intervention
  478.  
  479. Values for Error Locus:
  480.         01h unknown or not appropriate
  481.         02h block device (disk error)
  482.         03h network related
  483.         04h serial device (timeout)
  484.         05h memory related
  485. ;
  486. !TOPIC 25 EXE Header etc
  487. !! 0x8000
  488. !NOINDEX
  489. !! 0
  490. ;
  491. ----------214B-------------------------------
  492. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  493.         AH = 4Bh
  494.         AL = type of load
  495.             00h load and execute
  496.             01h load but do not execute
  497.             03h load overlay
  498.             04h load and execute in background (European MSDOS 4.0 only)
  499.                 (see also AH=80h)
  500.         DS:DX -> ASCIZ program name (must include extension)
  501.         ES:BX -> parameter block (see below)
  502. Return: CF clear if successful
  503.             BX,DX destroyed
  504.             if subfunction 01h, process ID set to new program's PSP; get with
  505.                 INT 21/AH=62h
  506.         CF set on error
  507.             AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  508. Notes:  DOS 2.x destroys all registers, including SS:SP
  509.         for functions 00h and 01h, the calling process must ensure that there
  510.           is enough unallocated memory available; if necessary, by releasing
  511.           memory with AH=49h or AH=4Ah
  512.         for function 01h, the value to be passed to the child program is put
  513.           on top of the child's stack
  514.         for function 03h, DOS assumes that the overlay is being loaded into
  515.           memory allocated by the caller
  516.         function 01h has been documented for DOS 5+, but was undocumented in
  517.           prior versions
  518. BUG:    DOS 2.00 assumes that DS points at the current program's PSP
  519. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,INT 2E
  520.  
  521. Format of EXEC parameter block for AL=00h,01h,04h:
  522. Offset  Size    Description
  523.  00h    WORD    segment of environment to copy for child process (copy caller's
  524.                 environment if 0000h)
  525.  02h    DWORD   pointer to command tail to be copied into child's PSP
  526.  06h    DWORD   pointer to first FCB to be copied into child's PSP
  527.  0Ah    DWORD   pointer to second FCB to be copied into child's PSP
  528.  0Eh    DWORD   (AL=01h) will hold subprogram's initial SS:SP on return
  529.  12h    DWORD   (AL=01h) will hold entry point (CS:IP) on return
  530.  
  531. Format of EXEC parameter block for AL=03h:
  532. Offset  Size    Description
  533.  00h    WORD    segment at which to load overlay
  534.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  535.  
  536. Format of .EXE file header:
  537. Offset  Size    Description
  538.  00h  2 BYTEs   .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  539.  02h    WORD    number of bytes in last 512-byte page of executable
  540.  04h    WORD    total number of 512-byte pages in executable (includes any
  541.                 partial last page)
  542.  06h    WORD    number of relocation entries
  543.  08h    WORD    header size in paragraphs
  544.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  545.                 executable's size
  546.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  547.  0Eh    WORD    initial SS relative to start of executable
  548.  10h    WORD    initial SP
  549.  12h    WORD    checksum (one's complement of sum of all words in executable)
  550.  14h    DWORD   initial CS:IP relative to start of executable
  551.  18h    WORD    offset within header of relocation table
  552.  1Ah    WORD    overlay number (normally 0000h = main program)
  553. ---Borland TLINK---
  554.  1Ch  2 BYTEs   ??? (apparently always 01h 00h)
  555.  1Eh    BYTE    signature FBh
  556.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  557.  20h  2 BYTEs   ??? (v2.0 apparently always 72h 6Ah, v3.0 seems always 6Ah 72h)
  558. ---other linkers---
  559.  1Ch    var     optional information
  560. ---
  561.   N   N DWORDs  relocation items
  562. ---new executable only---
  563.  3Ch    DWORD   offset of new executable header if offset of relocation table
  564.                 is 40h or greater
  565. Notes:  if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  566.           versions of the MS linker set it that way
  567.         if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  568.           program is loaded as high in memory as possible
  569.         the maximum allocation is set to FFFFh by default
  570.  
  571. Format of new executable header:
  572. Offset  Size    Description
  573.  00h  2 BYTEs   "NE" (4Eh 45h) signature
  574.  02h  2 BYTEs   linker version (major, then minor)
  575.  04h    WORD    offset to entry table
  576.  06h    WORD    length of entry table in bytes
  577.  08h    DWORD   file load CRC (0 in Borland's TPW)
  578.  0Ch    BYTE    program flags
  579.                 bits 0-1 DGROUP type
  580.                   0 = none
  581.                   1 = single shared
  582.                   2 = multiple (unshared)
  583.                   3 = (null)
  584.                 bit 2:  global initialization
  585.                 bit 3:  protected mode only
  586.                 bit 4:  8086 instructions
  587.                 bit 5:  80286 instructions
  588.                 bit 6:  80386 instructions
  589.                 bit 7:  80x87 instructions
  590.  0Dh    BYTE    application flags
  591.                 bits 0-2: application type
  592.                     001 full screen (not aware of Windows/P.M. API)
  593.                     010 compatible with Windows/P.M. API
  594.                     011 uses Windows/P.M. API
  595.                 bit 3: is a Family Application (OS/2)
  596.                 bit 5: 0=executable, 1=errors in image
  597.                 bit 7: DLL or driver rather than application
  598.  0Eh    WORD    auto data segment index
  599.  10h    WORD    initial local heap size
  600.  12h    WORD    initial stack size
  601.  14h    DWORD   program entry point (CS:IP)
  602.  18h    DWORD   initial stack pointer (SS:SP)
  603.  1Ch    WORD    segment count
  604.  1Eh    WORD    module reference count
  605.  20h    WORD    length of nonresident names table
  606.  22h    WORD    offset from start of this header to segment table (see below)
  607.  24h    WORD    offset from start of this header to resource table
  608.  26h    WORD    offset from start of this header to resident names table
  609.  28h    WORD    offset from start of this header to module reference table
  610.  2Ah    WORD    offset from start of this header to imported names table
  611.  2Ch    DWORD   offset from start of file to nonresident names table
  612.  30h    WORD    count of moveable entry point listed in entry table
  613.  32h    WORD    file alignment size shift count
  614.                 0 is equivalent to 9 (default 512-byte pages)
  615.  34h    WORD    number of resource table entries
  616.  36h    BYTE    target operating system
  617.                 00h unknown
  618.                 01h OS/2
  619.                 02h Windows
  620.                 03h European MS-DOS 4.x
  621.                 04h Windows 386
  622.  37h    BYTE    other EXE flags
  623.                 bit 0: supports long filenames
  624.                 bit 1: 2.X protected mode
  625.                 bit 2: 2.X proportional font
  626.                 bit 3: gangload area
  627.  38h    WORD    offset to return thunks or start of gangload area
  628.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  629.  3Ch    WORD    minimum code swap area size
  630.  3Eh  2 BYTEs   expected Windows version (minor version first)
  631.  
  632. Format of segment table record:
  633.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  634.  02h    WORD    length of image in file
  635.  04h    WORD    attributes
  636.                 bit 0,1,2: DATA segment flags
  637.                 bit 3: iterated
  638.                 bit 4: movable
  639.                 bit 5: sharable
  640.                 bit 6: preloaded
  641.                 bit 7: execute-only
  642.                 bit 8: relocations (directly following code for this segment)
  643.                 bit 9: debug info
  644.                 bits 10,11: 80286 DPL bits
  645.                 bit 12:     discardable
  646.                 bits 13-15: discard priority
  647.  06h    WORD    size to allocate
  648.  
  649. Enhanced Mode New executable header:
  650. Offset  Size    Description
  651.  00h  2 BYTEs   "LE" (4Ch 45h) signature
  652.  02h    WORD    ??? (may be linker version, but EXEHDR doesn't report it)
  653.  04h    DWORD   executable format level
  654.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  655.                 01h Intel 80286 or upwardly compatibile
  656.                 02h Intel 80386 or upwardly compatibile                 
  657.                 03h Intel 80486 or upwardly compatibile                 
  658.  0Ah    WORD    target operating system
  659.                 01h OS/2
  660.                 02h Windows
  661.                 03h DOS4.x
  662.                 04h Windows 386
  663.  0Ch    DWORD   module version
  664.  10h    DWORD   module type
  665.                 bit 2: initialization (only for DLLs)
  666.                         0 = global
  667.                         1 = per-process
  668.                 bit 4: no internal fixups in executable image
  669.                 bit 5: no external fixups in executable image
  670.                 bits 8,9,10:
  671.                         1 = incompatible with PM windowing \
  672.                         2 = compatible with PM windowing    > (only for
  673.                         3 = uses PM windowing API          /    programs)
  674.                 bit 13: module not loadable (only for programs)
  675.                 bit 15: module is DLL rather than program
  676.  14h    DWORD   number of memory pages
  677.  18h    Initial CS:EIP
  678.         DWORD   object
  679.         DWORD   offset
  680.  20h    Initial SS:ESP
  681.         DWORD   object
  682.         DWORD   offset
  683.  28h    DWORD   memory page size
  684.  2Ch    DWORD   bytes on last page
  685.  30h    DWORD   fixup section size
  686.  34h    DWORD   fixup section checksum
  687.  38h    DWORD   loader section size
  688.  3Ch    DWORD   loader section checksum
  689.  40h    DWORD   object table offset
  690.  44h    DWORD   object table entries
  691.  48h    DWORD   010Ch ???
  692.  4CH    DWORD   0000h ???
  693.  50h    DWORD   resource table offset
  694.  54h    DWORD   resource table entries
  695.  58h    DWORD   resident names table offset
  696.  5Ch    DWORD   entry table offset
  697.  60h    DWORD   module directives table offset
  698.  64h    DWORD   Module Directives entries
  699.  68h    DWORD   ??? apparently unknown table #1 offset
  700.  6Ch    DWORD   ??? apparently unknown table #2 offset
  701.  70h    DWORD   imported modules name table offset
  702.  74h    DWORD   imported modules
  703.  78h    DWORD   imported procedures name table offset
  704.  7Ch    DWORD   per-page checksum table offset
  705.  80h    DWORD   preload pages ??? offset
  706.  84h    DWORD   preload pages number
  707.  88h    DWORD   non-resident names table offset
  708.  8Ch    DWORD   non-resident names table length
  709.  90h    DWORD   non-resident names checksum
  710.  94h    DWORD   automatic data object
  711.  98h    DWORD   debug information offset
  712.  9Ch    DWORD   debug information length
  713.  A0h    DWORD   preload instance pages number
  714.  A4h    DWORD   demand instance pages number
  715.  A8h    DWORD   extra heap allocation
  716.  ACh    ???
  717. Note:   used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  718.