home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / exe.h < prev    next >
C/C++ Source or Header  |  1999-04-30  |  3KB  |  91 lines

  1. /*static char *SCCSID = "@(#)exe.h      6.3 92/03/15";*/
  2. /*static char *SCCSID = "@(#)exe.h      6.3 92/03/15";*/
  3. /****************************** Module Header ******************************\
  4. *                                                                          *
  5. * Copyright (c) 1987  - 1992 IBM Corporation                               *
  6. *                                                                          *
  7. * Module Name: EXE.H                                                       *
  8. *                                                                          *
  9. * EXE header format.                                                       *
  10. *                                                                          *
  11. \***************************************************************************/
  12.  
  13. /* NOINC */
  14. #if __IBMC__ || __IBMCPP__
  15.    #pragma info( none )
  16.       #ifndef __CHKHDR__
  17.          #pragma info( none )
  18.       #endif
  19.    #pragma info( restore )
  20. #endif
  21. #ifdef __cplusplus
  22.       extern "C" {
  23. #endif
  24. /* INC */
  25.  
  26. #ifndef __EXE__
  27. #define __EXE__
  28.  
  29. #ifndef BYTE
  30. typedef unsigned char BYTE;
  31. #endif
  32.  
  33. #ifndef WORD
  34. typedef unsigned short WORD;
  35. #endif
  36.  
  37. typedef WORD bbmask;
  38.  
  39. struct exe {
  40.         WORD eid;                       /* contains EXEID, below */
  41.         WORD elast;                     /* # of bytes in last page */
  42.         WORD epagsiz;                   /* # of pages in whole file */
  43.         WORD erelcnt;                   /* # of relocation entrys */
  44.         WORD ehdrsiz;                   /* size of header, in paragraphs */
  45.         WORD eminfre;                   /* min # of free paragraphs needed */
  46.         WORD emaxfre;                   /* max # of free paragraphs needed */
  47.         WORD eiSS;                      /* initial SS value */
  48.         WORD eiSP;                      /* initial SP value */
  49.         WORD enegsum;                   /* negative sum of entire file */
  50.         WORD eiIP;                      /* initial IP value */
  51.         WORD eiCS;                      /* initial CS value */
  52.         WORD ereloff;                   /* offset in file of relocation table */
  53.         WORD eovlnum;                   /* number of the overlay */
  54.  
  55. /*      the following fields may not be present.
  56.  *              ereloff = 28            not present
  57.  *                      = 30            exe.ever present and valid
  58.  *                      = 32            exe.ever field contains garbage
  59.  *              ereloff > 32            exe.ever present and valid
  60.  *                                              = 0 if "don't know"
  61.  */
  62.  
  63.         WORD ever;                      /* version # of producing linker */
  64.         WORD dumy;                      /* unused */
  65.  
  66. /*      the following fields may not be present - if the exe.ereloff
  67.  *      value encompasses the fields then they are present and valid.
  68.  */
  69.  
  70.         bbmask  ebb;                    /* behavior bits */
  71.         WORD dumy2[7];                  /* must be 0 until defined */
  72. };
  73.  
  74.  
  75. #define EXEID 0x5a4d                    /* magic ID value */
  76.  
  77. #endif /* __EXE__ */
  78.  
  79. /* NOINC */
  80. #ifdef __cplusplus
  81.         }
  82. #endif
  83. #if __IBMC__ || __IBMCPP__
  84.    #pragma info( none )
  85.       #ifndef __CHKHDR__
  86.          #pragma info( restore )
  87.       #endif
  88.    #pragma info( restore )
  89. #endif
  90. /* INC */
  91.