home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / msj / msjv4_4 / overlays / exehdr.h next >
Encoding:
C/C++ Source or Header  |  1989-01-07  |  1.4 KB  |  29 lines

  1. /* exehdr.h 
  2.    format of MS-DOS .EXE file                                           */
  3.  
  4. struct exehdr_ {
  5.     char            M_sig;          /* M part of signature              */ 
  6.     char            Z_sig;          /* Z part of signature              */ 
  7.     unsigned        remain_len;     /* length % 512                     */
  8.     unsigned        page_len;       /* length / 512                     */
  9.     unsigned        num_relocs;     /* number of relocation items       */
  10.     unsigned        hsize;          /* file header size, in paragraphs  */
  11.     unsigned        minalloc;       /* minimum paragraphs heap needed   */
  12.     unsigned        maxalloc;       /* maximum paragraphs heap needed   */
  13.     unsigned        stack_offset;   /* paragraph offset of stk segment  */
  14.     unsigned        init_sp;        /* initial SP value                 */
  15.     unsigned        checksum;       /* checksum of what?  Who knows?    */
  16.     unsigned        init_ip;        /* entry point IP                   */
  17.     unsigned        code_offset;    /* paragraph offset of code segment */
  18.     unsigned        first_reloc;    /* file offset of reloc table       */
  19.     unsigned char   overlay_number; /* overlay number of this overlay   */
  20. };
  21.  
  22. /* following, in order, are the relocation table (offset and length given
  23.    above), the code, data, and stack segments, in that order.           */
  24.  
  25. struct reloc_entry_ {
  26.     unsigned offset;
  27.     unsigned segment;
  28. };
  29.