[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 21 Fn 4B  - DOS 2+ - "exec" - Load And/or Execute Program  (Cont.)

   BYTE    one-based module number in Import Module table
   BYTE/WORD ordinal number
   WORD/DWORD value to add (only present if modifier bit 4 set)
   ---external,name---
   BYTE    one-based module number in Import Module table
   WORD    offset in Import Procedure names
   WORD/DWORD value to add (only present if modifier bit 4 set)
---if multiple type---
 02h   BYTE    number of items
 03h   var relocation info as for "single" type (see above)
      N WORDs  offsets of items to relocate

Format of old Phar Lap .EXP file header:
Offset Size    Description
 00h  2 BYTEs  "MP" (4Dh 50h) signature
 02h   WORD    remainder of image size / page size (page size = 512h)
 04h   WORD    size of image in pages
 06h   WORD    number of relocation items
 08h   WORD    header size in paragraphs
 0Ah   WORD    minimum number of extra 4K pages to be allocated at the end
       of program, when it is loaded
 0Ch   WORD    maximum number of extra 4K pages to be allocated at the end
       of program, when it is loaded
 0Eh   DWORD   initial ESP
 12h   WORD    word checksum of file
 14h   DWORD   initial EIP
 18h   WORD    offset of first relocation item
 1Ah   WORD    overlay number
 1Ch   WORD    ??? (wants to be 1)

Format of new Phar Lap .EXP file header:
Offset Size    Description
 00h  2 BYTEs  signature ("P2" for 286 .EXP executable, "P3" for 386 .EXP)
 02h   WORD    level (01h flat-model file, 02h multisegmented file)
 04h   WORD    header size
 06h   DWORD   file size in bytes
 0Ah   WORD    checksum
 0Ch   DWORD   offset of run-time parameters within file
 10h   DWORD   size of run-time parameters in bytes
 14h   DWORD   offset of relocation table within file
 18h   DWORD   size of relocation table in bytes
 1Ch   DWORD   offset of segment information table within file
 20h   DWORD   size of segment information table in bytes
 24h   WORD    size of segment information table entry in bytes
 26h   DWORD   offset of load image within file
 2Ah   DWORD   size of load image on disk
 2Eh   DWORD   offset of symbol table within file
 32h   DWORD   size of symbol table in bytes
 36h   DWORD   offset of GDT within load image
 3Ah   DWORD   size of GDT in bytes
 3Eh   DWORD   offset of LDT within load image
 42h   DWORD   size of LDT in bytes
 46h   DWORD   offset of IDT within load image
 4Ah   DWORD   size of IDT in bytes
 4Eh   DWORD   offset of TSS within load image
 52h   DWORD   size of TSS in bytes
 56h   DWORD   minimum number of extra bytes to be allocated at end of program
       (level 1 executables only)
 5Ah   DWORD   maximum number of extra bytes to be allocated at end of program
       (level 1 executables only)
 5Eh   DWORD   base load offset (level 1 executables only)
 62h   DWORD   initial ESP
 66h   WORD    initial SS
 68h   DWORD   initial EIP
 6Ch   WORD    initial CS
 6Eh   WORD    initial LDT
 70h   WORD    initial TSS
 72h   WORD    flags
       bit 0: load image is packed
       bit 1: 32-bit checksum is present
       bits 4-2: type of relocation table
 74h   DWORD   memory requirements for load image
 78h   DWORD   32-bit checksum (optional)
 7Ch   DWORD   size of stack segment in bytes
 80h 256 BYTEs reserved (0)

Format of Phar Lap segment information table entry:
Offset Size    Description
 00h   WORD    selector number
 02h   WORD    flags
 04h   DWORD   base offset of selector
 08h   DWORD   minimum number of extra bytes to be allocated to the segment

Format of 386|DOS-Extender run-time parameters:
Offset Size    Description
 00h  2 BYTEs  signature "DX" (44h 58h)
 02h   WORD    minimum number of real-mode params to leave free at run time
 04h   WORD    maximum number of real-mode params to leave free at run time
 06h   WORD    minimum interrupt buffer size in KB
 08h   WORD    maximum interrupt buffer size in KB
 0Ah   WORD    number of interrupt stacks
 0Ch   WORD    size in KB of each interrupt stack
 0Eh   DWORD   offset of byte past end of real-mode code and data
 12h   WORD    size in KB of call buffers
 14h   WORD    flags
       bit 0: file is virtual memory manager
       bit 1: file is a debugger
 16h   WORD    unprivileged flag (if nonzero, executes at ring 1, 2, or 3)
 18h 104 BYTEs reserved (0)

Format of Phar Lap repeat block header:
Offset Size    Description
 00h   WORD    byte count
 02h   BYTE    repeat string length

Format of Borland debugging information header (following load image):
Offset Size    Description
 00h   WORD    signature 52FBh
 02h   WORD    version ID
 04h   DWORD   size of name pool in bytes
 08h   WORD    number of names in namem pool
 0Ah   WORD    number of type entries
 0Ch   WORD    number of structure members
 0Eh   WORD    number of symbols
 10h   WORD    number of global symbols
 12h   WORD    number of modules
 14h   WORD    number of locals (optional)
 16h   WORD    number of scopes in table
 18h   WORD    number of line-number entries
 1Ah   WORD    number of include files
 1Ch   WORD    number of segment records
 1Eh   WORD    number of segment/file correlations
 20h   DWORD   size of load image after removing uninitialized data and debug
       info
 24h   DWORD   debugger hook; pointer into debugged program whose meaning
       depends on program flags
 28h   BYTE    program flags
       bit 0: case-sensitive link
       bit 1: pascal overlay program
 29h   WORD    no longer used
 2Bh   WORD    size of data pool in bytes
 2Dh   BYTE    padding
 2Eh   WORD    size of following header extension (currently 00h, 10h, or 20h)
 30h   WORD    number of classes
 32h   WORD    number of parents
 34h   WORD    number of global classes (currently unused)
 36h   WORD    number of overloads (currently unused)
 38h   WORD    number of scope classes
 3Ah   WORD    number of module classes
 3Ch   WORD    number of coverage offsets
 3Eh   DWORD   offset relative to symbol base of name pool
 42h   WORD    number of browser information records
 44h   WORD    number of optimized symbol records
 46h   WORD    debugging flags
 48h  8 BYTEs  padding

Note:  additional information on the Borland debugging info may be found in
     Borland's Open Architecture Handbook

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson