mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
More comment handling
git-svn-id: svn://svn.cc65.org/cc65/trunk@3389 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e814c484c3
commit
0eec7d8a87
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
||||
/* (C) 2000-2005 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@ -387,17 +387,6 @@ unsigned char GetLabelAttr (unsigned Addr)
|
||||
|
||||
|
||||
|
||||
static void DefineConst (unsigned Addr)
|
||||
/* Define an address constant */
|
||||
{
|
||||
Output ("%s", SymTab[Addr]->Name);
|
||||
Indent (AIndent);
|
||||
Output ("= $%04X", Addr);
|
||||
LineFeed ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DefOutOfRangeLabels (void)
|
||||
/* Output any labels that are out of the loaded code range */
|
||||
{
|
||||
@ -409,7 +398,7 @@ void DefOutOfRangeLabels (void)
|
||||
Addr = 0;
|
||||
while (Addr < CodeStart) {
|
||||
if (MustDefLabel (Addr)) {
|
||||
DefineConst (Addr);
|
||||
DefineConst (SymTab[Addr]->Name, SymTab[Addr]->Comment, Addr);
|
||||
}
|
||||
++Addr;
|
||||
}
|
||||
@ -417,7 +406,7 @@ void DefOutOfRangeLabels (void)
|
||||
/* Skip areas in code range */
|
||||
while (Addr <= CodeEnd) {
|
||||
if ((AttrTab[Addr] & atStyleMask) == atSkip && MustDefLabel (Addr)) {
|
||||
DefineConst (Addr);
|
||||
DefineConst (SymTab[Addr]->Name, SymTab[Addr]->Comment, Addr);
|
||||
}
|
||||
++Addr;
|
||||
}
|
||||
@ -425,7 +414,7 @@ void DefOutOfRangeLabels (void)
|
||||
/* High range */
|
||||
while (Addr < 0x10000) {
|
||||
if (MustDefLabel (Addr)) {
|
||||
DefineConst (Addr);
|
||||
DefineConst (SymTab[Addr]->Name, SymTab[Addr]->Comment, Addr);
|
||||
}
|
||||
++Addr;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2004 Ullrich von Bassewitz */
|
||||
/* (C) 2000-2005 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2003 Ullrich von Bassewitz */
|
||||
/* (C) 2000-2005 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@ -74,7 +74,7 @@ static void PageHeader (void)
|
||||
/* Print a page header */
|
||||
{
|
||||
fprintf (F,
|
||||
"; da65 V%u.%u.%u - (C) Copyright 2000-2003 Ullrich von Bassewitz\n"
|
||||
"; da65 V%u.%u.%u - (C) Copyright 2000-2005 Ullrich von Bassewitz\n"
|
||||
"; Input file: %s\n"
|
||||
"; Page: %u\n\n",
|
||||
VER_MAJOR, VER_MINOR, VER_PATCH,
|
||||
@ -318,3 +318,20 @@ void OutputSettings (void)
|
||||
|
||||
|
||||
|
||||
void DefineConst (const char* Name, const char* Comment, unsigned Addr)
|
||||
/* Define an address constant */
|
||||
{
|
||||
if (Pass == PassCount) {
|
||||
Output ("%s", Name);
|
||||
Indent (AIndent);
|
||||
Output (":= $%04X", Addr);
|
||||
if (Comment) {
|
||||
Indent (CIndent);
|
||||
Output ("; %s", Comment);
|
||||
}
|
||||
LineFeed ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -94,6 +94,9 @@ void LineComment (unsigned PC, unsigned Count);
|
||||
void OutputSettings (void);
|
||||
/* Output CPU and other settings */
|
||||
|
||||
void DefineConst (const char* Name, const char* Comment, unsigned Addr);
|
||||
/* Define an address constant */
|
||||
|
||||
|
||||
|
||||
/* End of output.h */
|
||||
|
Loading…
Reference in New Issue
Block a user