home *** CD-ROM | disk | FTP | other *** search
/ Computer Select (Limited Edition) / Computer Select.iso / dobbs / v16n10 / embedcp.exe / CODE.EXE / OBJFORM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-28  |  2.7 KB  |  62 lines

  1. /* Header file for Digital Research and Microsoft object module formats */
  2. /*                                                                      */
  3. /* Copyright (c) 1991, Stuart G. Phillips.  All rights reserved.        */
  4. /*                                                                      */
  5. /* Permission is granted for non-commercial use of this software.       */
  6. /* You are expressly prohibited from selling this software in any form, */
  7. /* distributing it with another product, or removing this notice.       */
  8. /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR       */
  9. /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED       */
  10. /* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR           */
  11. /* PURPOSE.                                                             */
  12. /*                                                                      */
  13. /* NOTE: These structure declarations will only work correctly when     */
  14. /*       used with a compiler that does NOT impose word alignment on    */
  15. /*       byte storage classes.                                          */
  16. /*                                                                      */
  17.  
  18. #define CHDRSIZE        128
  19. #define EXE_MAGIC       0x5a4d          /* Magic number for .EXE files */
  20. #define LOD_MAGIC       0x4655          /* Magic number for .LOD files */
  21. #define LOD_VERSION     0x0101          /* Version of .LOD header format */
  22.  
  23. struct RELITEM {unsigned short  offset;
  24.                 unsigned short  segment;
  25.                };
  26.  
  27.  
  28. struct EXEHDR { unsigned short  magic;
  29.                 unsigned short  nbytes;
  30.                 unsigned short  npages;
  31.                 unsigned short  nreloc;
  32.                 unsigned short  hdrsize;
  33.                 unsigned short  endmin;
  34.                 unsigned short  hilo_flag;
  35.                 unsigned short  ss_offset;
  36.                 unsigned short  val_sp;
  37.                 unsigned short  chk_sum;
  38.                 unsigned short  val_ip;
  39.                 unsigned short  cs_offset;
  40.                 unsigned short  rel_offset;
  41.                 unsigned short  ovl_num;
  42.               };
  43.  
  44.  
  45. struct LODHDR { unsigned short  magic;
  46.                 unsigned short  version;
  47.                 unsigned short  val_offset;
  48.                 unsigned short  val_seg;
  49.                 long            time_stamp;
  50.                 long            image_size;
  51.               };
  52.  
  53. struct GRPDESC {char            g_form;
  54.                 unsigned short  g_length;
  55.                 unsigned short  a_base;
  56.                 unsigned short  g_min;
  57.                 unsigned short  g_max;
  58.              };
  59.  
  60. struct CMDHDR { struct GRPDESC desc[1];
  61.               };
  62.