Allow push/pop arguments for segment name #pragmas

git-svn-id: svn://svn.cc65.org/cc65/trunk@2907 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-03-08 22:33:27 +00:00
parent 7a5d4f3138
commit 40dc3582a9
6 changed files with 118 additions and 44 deletions

View File

@@ -237,15 +237,11 @@ void g_usebss (void)
void g_segname (segment_t Seg, const char* Name)
/* Set the name of a segment */
void g_segname (segment_t Seg)
/* Emit the name of a segment if necessary */
{
DataSeg* S;
/* Remember the new name */
NewSegName (Seg, Name);
/* Emit a segment directive for the data style segments */
DataSeg* S;
switch (Seg) {
case SEG_RODATA: S = CS->ROData; break;
case SEG_DATA: S = CS->Data; break;
@@ -253,7 +249,7 @@ void g_segname (segment_t Seg, const char* Name)
default: S = 0; break;
}
if (S) {
DS_AddLine (S, ".segment\t\"%s\"", Name);
DS_AddLine (S, ".segment\t\"%s\"", GetSegName (Seg));
}
}