home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / assembler / as / src / h / area < prev    next >
Encoding:
Text File  |  1993-03-07  |  958 b   |  55 lines

  1. /*
  2.  * area.h
  3.  * Copyright © 1992 Niklas Röjemo
  4.  */
  5.  
  6. #ifndef _area_h
  7. #define _area_h
  8.  
  9. #ifndef _symbol_h
  10. #include "symbol.h"
  11. #endif
  12.  
  13.  
  14. #ifndef _reloc_h
  15. #include "reloc.h"
  16. #endif
  17.  
  18. #ifndef _lit_h
  19. #include "lit.h"
  20. #endif
  21.  
  22.  
  23. #define AREA_INIT      0x0002
  24. #define AREA_CODE      0x0200
  25. #define AREA_DATA      0x0000
  26. #define AREA_COMMONDEF 0x0400
  27. #define AREA_COMMONREF 0x0800
  28. #define AREA_UDATA     0x1000
  29. #define AREA_READONLY  0x2000
  30. #define AREA_DEBUG     0x8000
  31.  
  32. #define AREA_IMAGE(x) (!((x)->type&AREA_UDATA))
  33. #define AREA_NOSPACE(x,v) ((x)->imagesize < v)
  34. typedef struct AREA {
  35.   Symbol  *next;
  36.   int   type;
  37.   int   imagesize;
  38.   char *image;
  39.   int   norelocs;
  40.   Reloc   *relocs;
  41.   LitInfo *lits;  /* ldr reg,=value */
  42. } Area;
  43.  
  44. extern Symbol *areaCurrent;
  45. extern Symbol *areaEntry;
  46. extern int     areaEntryOffset;
  47. extern Symbol *areaHead;
  48.  
  49. void areaInit(void);
  50. void areaFinish(void);
  51. void areaGrow(Area *area,int mingrow);
  52. void areaPrint(Symbol *area);
  53.  
  54. #endif
  55.