]> git.sur5r.net Git - cc65/blobdiff - src/cc65/segments.h
Fixed a bug
[cc65] / src / cc65 / segments.h
index de66af9d7eba55a9cd1f185dec13bb6598a68c74..fde43933d583c6de23abb5b078305e10dd09432e 100644 (file)
 /* common */
 #include "attrib.h"
 
+/* cc65 */
+#include "opcodes.h"
 
 
 /*****************************************************************************/
-/*                                Forwards                                  */
+/*                                Forwards                                  */
 /*****************************************************************************/
 
 
 
+struct CodeEntry;
+struct CodeLabel;
 struct CodeSeg;
 struct DataSeg;
+struct TextSeg;
 struct SymEntry;
 
 
 
 /*****************************************************************************/
-/*                                  Data                                    */
+/*                                  Data                                    */
 /*****************************************************************************/
 
 
@@ -75,6 +80,7 @@ typedef enum segment_t {
 /* A list of all segments used when generating code */
 typedef struct Segments Segments;
 struct Segments {
+    struct TextSeg*    Text;           /* Text segment */
     struct CodeSeg*    Code;           /* Code segment */
     struct DataSeg*    Data;           /* Data segment */
     struct DataSeg*    ROData;         /* Readonly data segment */
@@ -85,6 +91,9 @@ struct Segments {
 /* Pointer to the current segment list. Output goes here. */
 extern Segments* CS;
 
+/* Pointer to the global segment list */
+extern Segments* GS;
+
 
 
 /*****************************************************************************/
@@ -114,9 +123,15 @@ void UseDataSeg (segment_t DSeg);
 struct DataSeg* GetDataSeg (void);
 /* Return the current data segment */
 
+void AddTextLine (const char* Format, ...) attribute ((format (printf, 1, 2)));
+/* Add a line to the current text segment */
+
 void AddCodeLine (const char* Format, ...) attribute ((format (printf, 1, 2)));
 /* Add a line of code to the current code segment */
 
+void AddCode (opc_t OPC, am_t AM, const char* Arg, struct CodeLabel* JumpTo);
+/* Add a code entry to the current code segment */
+
 void AddDataLine (const char* Format, ...) attribute ((format (printf, 1, 2)));
 /* Add a line of data to the current data segment */