/* */
/* */
/* */
-/* (C) 2000-2003 Ullrich von Bassewitz */
+/* (C) 2000-2005 Ullrich von Bassewitz */
/* Römerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
-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 */
{
Addr = 0;
while (Addr < CodeStart) {
if (MustDefLabel (Addr)) {
- DefineConst (Addr);
+ DefineConst (SymTab[Addr]->Name, SymTab[Addr]->Comment, Addr);
}
++Addr;
}
/* 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;
}
/* High range */
while (Addr < 0x10000) {
if (MustDefLabel (Addr)) {
- DefineConst (Addr);
+ DefineConst (SymTab[Addr]->Name, SymTab[Addr]->Comment, Addr);
}
++Addr;
}
/* */
/* */
/* */
-/* (C) 2000-2004 Ullrich von Bassewitz */
+/* (C) 2000-2005 Ullrich von Bassewitz */
/* Römerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* */
-/* (C) 2000-2003 Ullrich von Bassewitz */
+/* (C) 2000-2005 Ullrich von Bassewitz */
/* Römerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* Print a page header */
{
fprintf (F,
- "; da65 V%u.%u.%u - (C) Copyright 2000-2003 Ullrich von Bassewitz\n"
- "; Input file: %s\n"
- "; Page: %u\n\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,
- InFile,
- Page);
+ InFile,
+ Page);
}
Output ("; %04X", PC);
if (Comments >= 3) {
for (I = 0; I < Count; ++I) {
- Output (" %02X", CodeBuf [PC+I]);
+ Output (" %02X", CodeBuf [PC+I]);
}
if (Comments >= 4) {
- Indent (TIndent);
- for (I = 0; I < Count; ++I) {
- unsigned char C = CodeBuf [PC+I];
- if (!isprint (C)) {
- C = '.';
- }
- Output ("%c", C);
- }
+ Indent (TIndent);
+ for (I = 0; I < Count; ++I) {
+ unsigned char C = CodeBuf [PC+I];
+ if (!isprint (C)) {
+ C = '.';
+ }
+ Output ("%c", C);
+ }
}
}
}
+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 ();
+ }
+}
+
+
+
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 */