/* common */
#include "attrib.h"
+/* cc65 */
+#include "opcodes.h"
/*****************************************************************************/
-/* Forwards */
+/* Forwards */
/*****************************************************************************/
+struct CodeEntry;
+struct CodeLabel;
struct CodeSeg;
struct DataSeg;
+struct TextSeg;
struct SymEntry;
/*****************************************************************************/
-/* Data */
+/* Data */
/*****************************************************************************/
/* 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 */
/* Pointer to the current segment list. Output goes here. */
extern Segments* CS;
+/* Pointer to the global segment list */
+extern Segments* GS;
+
/*****************************************************************************/
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 */