/* (C) 1998-2001 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
/* Generate the assembler code preamble */
{
/* Generate the global segments and push them */
- PushCodeSeg (NewCodeSeg (""));
+ PushCodeSeg (NewCodeSeg (SegmentNames[SEG_CODE], ""));
PushDataSeg (NewDataSeg (""));
-
+
/* Identify the compiler version */
AddDataSegLine (DS, "; File generated by cc65 v %u.%u.%u",
VER_MAJOR, VER_MINOR, VER_PATCH);
+void g_pushseg (struct CodeSeg** FCS, struct DataSeg** FDS, const char* FuncName)
+/* Push the current segments and generate new ones for the given function */
+{
+ PushCodeSeg (NewCodeSeg (SegmentNames[SEG_CODE], FuncName));
+ *FCS = CS;
+ PushDataSeg (NewDataSeg (FuncName));
+ *FDS = DS;
+}
+
+
+
+void g_popseg (void)
+/* Restore the old segments */
+{
+ PopCodeSeg ();
+ PopDataSeg ();
+}
+
+
+
void g_usecode (void)
/* Switch to the code segment */
{
} while (Chunk);
/* Output the line */
- AddCodeSegLine (CS, Buf);
+ AddDataSegLine (DS, Buf);
}
}