home *** CD-ROM | disk | FTP | other *** search
/ Internet MPEG Audio Archive / IMAA.mdf / UTIL / DOS / L3V100N / RSX / SOURCE / GNUAOUT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-20  |  1.7 KB  |  57 lines

  1. /* Copyright    Rainer Schnitker 92,93 */
  2.  
  3. #ifndef _DPMI_TYPES
  4. #define _DPMI_TYPES
  5.  
  6. typedef unsigned char   BYTE;
  7. typedef BYTE far        *LPBYTE;
  8. typedef unsigned int    WORD;
  9. typedef WORD far        *LPWORD;
  10. typedef unsigned long   DWORD;
  11. typedef DWORD far       *LPDWORD;
  12. #endif
  13.  
  14. #define N_MAGIC(exec) ((exec).a_info & 0xffff)
  15. #define OMAGIC 0x107
  16. #define NMAGIC 0x108
  17. #define ZMAGIC 0x10B
  18.  
  19. /* load different sizes */
  20. #define _N_HDROFF(x)    _n_hdroff
  21. #define N_TXTADDR(x)    n_txtaddr
  22. #define SEGMENT_SIZE    segment_size
  23.  
  24. #define N_DATADDR(x) (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1)))
  25. #define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
  26.  
  27. #define N_TXTOFF(x) (_N_HDROFF((x)) + sizeof (struct exec))
  28. #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
  29. #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
  30. #define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
  31. #define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize)
  32. #define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
  33.  
  34. typedef struct exec {
  35.     DWORD a_info;     /* Use macros N_MAGIC, etc for access */
  36.     DWORD a_text;     /* length of text, in bytes */
  37.     DWORD a_data;     /* length of data, in bytes */
  38.     DWORD a_bss;      /* length of uninitialized data area for file, in bytes */
  39.     DWORD a_syms;     /* length of symbol table data in file, in bytes */
  40.     DWORD a_entry;    /* start address */
  41.     DWORD a_trsize;   /* length of relocation info for text, in bytes */
  42.     DWORD a_drsize;   /* length of relocation info for data, in bytes */
  43.     } GNUOUT ;
  44.  
  45. struct exe_hdr {
  46.     WORD signatur;
  47.     WORD low;
  48.     WORD high;
  49.     WORD reloc;
  50.     WORD hdr_para;
  51.     } ;
  52.  
  53. struct emx_hdr {
  54.         char sig[18];
  55.         unsigned long next_hdr;
  56.         } ;
  57.