home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / object.h < prev    next >
C/C++ Source or Header  |  1993-01-19  |  3KB  |  97 lines

  1. /* ---------------------------------------------------------------------- */
  2. /*                   Copyright (C) 1991 by Natürlich!                     */
  3. /*                      This file is copyrighted!                         */
  4. /*                Refer to the documentation for details.                 */
  5. /* ---------------------------------------------------------------------- */
  6. /********** ANY CHANGE HERE NECESSITATES CHANGES IN flip_structs **********/
  7. #ifndef _OBJECT_
  8. # define _OBJECT_
  9.  
  10. # ifndef _STRUCTS_
  11. #  include "structs.h"
  12. # endif
  13.  
  14. # define OBJMAGIC     0xCEC1D3CDL  /* spells NASM (what else... )   */
  15. # define SIGNIFICANT  32           /* symbol length for linking     */
  16. # define FSIGNIFICANT 32           /* filename length for libraries */
  17.  
  18. /* ---------------------------------------------------------- */
  19. /*     Stuff that gets put in front of every object file      */
  20. /* if you are porting this... Don't mess with the XXXSIZE     */
  21. /* #defines they are handcoded for checking compatibility!!   */
  22. /* ---------------------------------------------------------- */          
  23. typedef struct
  24. {
  25.    lword    magic;         /*  0 +4 */
  26.    word     version,       /*  4 +2 */
  27.             revision,      /*  6 +2 */
  28.             alignment,     /*  8 +2 */
  29.             codesize;      /* 10 +2 */
  30.    lword    segsize,       /* 12 +4 */
  31.             immsize,       /* 16 +4 */
  32.             relsize,       /* 20 +4 */
  33.             expsize,       /* 24 +4 */
  34.             symsize,       /* 28 +4 */
  35.             fixsize,       /* 32 +4 */
  36.             aux1;          /* 36 +4 */
  37. } obj_h;
  38. #define OBJHSIZE  (size_t) 40
  39.  
  40. /* ----------------------------------------------------------
  41.    output form of Symbol table. Changed this since app. some
  42.    (stupid IMO) compilers like to 32-bit align pointers
  43.    ---------------------------------------------------------- */
  44. typedef struct
  45. {
  46.    word     val, 
  47.             no, 
  48.             type,
  49.             dummy;               /* Hi there */
  50.    ref huge *refs;               /* got to be long for some LINK trickery */
  51.    char     name[ SIGNIFICANT];
  52. } linksymbol;
  53. #define LSYMSIZE  (size_t) (12 + SIGNIFICANT)
  54.  
  55. typedef struct
  56. {
  57.    word     val,           /*  0 +2 */
  58.             aux,           /*  2 +2 */
  59.             label;         /*  4 +2 */
  60.    byte     op,            /*  6 +1 */
  61.             fix;           /*  7 +1 */
  62.    word     t,             /*  8 +2 */
  63.             l,             /* 10 +2 */
  64.             r;             /* 12 +2 */
  65. } e_dropped;
  66. #define EDROPSIZE (size_t) 14
  67.  
  68. typedef struct
  69. {
  70.    word     block,
  71.             type,
  72.             offset,
  73.             val;
  74. } i_dropped;
  75. #define IDROPSIZE (size_t) 8
  76.  
  77. typedef struct
  78. {
  79.    word     type,
  80.             index,
  81.             size;
  82. } s_dropped;
  83. #define SDROPSIZE (size_t) 6
  84.  
  85. typedef struct
  86. {
  87.    word     poof,
  88.             imm,
  89.             index;
  90. } f_dropped;
  91. #define FDROPSIZE (size_t) 6
  92.  
  93. typedef word   r_dropped;
  94. #define RDROPSIZE (size_t) 2
  95.  
  96. #endif
  97.