home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / INTER34C.ZIP / INT2GUID.ZIP / INT2GUID.TAB < prev    next >
Encoding:
Text File  |  1992-12-01  |  41.6 KB  |  997 lines

  1. ;Text for INT2GUID conversion program, topic 21.
  2. ;INT2GUID converts INTERRUP.LST files to input for GUIDE.
  3. ;
  4. ;NB! When updating, remember to update the release number in the next
  5. ;paragraph, and in the beginning the text.
  6. ;
  7. ;This file contains tables extracted from the INTERRUP.LST file release 32.
  8. ;Tabs in the extracted text were filtered to 1 - 8 spaces.
  9. ;
  10. ;This file includes 4 extra topics. Reserve additionally 6 topics, or a
  11. ;total of 10.
  12. ;
  13. ;Topic headings are included in the GUIDE main index unless the configuration
  14. ;file specifies mask 0x8000.
  15. ;
  16. PSP Format, Environment Block, Country Specific Information, Error List
  17.  
  18. This entry gives access to tables extracted from the INTERRUP.LST file,
  19. release 32.
  20.  
  21.   22PSP + Env.   Program Segment Prefix Format + Environment
  22.   23Country      Specific Information
  23.   24Errors       Returned by DOS Funtion Calls
  24.   25EXE          *.EXE File Header etc.
  25. ;
  26. !TOPIC 22 PSP Format
  27. !! 0x8000
  28. !NOINDEX
  29. !! 0
  30. ;
  31. ----------2126-------------------------------
  32. INT 21 - DOS 1+ - CREATE NEW PROGRAM SEGMENT PREFIX
  33.         AH = 26h
  34.         DX = segment at which to create PSP (see below)
  35. Notes:  new PSP is updated with memory size information; INTs 22h, 23h, 24h
  36.           taken from interrupt vector table
  37.         (DOS 2+) DOS assumes that the caller's CS is the segment of the PSP to
  38.           copy
  39. SeeAlso: AH=4Bh,AH=50h,AH=51h,AH=55h,AH=62h,AH=67h
  40.  
  41. Format of PSP:
  42. Offset  Size    Description
  43.  00h  2 BYTEs   INT 20 instruction for CP/M CALL 0 program termination
  44.                 the CDh 20h here is often used as a signature for a valid PSP
  45.  02h    WORD    segment of first byte beyond memory allocated to program
  46.  04h    BYTE    unused filler
  47.  05h    BYTE    CP/M CALL 5 service request (FAR JMP to 000C0h)
  48.                 BUG: (DOS 2+) PSPs created by INT 21/AH=4Bh point at 000BEh
  49.  06h    WORD    CP/M compatibility--size of first segment for .COM files
  50.  08h  2 BYTEs   remainder of FAR JMP at 05h
  51.  0Ah    DWORD   stored INT 22 termination address
  52.  0Eh    DWORD   stored INT 23 control-Break handler address
  53.  12h    DWORD   DOS 1.1+ stored INT 24 critical error handler address
  54.  16h    WORD    segment of parent PSP
  55.  18h 20 BYTEs   DOS 2+ Job File Table, one byte per file handle, FFh = closed
  56.  2Ch    WORD    DOS 2+ segment of environment for process
  57.  2Eh    DWORD   DOS 2+ process's SS:SP on entry to last INT 21 call
  58.  32h    WORD    DOS 3+ number of entries in JFT (default 20)
  59.  34h    DWORD   DOS 3+ pointer to JFT (default PSP:0018h)
  60.  38h    DWORD   DOS 3+ pointer to previous PSP (default FFFFFFFFh in 3.x)
  61.                 used by SHARE in DOS 3.3
  62.  3Ch  4 BYTEs   unused by DOS versions <= 5.00
  63.                 reportedly used by Novell NetWare shell 3.x
  64.  40h  2 BYTEs   DOS 5.0 version to return on INT 21/AH=30h
  65.  42h  6 BYTEs   unused by DOS versions <= 5.00
  66.  48h    BYTE    (MSWindows3) bit 0 set if non-Windows application (WINOLDAP)
  67.  49h  7 BYTEs   unused by DOS versions <= 5.00
  68.  50h  3 BYTEs   DOS 2+ service request (INT 21/RETF instructions)
  69.  53h  9 BYTEs   unused in DOS versions <= 5.00
  70.  5Ch 16 BYTEs   first default FCB, filled in from first commandline argument
  71.                 overwrites second FCB if opened
  72.  6Ch 16 BYTEs   second default FCB, filled in from second commandline argument
  73.                 overwrites beginning of commandline if opened
  74.  7Ch  4 BYTEs   unused
  75.  80h 128 BYTEs  commandline / default DTA
  76.                 command tail is BYTE for length of tail, N BYTEs for the tail,
  77.                 followed by a BYTE containing 0Dh
  78. Notes:  in DOS versions 3.0 and up, the limit on simultaneously open files may
  79.           be increased by allocating memory for a new open file table, filling
  80.           it with FFh, copying the first 20 bytes from the default table, and
  81.           adjusting the pointer and count at 34h and 32h.  However, DOS
  82.           versions through  at least 3.30 will only copy the first 20 file
  83.           handles into a child PSP (including the one created on EXEC).
  84.         network redirectors based on the original MS-Net implementation use
  85.           values of 80h-FEh in the open file table to indicate remote files;
  86.           Novell NetWare reportedly also uses values of 80h-FEh
  87.         MSDOS 5.00 incorrectly fills the FCB fields when loading a program
  88.           high; the first FCB is empty and the second contains the first
  89.           parameter
  90.         some DOS extenders place protected-mode values in various PSP fields
  91.           such as the "parent" field, which can confuse PSP walkers.  Always
  92.           check either for the CDh 20h signature or that the suspected PSP is
  93.           at the beginning of a memory block which owns itself (the preceding
  94.           paragraph should be a valid MCB with "owner" the same as the
  95.           suspected PSP).
  96.  
  97. Format of environment block:
  98. Offset  Size    Description
  99.  00h  N BYTEs   first environment variable, ASCIZ string of form "var=value"
  100.       N BYTEs   second environment variable, ASCIZ string
  101.         ...
  102.       N BYTEs   last environment variable, ASCIZ string of form "var=value"
  103.         BYTE    00h
  104. ---DOS 3+---
  105.         WORD    number of strings following environment (normally 1)
  106.       N BYTEs   ASCIZ full pathname of program owning this environment
  107.                 other strings may follow
  108. ;
  109. !TOPIC 23 Country Info
  110. !! 0x8000
  111. !NOINDEX
  112. !! 0
  113. ;
  114. ----------2138-------------------------------
  115. INT 21 - DOS 2+ - GET COUNTRY-SPECIFIC INFORMATION
  116.         AH = 38h
  117. --DOS 2.x--
  118.         AL = 00h get current-country info
  119.         DS:DX -> buffer for returned info (see below)
  120. Return: CF set on error
  121.             AX = error code (02h)
  122.         CF clear if successful
  123.             AX = country code (MSDOS 2.11 only)
  124.             buffer at DS:DX filled
  125. --DOS 3+--
  126.         AL = 00h for current country
  127.         AL = 01h thru 0FEh for specific country with code <255
  128.         AL = 0FFh for specific country with code >= 255
  129.            BX = 16-bit country code
  130.         DS:DX -> buffer for returned info (see below)
  131. Return: CF set on error
  132.             AX = error code (02h)
  133.         CF clear if successful
  134.             BX = country code
  135.             DS:DX buffer filled
  136. SeeAlso: AH=65h,INT 10/AX=5001h,INT 2F/AX=110Ch,INT 2F/AX=1404h
  137.  
  138. Format of PCDOS 2.x country info:
  139. Offset  Size    Description
  140.  00h    WORD    date format  0 = USA    mm dd yy
  141.                              1 = Europe dd mm yy
  142.                              2 = Japan  yy mm dd
  143.  02h    BYTE    currency symbol
  144.  03h    BYTE    00h
  145.  04h    BYTE    thousands separator char
  146.  05h    BYTE    00h
  147.  06h    BYTE    decimal separator char
  148.  07h    BYTE    00h
  149.  08h 24 BYTEs   reserved
  150.  
  151. Format of MSDOS 2.x,DOS 3+ country info:
  152. Offset  Size    Description
  153.  00h    WORD    date format (see above)
  154.  02h  5 BYTEs   ASCIZ currency symbol string
  155.  07h  2 BYTEs   ASCIZ thousands separator
  156.  09h  2 BYTEs   ASCIZ decimal separator
  157.  0Bh  2 BYTEs   ASCIZ date separator
  158.  0Dh  2 BYTEs   ASCIZ time separator
  159.  0Fh    BYTE    currency format
  160.                 bit 2 = set if currency symbol replaces decimal point
  161.                 bit 1 = number of spaces between value and currency symbol
  162.                 bit 0 = 0 if currency symbol precedes value
  163.                         1 if currency symbol follows value
  164.  10h    BYTE    number of digits after decimal in currency
  165.  11h    BYTE    time format
  166.                 bit 0 = 0 if 12-hour clock
  167.                         1 if 24-hour clock
  168.  12h    DWORD   address of case map routine
  169.                 (FAR CALL, AL = character to map to upper case [>= 80h])
  170.  16h  2 BYTEs   ASCIZ data-list separator
  171.  18h 10 BYTEs   reserved
  172.  
  173. Values for country code:
  174.  001h   United States
  175.  002h   Canadian-French
  176.  003h   Latin America
  177.  01Fh   Netherlands
  178.  020h   Belgium
  179.  021h   France
  180.  022h   Spain
  181.  024h   Hungary (not supported by DR-DOS 5.0)
  182.  026h   Yugoslavia (not supported by DR-DOS 5.0)
  183.  027h   Italy
  184.  029h   Switzerland
  185.  02Ah   Czechoslovakia (not supported by DR-DOS 5.0)
  186.  02Bh   Austria (DR-DOS 5.0)
  187.  02Ch   United Kingdom
  188.  02Dh   Denmark
  189.  02Eh   Sweden
  190.  02Fh   Norway
  191.  030h   Poland (not supported by DR-DOS 5.0)
  192.  031h   Germany
  193.  037h   Brazil (not supported by DR-DOS 5.0)
  194.  03Dh   International English [Australia in DR-DOS 5.0]
  195.  051h   Japan (DR-DOS 5.0)
  196.  052h   Korea (DR-DOS 5.0)
  197.  15Fh   Portugal
  198.  166h   Finland
  199.  311h   Middle East (DR-DOS 5.0)
  200.  3CCh   Israel (DR-DOS 5.0)
  201. ----------2138-------------------------------
  202. INT 21 - DOS 3+ - SET COUNTRY CODE
  203.         AH = 38h
  204.         AL = 01h thru 0FEh for specific country with code <255
  205.         AL = FFh for specific country with code >= 255
  206.            BX = 16-bit country code
  207.         DX = FFFFh
  208. Return: CF set on error
  209.             AX = error code (see AH=59h)
  210.         CF clear if successful
  211. Note:   not supported by OS/2
  212. SeeAlso: INT 2F/AX=1403h
  213. ----------2165-------------------------------
  214. INT 21 - DOS 3.3+ - GET EXTENDED COUNTRY INFORMATION
  215.         AH = 65h
  216.         AL = info ID
  217.             01h get general internationalization info
  218.             02h get pointer to uppercase table
  219.             04h get pointer to filename uppercase table
  220.             05h get pointer to filename terminator table
  221.             06h get pointer to collating sequence table
  222.             07h (DOS 4+) get pointer to Double-Byte Character Set table
  223.         BX = code page (-1=global code page)
  224.         DX = country ID (-1=current country)
  225.         ES:DI -> country information buffer (see below)
  226.         CX = size of buffer (>= 5)
  227. Return: CF set on error
  228.             AX = error code (see AH=59h)
  229.         CF clear if succesful
  230.             CX = size of country information returned
  231.             ES:DI -> country information
  232. Notes:  AL=05h appears to return same info for all countries and codepages; it
  233.           has been documented for DOS 5.0, but was undocumented in ealier
  234.           versions
  235.         NLSFUNC must be installed to get info for countries other than the
  236.           default
  237.         subfunctions 02h and 04h are identical under OS/2
  238. SeeAlso: AH=38h,INT 2F/AX=1401h,INT 2F/AX=1402h
  239.  
  240. Format of country information:
  241. Offset  Size    Description
  242.  00h    BYTE    info ID
  243. ---if info ID = 01h---
  244.  01h    WORD    size
  245.  03h    WORD    country ID
  246.  05h    WORD    code page
  247.  07h 34 BYTEs   country-dependent info (see AH=38h)
  248. ---if info ID = 02h---
  249.  01h    DWORD   pointer to uppercase table (see below)
  250. ---if info ID = 04h---
  251.  01h    DWORD   pointer to filename uppercase table (see below)
  252. ---if info ID = 05h---
  253.  01h    DWORD   pointer to filename character table (see below)
  254. ---if info ID = 06h---
  255.  01h    DWORD   pointer to collating table (see below)
  256. ---if info ID = 07h (DOS 4+)---
  257.  01h    DWORD   pointer to DBCS lead byte table (see below)
  258.  
  259. Format of uppercase table:
  260. Offset  Size    Description
  261.  00h    WORD    table size
  262.  02h 128 BYTEs  uppercase equivalents (if any) of chars 80h to FFh
  263.  
  264. Format of collating table:
  265. Offset  Size    Description
  266.  00h    WORD    table size
  267.  02h 256 BYTEs  values used to sort characters 00h to FFh
  268.  
  269. Format of filename terminator table:
  270. Offset  Size    Description
  271.  00h    WORD    table size (not counting this word)
  272.  02h    BYTE    ??? (01h for MSDOS 3.30-5.00)
  273.  03h    BYTE    lowest permissible character value for filename
  274.  04h    BYTE    highest permissible character value for filename
  275.  05h    BYTE    ??? (00h for MSDOS 3.30-5.00)
  276.  06h    BYTE    first excluded character in range \ all characters in this
  277.  07h    BYTE    last excluded character in range  / range are illegal
  278.  08h    BYTE    ??? (02h for MSDOS 3.30-5.00)
  279.  09h    BYTE    number of illegal (terminator) characters
  280.  0Ah  N BYTES   characters which terminate a filename:  ."/\[]:|<>+=;,
  281. Note:   partially documented for DOS 5.0, but undocumented for earlier versions
  282.  
  283. Format of filename uppercase table:
  284. Offset  Size    Description
  285.  00h    WORD    table size
  286.  02h 128 BYTEs  uppercase equivalents (if any) of chars 80h to FFh
  287.  
  288. Format of DBCS lead byte table:
  289. Offset  Size    Description
  290.  00h    WORD    length
  291.  02h 2N BYTEs   start/end for N lead byte ranges
  292.         WORD    0000h   (end of table)
  293. ----------2165-------------------------------
  294. INT 21 - DOS 4+ - COUNTRY-DEPENDENT CHARACTER CAPITALIZATION
  295.         AH = 65h
  296.         AL = function
  297.             20h capitalize character
  298.                 DL = character to capitalize
  299.                 Return: DL = capitalized character
  300.             21h capitalize string
  301.                 DS:DX -> string to capitalize
  302.                 CX = length of string
  303.             22h capitalize ASCIZ string
  304.                 DS:DX -> ASCIZ string to capitalize
  305. Return: CF set on error
  306.             AX = error code (see AH=59h)
  307.         CF clear if successful
  308. Note:   these calls have been documented for DOS 5+, but were undocumented in
  309.           DOS 4.x.
  310. ----------216523-----------------------------
  311. INT 21 U - DOS 4+ internal - DETERMINE IF CHARACTER REPRESENTS YES/NO RESPONSE
  312.         AX = 6523h
  313.         DL = character
  314.         DH = second character of double-byte character (if applicable)
  315. Return: CF set on error
  316.         CF clear if successful
  317.             AX = type
  318.                 00h no
  319.                 01h yes
  320.                 02h neither yes nor no
  321. ----------2165-------------------------------
  322. INT 21 U - DOS 4+ internal - COUNTRY-DEPENDENT FILENAME CAPITALIZATION
  323.         AH = 65h
  324.         AL = function
  325.             A0h capitalize filename character
  326.                 DL = character to capitalize
  327.                 Return: DL = capitalized character
  328.             A1h capitalize counted filename string
  329.                 DS:DX -> filename string to capitalize
  330.                 CX = length of string
  331.             A2h capitalize ASCIZ filename
  332.                 DS:DX -> ASCIZ filename to capitalize
  333. Return: CF set on error
  334.             AX = error code (see AH=59h)
  335.         CF clear if successful
  336. Note:   nonfunctional in DOS 4.00 through 5.00 due to a bug (the code sets a
  337.           pointer depending on the high bit of AL, but doesn't clear the
  338.           bit before branching by function number).
  339. ----------216601-----------------------------
  340. INT 21 - DOS 3.3+ - GET GLOBAL CODE PAGE TABLE
  341.         AX = 6601h
  342. Return: CF set on error
  343.             AX = error code (see AH=59h)
  344.         CF clear if successful
  345.             BX = active code page (see AX=6602h)
  346.             DX = system code page
  347. SeeAlso: AX=6602h
  348. ----------216602-----------------------------
  349. INT 21 - DOS 3.3+ - SET GLOBAL CODE PAGE TABLE
  350.         AX = 6602h
  351.         BX = active code page
  352.             437 US
  353.             850 Multilingual
  354.             852 Slavic/Latin II (DOS 5+)
  355.             857 Turkish
  356.             860 Portugal
  357.             861 Iceland
  358.             863 Canada (French)
  359.             865 Norway/Denmark
  360.         DX = system code page (active page at boot time)
  361. Return: CF set on error
  362.             AX = error code (see AH=59h)
  363.         CF clear if successful
  364. SeeAlso: AX=6601h
  365. !TOPIC 24 Error Codes
  366. !! 0x8000
  367. !NOINDEX
  368. !! 0
  369. ;
  370. ----------2159--BX0000-----------------------
  371. INT 21 - DOS 3+ - GET EXTENDED ERROR INFORMATION
  372.         AH = 59h
  373.         BX = 0000h
  374. Return: AX = extended error code (see below)
  375.         BH = error class (see below)
  376.         BL = recommended action (see below)
  377.         CH = error locus (see below)
  378.         ES:DI may be pointer (see error code list below)
  379.     CL, DX, SI, BP, and DS destroyed
  380. Notes:  functions available under DOS 2.x map the true DOS 3+ error code into
  381.           one supported under DOS 2.x
  382.         you should call this function to retrieve the true error code when an
  383.           FCB or DOS 2.x call returns an error
  384. SeeAlso: AX=5D0Ah,INT 2F/AX=122Dh
  385.  
  386. Values for extended error code:
  387.         00h no error
  388.         01h function number invalid
  389.         02h file not found
  390.         03h path not found
  391.         04h too many open files (no handles available)
  392.         05h access denied
  393.         06h invalid handle
  394.         07h memory control block destroyed
  395.         08h insufficient memory
  396.         09h memory block address invalid
  397.         0Ah environment invalid (usually >32K in length)
  398.         0Bh format invalid
  399.         0Ch access code invalid
  400.         0Dh data invalid
  401.         0Eh reserved
  402.         0Fh invalid drive
  403.         10h attempted to remove current directory
  404.         11h not same device
  405.         12h no more files
  406. ---DOS 3+---
  407.         13h disk write-protected
  408.         14h unknown unit
  409.         15h drive not ready
  410.         16h unknown command
  411.         17h data error (CRC)
  412.         18h bad request structure length
  413.         19h seek error
  414.         1Ah unknown media type (non-DOS disk)
  415.         1Bh sector not found
  416.         1Ch printer out of paper
  417.         1Dh write fault
  418.         1Eh read fault
  419.         1Fh general failure
  420.         20h sharing violation
  421.         21h lock violation
  422.         22h disk change invalid
  423.             ES:DI -> ASCIZ volume label of required disk
  424.         23h FCB unavailable
  425.         24h sharing buffer overflow
  426.         25h (DOS 4+) code page mismatch
  427.         26h (DOS 4+) cannot complete file operation (out of input)
  428.         27h (DOS 4+) insufficient disk space
  429.         28h-31h reserved
  430.         32h network request not supported
  431.         33h remote computer not listening
  432.         34h duplicate name on network
  433.         35h network name not found
  434.         36h network busy
  435.         37h network device no longer exists
  436.         38h network BIOS command limit exceeded
  437.         39h network adapter hardware error
  438.         3Ah incorrect response from network
  439.         3Bh unexpected network error
  440.         3Ch incompatible remote adapter
  441.         3Dh print queue full
  442.         3Eh queue not full
  443.         3Fh not enough space to print file
  444.         40h network name was deleted
  445.         41h network: Access denied
  446.         42h network device type incorrect
  447.         43h network name not found
  448.         44h network name limit exceeded
  449.         45h network BIOS session limit exceeded
  450.         46h temporarily paused
  451.         47h network request not accepted
  452.         48h network print/disk redirection paused
  453.         49h (LANtastic) invalid network version
  454.         4Ah (LANtastic) account expired
  455.         4Bh (LANtastic) password expired
  456.         4Ch (LANtastic) login attempt invalid at this time
  457.         4Dh (LANtastic v3+) disk limit exceeded on network node
  458.         4Eh (LANtastic v3+) not logged in to network node
  459.         4Fh reserved
  460.         50h file exists
  461.         51h reserved
  462.         52h cannot make directory
  463.         53h fail on INT 24h
  464.         54h (DOS 3.3+) too many redirections
  465.         55h (DOS 3.3+) duplicate redirection
  466.         56h (DOS 3.3+) invalid password
  467.         57h (DOS 3.3+) invalid parameter
  468.         58h (DOS 3.3+) network write fault
  469.         59h (DOS 4+) function not supported on network
  470.         5Ah (DOS 4+) required system component not installed
  471.  
  472. Values for Error Class:
  473.         01h out of resource (storage space or I/O channels)
  474.         02h temporary situation (file or record lock)
  475.         03h authorization (denied access)
  476.         04h internal (system software bug)
  477.         05h hardware failure
  478.         06h system failure (configuration file missing or incorrect)
  479.         07h application program error
  480.         08h not found
  481.         09h bad format
  482.         0Ah locked
  483.         0Bh media error
  484.         0Ch already exists
  485.         0Dh unknown
  486.  
  487. Values for Suggested Action:
  488.         01h retry
  489.         02h delayed retry
  490.         03h prompt user to reenter input
  491.         04h abort after cleanup
  492.         05h immediate abort
  493.         06h ignore
  494.         07h retry after user intervention
  495.  
  496. Values for Error Locus:
  497.         01h unknown or not appropriate
  498.         02h block device (disk error)
  499.         03h network related
  500.         04h serial device (timeout)
  501.         05h memory related
  502. ;
  503. !TOPIC 25 EXE Header etc
  504. !! 0x8000
  505. !NOINDEX
  506. !! 0
  507. ;
  508. ----------214B-------------------------------
  509. INT 21 - DOS 2+ - "EXEC" - LOAD AND/OR EXECUTE PROGRAM
  510.         AH = 4Bh
  511.         AL = type of load
  512.             00h load and execute
  513.             01h load but do not execute
  514.             03h load overlay
  515.             04h load and execute in background (European MSDOS 4.0 only)
  516.                 "Exec & Go" (see also AH=80h)
  517.         DS:DX -> ASCIZ program name (must include extension)
  518.         ES:BX -> parameter block (see below)
  519.         CX = mode (subfunction 04h only)
  520.                 0000h child placed in zombie mode after termination
  521.                 0001h child's return code discarded on termination
  522. Return: CF clear if successful
  523.             BX,DX destroyed
  524.             if subfunction 01h, process ID set to new program's PSP; get with
  525.                 INT 21/AH=62h
  526.         CF set on error
  527.             AX = error code (01h,02h,05h,08h,0Ah,0Bh) (see AH=59h)
  528. Notes:  DOS 2.x destroys all registers, including SS:SP
  529.         for functions 00h and 01h, the calling process must ensure that there
  530.           is enough unallocated memory available; if necessary, by releasing
  531.           memory with AH=49h or AH=4Ah
  532.         for function 01h, the AX value to be passed to the child program is put
  533.           on top of the child's stack
  534.         for function 03h, DOS assumes that the overlay is being loaded into
  535.           memory allocated by the caller
  536.         function 01h was undocumented prior to the release of DOS 5.0
  537.         some versions (such as DR-DOS 6.0) check the parameters and parameter
  538.           block and return an error if an invalid value (such as an offset of
  539.           FFFFh) is found
  540.         background programs under European MSDOS 4.0 must use the new
  541.           executable format
  542.         new executables begin running with the following register values
  543.                 AX = environment segment
  544.                 BX = offset of command tail in environment segment
  545.                 CX = size of automatic data segment (0000h = 64K)
  546.                 ES,BP = 0000h
  547.                 DS = automatic data segment
  548.                 SS:SP = initial stack
  549.           the command tail corresponds to an old executable's PSP:0081h and
  550.           following, except that the 0Dh is turned into a NUL (00h); new
  551.           format executables have no PSP
  552.         under the FlashTek X-32 DOS extender, only function 00h is supported
  553.           and the pointers are passed in DS:EDX and ES:EBX
  554. BUGS:   DOS 2.00 assumes that DS points at the current program's PSP
  555.         Load Overlay (subfunction 03h) loads up to 512 bytes too many if the
  556.           file contains additional data after the actual overlay
  557. SeeAlso: AX=4B05h,AH=4Ch,AH=4Dh,AH=64h"OS/2",AH=8Ah,INT 2E
  558.  
  559. Format of EXEC parameter block for AL=00h,01h,04h:
  560. Offset  Size    Description
  561.  00h    WORD    segment of environment to copy for child process (copy caller's
  562.                 environment if 0000h)
  563.  02h    DWORD   pointer to command tail to be copied into child's PSP
  564.  06h    DWORD   pointer to first FCB to be copied into child's PSP
  565.  0Ah    DWORD   pointer to second FCB to be copied into child's PSP
  566.  0Eh    DWORD   (AL=01h) will hold subprogram's initial SS:SP on return
  567.  12h    DWORD   (AL=01h) will hold entry point (CS:IP) on return
  568.  
  569. Format of EXEC parameter block for AL=03h:
  570. Offset  Size    Description
  571.  00h    WORD    segment at which to load overlay
  572.  02h    WORD    relocation factor to apply to overlay if in .EXE format
  573.  
  574. Format of EXEC parameter block for FlashTek X-32:
  575. Offset  Size    Description
  576.  00h    PWORD   48-bit far pointer to environment string
  577.  06h    PWORD   48-bit far pointer to command tail string
  578.  
  579. Format of .EXE file header:
  580. Offset  Size    Description
  581.  00h  2 BYTEs   .EXE signature, either "MZ" or "ZM" (5A4Dh or 4D5Ah)
  582.  02h    WORD    number of bytes in last 512-byte page of executable
  583.  04h    WORD    total number of 512-byte pages in executable (includes any
  584.                 partial last page)
  585.  06h    WORD    number of relocation entries
  586.  08h    WORD    header size in paragraphs
  587.  0Ah    WORD    minimum paragraphs of memory to allocation in addition to
  588.                 executable's size
  589.  0Ch    WORD    maximum paragraphs to allocate in addition to executable's size
  590.  0Eh    WORD    initial SS relative to start of executable
  591.  10h    WORD    initial SP
  592.  12h    WORD    checksum (one's complement of sum of all words in executable)
  593.  14h    DWORD   initial CS:IP relative to start of executable
  594.  18h    WORD    offset within header of relocation table (40h for New EXE)
  595.  1Ah    WORD    overlay number (normally 0000h = main program)
  596. ---new executable---
  597.  1Ch  4 BYTEs   ???
  598.  20h    WORD    behavior bits
  599.  22h 26 BYTEs   reserved for additional behavior info
  600.  3Ch    DWORD   offset of new executable header within disk file
  601. ---Borland TLINK---
  602.  1Ch  2 BYTEs   ??? (apparently always 01h 00h)
  603.  1Eh    BYTE    signature FBh
  604.  1Fh    BYTE    TLINK version (major in high nybble, minor in low nybble)
  605.  20h  2 BYTEs   ??? (v2.0 apparently always 72h 6Ah, v3.0+ seems always 6Ah 72h)
  606. ---ARJ self-extracting archive---
  607.  1Ch  4 BYTEs   signature "RJSX"
  608. ---LZEXE 0.91 compressed executable---
  609.  1Ch  4 BYTEs   signature "LZ91"
  610. ---PKLITE compressed executable---
  611.  1Ch  2 BYTEs   ???
  612.  1Eh  6 BYTEs   signature "PKLITE" (followed by copyright message)
  613. ---LHarc 1.x self-extracting archive---
  614.  1Ch  4 BYTEs   unused???
  615.  20h  3 BYTEs   jump to start of extraction code
  616.  23h  2 BYTEs   ???
  617.  25h 12 BYTEs   signature "LHarc's SFX "
  618. ---LHA 2.x self-extracting archive---
  619.  1Ch  8 BYTEs   ???
  620.  24h 10 BYTEs   signature "LHA's SFX "
  621. ---other linkers---
  622.  1Ch    var     optional information
  623. ---
  624.   N   N DWORDs  relocation items
  625. Notes:  if word at offset 02h is 4, it should be treated as 00h, since pre-1.10
  626.           versions of the MS linker set it that way
  627.         if both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the
  628.           program is loaded as high in memory as possible
  629.         the maximum allocation is set to FFFFh by default
  630.  
  631. Format of new executable header:
  632. Offset  Size    Description
  633.  00h  2 BYTEs   "NE" (4Eh 45h) signature
  634.  02h  2 BYTEs   linker version (major, then minor)
  635.  04h    WORD    offset from start of this header to entry table (see below)
  636.  06h    WORD    length of entry table in bytes
  637.  08h    DWORD   file load CRC (0 in Borland's TPW)
  638.  0Ch    BYTE    program flags
  639.                 bits 0-1 DGROUP type
  640.                   0 = none
  641.                   1 = single shared
  642.                   2 = multiple (unshared)
  643.                   3 = (null)
  644.                 bit 2:  global initialization
  645.                 bit 3:  protected mode only
  646.                 bit 4:  8086 instructions
  647.                 bit 5:  80286 instructions
  648.                 bit 6:  80386 instructions
  649.                 bit 7:  80x87 instructions
  650.  0Dh    BYTE    application flags
  651.                 bits 0-2: application type
  652.                     001 full screen (not aware of Windows/P.M. API)
  653.                     010 compatible with Windows/P.M. API
  654.                     011 uses Windows/P.M. API
  655.                 bit 3: is a Family Application (OS/2)
  656.                 bit 5: 0=executable, 1=errors in image
  657.                 bit 6: non-conforming program (valid stack is not maintained)
  658.                 bit 7: DLL or driver rather than application
  659.                         (SS:SP info invalid, CS:IP points at FAR init routine 
  660.                          called with AX=module handle which returns AX=0000h
  661.                          on failure, AX nonzero on successful initialization)
  662.  0Eh    WORD    auto data segment index
  663.  10h    WORD    initial local heap size
  664.  12h    WORD    initial stack size (added to data seg, 0000h if SS != DS)
  665.  14h    DWORD   program entry point (CS:IP), "CS" is index into segment table
  666.  18h    DWORD   initial stack pointer (SS:SP), "SS" is segment index
  667.                 if SS=automatic data segment and SP=0000h, the stack pointer is
  668.                   set to the top of the automatic data segment, just below the
  669.                   local heap
  670.  1Ch    WORD    segment count
  671.  1Eh    WORD    module reference count
  672.  20h    WORD    length of nonresident names table in bytes
  673.  22h    WORD    offset from start of this header to segment table (see below)
  674.  24h    WORD    offset from start of this header to resource table
  675.  26h    WORD    offset from start of this header to resident names table
  676.  28h    WORD    offset from start of this header to module reference table
  677.  2Ah    WORD    offset from start of this header to imported names table
  678.                 (array of counted strings, terminated with a string of length
  679.                  00h)
  680.  2Ch    DWORD   offset from start of file to nonresident names table
  681.  30h    WORD    count of moveable entry point listed in entry table
  682.  32h    WORD    file alignment size shift count
  683.                 0 is equivalent to 9 (default 512-byte pages)
  684.  34h    WORD    number of resource table entries
  685.  36h    BYTE    target operating system
  686.                 00h unknown
  687.                 01h OS/2
  688.                 02h Windows
  689.                 03h European MSDOS 4.x
  690.                 04h Windows 386
  691.                 05h BOSS (Borland Operating System Services)
  692.  37h    BYTE    other EXE flags
  693.                 bit 0: supports long filenames
  694.                 bit 1: 2.X protected mode
  695.                 bit 2: 2.X proportional font
  696.                 bit 3: gangload area
  697.  38h    WORD    offset to return thunks or start of gangload area
  698.  3Ah    WORD    offset to segment reference thunks or length of gangload area
  699.  3Ch    WORD    minimum code swap area size
  700.  3Eh  2 BYTEs   expected Windows version (minor version first)
  701.  
  702. Format of Codeview trailer (at end of executable):
  703. Offset  Size    Description
  704.  00h    WORD    signature 4E42h ('NB')
  705.  02h    WORD    Microsoft debug info version number
  706.  04h    DWORD   Codeview header offset
  707.  
  708. Format of new executable segment table record:
  709.  00h    WORD    offset in file (shift left by alignment shift to get byte offs)
  710.  02h    WORD    length of image in file (0000h = 64K)
  711.  04h    WORD    attributes
  712.                 bit 0: data segment rather than code segment
  713.                 bit 1: unused???
  714.                 bit 2: real mode
  715.                 bit 3: iterated
  716.                 bit 4: movable
  717.                 bit 5: sharable
  718.                 bit 6: preloaded rather than demand-loaded
  719.                 bit 7: execute-only (code) or read-only (data)
  720.                 bit 8: relocations (directly following code for this segment)
  721.                 bit 9: debug info present
  722.                 bits 10,11: 80286 DPL bits
  723.                 bit 12:     discardable
  724.                 bits 13-15: discard priority
  725.  06h    WORD    number of bytes to allocate for segment (0000h = 64K)
  726. Note:   the first segment table entry is entry number 1
  727.  
  728. Format of new executable entry table item (list):
  729. Offset  Size    Description
  730.  00h    BYTE    number of entry points (00h if end of entry table list)
  731.  01h    BYTE    segment number (00h if end of entry table list)
  732.  02h 3N BYTEs   entry records
  733.                 Offset  Size    Description
  734.                  00h    BYTE    flags
  735.                                 bit 0: exported
  736.                                 bit 1: single data
  737.                                 bits 2-7: unused???
  738.                  01h    WORD    offset within segment
  739.  
  740. Format of new executable relocation data (immediately follows segment image):
  741. Offset  Size    Description
  742.  00h    WORD    number of relocation items
  743.  02h 8N BYTEs   relocation items
  744.                 Offset  Size    Description
  745.                  00h    BYTE    relocation type
  746.                                 00h LOBYTE
  747.                                 02h BASE
  748.                                 03h PTR
  749.                                 05h OFFS
  750.                                 0Bh PTR48
  751.                                 0Dh OFFS32
  752.                  01h    BYTE    flags
  753.                                 bit 2: additive
  754.                  02h    WORD    offset within segment
  755.                  04h    WORD    target address segment
  756.                  06h    WORD    target address offset
  757.                  
  758. Format of new executable resource data:
  759. Offset  Size    Description
  760.  00h    WORD    alignment shift count for resource data
  761.  02h  N RECORDs resources
  762.         Format of resource record:
  763.         Offset  Size    Description
  764.          00h    WORD    type ID
  765.                         0000h if end of resource records
  766.                         >= 8000h if integer type
  767.                         else offset from start of resource table to type string
  768.          02h    WORD    number of resources of this type
  769.          04h    DWORD   reserved for runtime use
  770.          08h  N Resources (see below)
  771. Note:   resource type and name strings are stored immediately following the
  772.           resource table, and are not null-terminated
  773.  
  774. Format of new executable resource entry:
  775. Offset  Size    Description
  776.  00h    WORD    offset in alignment units from start of file to contents of
  777.                 the resource data
  778.  02h    WORD    length of resource image in bytes
  779.  04h    WORD    flags
  780.                 bit 4: moveable
  781.                 bit 5: shareable
  782.                 bit 6: preloaded
  783.  06h    WORD    resource ID
  784.                 >= 8000h if integer resource
  785.                 else offset from start of resource table to resource string
  786.  08h    DWORD   reserved for runtime use
  787. Notes:  resource type and name strings are stored immediately following the
  788.           resource table, and are not null-terminated
  789.         strings are counted strings, with a string of length 0 indicating the
  790.           end of the resource table
  791.  
  792. Format of new executable module reference table [one bundle of entries]:
  793. Offset  Size    Description
  794.  00h    BYTE    number of records in this bundle (00h if end of table)
  795.  01h    BYTE    segment indicator
  796.                 00h unused
  797.                 FFh movable segment, segment number is in entry
  798.                 else segment number of fixed segment
  799.  02h  N RECORDs
  800.         Format of segment record
  801.         Offset  Size    Description
  802.          00h    BYTE    flags
  803.                         bit 0: entry is exported
  804.                         bit 1: entry uses global (shared) data
  805.                         bits 7-3: number of parameter words
  806.         ---fixed segment---
  807.          01h    WORD    offset
  808.         ---moveable segment---
  809.          01h  2 BYTEs   INT 3F instruction (CDh 3Fh)
  810.          03h    BYTE    segment number
  811.          05h    WORD    offset
  812. Note:   table entries are numbered starting from 1
  813.  
  814. Format of new executable resident/nonresident name table entry:
  815. Offset  Size    Description
  816.  00h    BYTE    length of string (00h if end of table)
  817.  01h  N BYTEs   ASCII text of string
  818.  N+1    WORD    ordinal number (index into entry table)
  819. Notes:  the first string in the resident name table is the module name; the
  820.           first entry in the nonresident name table is the module description
  821.         the strings are case-sensitive; if the executable was linked with
  822.           /IGNORECASE, all strings are in uppercase
  823.  
  824. Format of Linear Executable (enhanced mode executable) header:
  825. Offset  Size    Description
  826.  00h  2 BYTEs   "LE" (4Ch 45h) signature
  827.  02h    BYTE    byte order (00h = little-endian, nonzero = big-endian)
  828.  03h    BYTE    word order (00h = little-endian, nonzero = big-endian)
  829.  04h    DWORD   executable format level
  830.  08h    WORD    CPU type (see also INT 15/AH=C9h)
  831.                 01h Intel 80286 or upwardly compatible
  832.                 02h Intel 80386 or upwardly compatible                  
  833.                 03h Intel 80486 or upwardly compatible                  
  834.                 04h Intel 80586 or upwardly compatible
  835.                 20h Intel i860 (N10) or compatible
  836.                 21h Intel "N11" or compatible
  837.                 40h MIPS Mark I (R2000, R3000) or compatible
  838.                 41h MIPS Mark II (R6000) or compatible
  839.                 42h MIPS Mark III (R4000) or compatible
  840.  0Ah    WORD    target operating system
  841.                 01h OS/2
  842.                 02h Windows
  843.                 03h DOS4.x
  844.                 04h Windows 386
  845.  0Ch    DWORD   module version
  846.  10h    DWORD   module type
  847.                 bit 2: initialization (only for DLLs)
  848.                         0 = global
  849.                         1 = per-process
  850.                 bit 4: no internal fixups in executable image
  851.                 bit 5: no external fixups in executable image
  852.                 bits 8,9,10:
  853.                         0 = unknown
  854.                         1 = incompatible with PM windowing \
  855.                         2 = compatible with PM windowing    > (only for
  856.                         3 = uses PM windowing API          /    programs)
  857.                 bit 13: module not loadable (only for programs)
  858.                 bit 15: module is DLL rather than program
  859.  14h    DWORD   number of memory pages
  860.  18h    Initial CS:EIP
  861.         DWORD   object number
  862.         DWORD   offset
  863.  20h    Initial SS:ESP
  864.         DWORD   object number
  865.         DWORD   offset
  866.  28h    DWORD   memory page size
  867.  2Ch    DWORD   bytes on last page
  868.  30h    DWORD   fixup section size
  869.  34h    DWORD   fixup section checksum
  870.  38h    DWORD   loader section size
  871.  3Ch    DWORD   loader section checksum
  872.  40h    DWORD   offset of object table (see below)
  873.  44h    DWORD   object table entries
  874.  48h    DWORD   object page map table offset
  875.  4CH    DWORD   object iterate data map offset
  876.  50h    DWORD   resource table offset
  877.  54h    DWORD   resource table entries
  878.  58h    DWORD   resident names table offset
  879.  5Ch    DWORD   entry table offset
  880.  60h    DWORD   module directives table offset
  881.  64h    DWORD   Module Directives entries
  882.  68h    DWORD   Fixup page table offset
  883.  6Ch    DWORD   Fixup record table offset
  884.  70h    DWORD   imported modules name table offset
  885.  74h    DWORD   imported modules count
  886.  78h    DWORD   imported procedures name table offset
  887.  7Ch    DWORD   per-page checksum table offset
  888.  80h    DWORD   data pages offset
  889.  84h    DWORD   preload page count
  890.  88h    DWORD   non-resident names table offset
  891.  8Ch    DWORD   non-resident names table length
  892.  90h    DWORD   non-resident names checksum
  893.  94h    DWORD   automatic data object
  894.  98h    DWORD   debug information offset
  895.  9Ch    DWORD   debug information length
  896.  A0h    DWORD   preload instance pages number
  897.  A4h    DWORD   demand instance pages number
  898.  A8h    DWORD   extra heap allocation
  899.  ACh    ???     (at most 24 additional bytes here)
  900. Note:   used by EMM386.EXE, QEMM, and Windows 3.0 Enhanced Mode drivers
  901.  
  902. Format of object table entry:
  903. Offset  Size    Description
  904.  00h    DWORD   virtual size in bytes
  905.  04h    DWORD   relocation base address
  906.  08h    DWORD   object flags
  907.                 bit 0: readable
  908.                 bit 1: writable
  909.                 bit 2: executable
  910.                 bit 3: resource
  911.                 bit 4: discardable
  912.                 bit 5: shared
  913.                 bit 6: preloaded
  914.                 bit 7: invalid
  915.                 bit 8-9: type
  916.                         00 normal
  917.                         01 zero-filled
  918.                         10 resident
  919.                         11 resident/contiguous
  920.                 bit 10: "RESIDENT/LONG_LOCKABLE"
  921.                 bit 11: reserved???
  922.                 bit 12: "16:16_ALIAS"
  923.                 bit 13: "BIG" (32-bit???)
  924.                 bit 14: conforming
  925.                 bit 15: "OBJECT_I/O_PRIVILEGE_LEVEL"
  926.                 bits 16-31: reserved
  927.  0Ch    DWORD   page map index
  928.  10h    DWORD   page map entries
  929.  10h  4 BYTEs   ??? (apparently always zeros)
  930.  
  931. Format of object page map table entry:
  932. Offset  Size    Description
  933.  00h  4 BYTEs   ???
  934.  
  935. Format of resident names table entry:
  936. Offset  Size    Description
  937.  00h    BYTE    length of name
  938.  01h  N BYTEs   name
  939.  N+1  3 BYTEs   ???
  940.  
  941. Format of linear executable entry table:
  942. Offset  Size    Description
  943.  00h    BYTE    number of entries in table
  944.  01h 10 BYTEs per entry
  945.                 Offset  Size    Description
  946.                  00h    BYTE    bit flags
  947.                                 bit 1: 32-bit entry
  948.                  01h    WORD    object number
  949.                  03h    BYTE    bit flags
  950.                                 bit 0: exported
  951.                                 bit 1: ???
  952.                  04h    DWORD   offset of entry point
  953.                  08h  2 BYTEs   ???
  954.  
  955. Format of Borland debugging information header (following load image):
  956. Offset  Size    Description
  957.  00h    WORD    signature 52FBh
  958.  02h    WORD    version ID
  959.  04h    DWORD   size of name pool in bytes
  960.  08h    WORD    number of names in namem pool
  961.  0Ah    WORD    number of type entries
  962.  0Ch    WORD    number of structure members
  963.  0Eh    WORD    number of symbols
  964.  10h    WORD    number of global symbols
  965.  12h    WORD    number of modules
  966.  14h    WORD    number of locals (optional)
  967.  16h    WORD    number of scopes in table
  968.  18h    WORD    number of line-number entries
  969.  1Ah    WORD    number of include files
  970.  1Ch    WORD    number of segment records
  971.  1Eh    WORD    number of segment/file correlations
  972.  20h    DWORD   size of load image after removing uninitialized data and debug
  973.                 info
  974.  24h    DWORD   debugger hook; pointer into debugged program whose meaning
  975.                 depends on program flags
  976.  28h    BYTE    program flags
  977.                 bit 0: case-sensitive link
  978.                 bit 1: pascal overlay program
  979.  29h    WORD    no longer used
  980.  2Bh    WORD    size of data pool in bytes
  981.  2Dh    BYTE    padding
  982.  2Eh    WORD    size of following header extension (currently 00h, 10h, or 20h)
  983.  30h    WORD    number of classes
  984.  32h    WORD    number of parents
  985.  34h    WORD    number of global classes (currently unused)
  986.  36h    WORD    number of overloads (currently unused)
  987.  38h    WORD    number of scope classes
  988.  3Ah    WORD    number of module classes
  989.  3Ch    WORD    number of coverage offsets
  990.  3Eh    DWORD   offset relative to symbol base of name pool
  991.  42h    WORD    number of browser information records
  992.  44h    WORD    number of optimized symbol records
  993.  46h    WORD    debugging flags
  994.  48h  8 BYTEs   padding
  995. Note:   additional information on the Borland debugging info may be found in
  996.           Borland's Open Architecture Handbook
  997.