]> git.sur5r.net Git - cc65/blobdiff - src/da65/attrtab.h
Merge pull request #627 from jedeoric/master
[cc65] / src / da65 / attrtab.h
index 50d39b016ce2005048207e7187a0999f219c029e..18515ce495013901aa9aa2878cd6de32a431b1a1 100644 (file)
@@ -1,15 +1,15 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                attrtab.h                                 */
+/*                                 attrtab.h                                 */
 /*                                                                           */
-/*                      Disassembler attribute table                        */
+/*                       Disassembler attribute table                        */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000      Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 2000-2014, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -39,7 +39,7 @@
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
 typedef enum attr_t {
 
     /* Styles */
-    atDefault  = 0x00,         /* Default style */
-    atCode     = 0x01,
-    atIllegal  = 0x02,
-    atByteTab          = 0x03,         /* Same as illegal */
-    atWordTab  = 0x04,
-    atDWordTab = 0x05,
-    atAddrTab  = 0x06,
-    atRtsTab   = 0x07,
-    atTextTab   = 0x08,
+    atDefault      = 0x0000,    /* Default style */
+    atCode         = 0x0001,
+    atIllegal      = 0x0002,
+    atByteTab      = 0x0003,    /* Same as illegal */
+    atDByteTab     = 0x0004,
+    atWordTab      = 0x0005,
+    atDWordTab     = 0x0006,
+    atAddrTab      = 0x0007,
+    atRtsTab       = 0x0008,
+    atTextTab      = 0x0009,
+    atSkip         = 0x000A,    /* Skip code completely */
 
     /* Label flags */
-    atNoLabel  = 0x00,         /* No label for this address */
-    atExtLabel = 0x10,         /* External label */
-    atIntLabel  = 0x20,                /* Internally generated label */
-    atDepLabel = 0x30,         /* Dependent label (always extern) */
+    atNoLabel      = 0x0000,    /* No label for this address */
+    atExtLabel     = 0x0010,    /* External label */
+    atIntLabel     = 0x0020,    /* Internally generated label */
+    atDepLabel     = 0x0040,    /* Dependent label */
+    atUnnamedLabel = 0x0080,    /* Unnamed label */
 
-    atStyleMask = 0x0F,                /* Output style */
-    atLabelMask = 0x30         /* Label information */
+    atLabelDefined = 0x0100,    /* True if we defined the label */
+
+    atStyleMask    = 0x000F,    /* Output style */
+    atLabelMask    = 0x00F0,    /* Label information */
+
+    /* Segment */
+    atSegment      = 0x0100,    /* Code is in a segment */
+    atSegmentEnd   = 0x0200,    /* Segment end */
+    atSegmentStart = 0x0400,    /* Segment start */
 } attr_t;
 
 
 
 /*****************************************************************************/
-/*                                  Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
 
-void MarkRange (unsigned Start, unsigned End, attr_t Attr);
-/* Mark a range with the given attribute */
+void AddrCheck (unsigned Addr);
+/* Check if the given address has a valid range */
 
-void MarkAddr (unsigned Addr, attr_t Attr);
-/* Mark an address with an attribute */
+attr_t GetAttr (unsigned Addr);
+/* Return the attribute for the given address */
 
-const char* MakeLabelName (unsigned Addr);
-/* Make the default label name from the given address and return it in a
- * static buffer.
- */
+int SegmentDefined (unsigned Start, unsigned End);
+/* Return true if the atSegment bit is set somewhere in the given range */
 
-void AddLabel (unsigned Addr, attr_t Attr, const char* Name);
-/* Add a label */
+int IsSegmentEnd (unsigned Addr);
+/* Return true if a segment ends at the given address */
 
-int HaveLabel (unsigned Addr);
-/* Check if there is a label for the given address */
+int IsSegmentStart (unsigned Addr);
+/* Return true if a segment starts at the given address */
 
-int MustDefLabel (unsigned Addr);
-/* Return true if we must define a label for this address, that is, if there
- * is a label at this address, and it is an external or internal label.
- */
+unsigned GetGranularity (attr_t Style);
+/* Get the granularity for the given style */
 
-const char* GetLabel (unsigned Addr);
-/* Return the label for an address or NULL if there is none */
+void MarkRange (unsigned Start, unsigned End, attr_t Attr);
+/* Mark a range with the given attribute */
 
-unsigned char GetStyleAttr (unsigned Addr);
+void MarkAddr (unsigned Addr, attr_t Attr);
+/* Mark an address with an attribute */
+
+attr_t GetStyleAttr (unsigned Addr);
 /* Return the style attribute for the given address */
 
-unsigned char GetLabelAttr (unsigned Addr);
+attr_t GetLabelAttr (unsigned Addr);
 /* Return the label attribute for the given address */
 
-void DefOutOfRangeLabels (void);
-/* Output any labels that are out of the loaded code range */
-
 
 
 /* End of attrtab.h */
 #endif
-
-
-