]> git.sur5r.net Git - cc65/commitdiff
Added a new extended (and machine specific) zeropage segment named EXTZP.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 16 Feb 2003 14:32:13 +0000 (14:32 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 16 Feb 2003 14:32:13 +0000 (14:32 +0000)
Renamed GEOSZP to EXTZP.
Added a --dump-config command that dumps a builtin linker config.

git-svn-id: svn://svn.cc65.org/cc65/trunk@1987 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ld65/cfg/cbm510.cfg
src/ld65/cfg/cbm610.cfg
src/ld65/cfg/geos.cfg
src/ld65/cfg/module.cfg
src/ld65/error.c
src/ld65/main.c
src/ld65/tgtcfg.c
src/ld65/tgtcfg.h

index 777cbb66bcf0218a2887e936a4a89b8fda86dbab..f11e5cc7bd8a29860d708fe5dec83b8ae6b01e20 100644 (file)
@@ -1,5 +1,5 @@
 MEMORY {
-    ZP: start = $02, size = $1A, type = rw, define = yes;
+    ZP: start = $02, size = $8E, type = rw, define = yes;
     RAM: start = $0001, size = $DFFF, file = %O;
     CHARRAM: start = $E000, size = $1000, define = yes, file = "";
     VIDRAM: start = $F000, size = $0400, define = yes, file = "";
@@ -10,6 +10,7 @@ SEGMENTS {
     DATA: load = RAM, type = rw;
     BSS: load = RAM, type = bss, define = yes;
     ZEROPAGE: load = ZP, type = zp;
+    EXTZP: load = ZP, type = zp, define = yes;
 }
 FEATURES {
     CONDES: segment = RODATA,
index 2c58eb14d3ad267a7bda4f70ad2171bf89cca064..b8a4c23055e96c03569cdeaa152e3b118a030106 100644 (file)
@@ -1,5 +1,5 @@
 MEMORY {
-    ZP: start = $02, size = $1A, type = rw, define = yes;
+    ZP: start = $02, size = $8E, type = rw, define = yes;
     RAM: start = $0001, size = $FFF0, file = %O;
 }
 SEGMENTS {
@@ -8,6 +8,7 @@ SEGMENTS {
     DATA: load = RAM, type = rw;
     BSS: load = RAM, type = bss, define = yes;
     ZEROPAGE: load = ZP, type = zp;
+    EXTZP: load = ZP, type = zp, define = yes;
 }
 FEATURES {
     CONDES: segment = RODATA,
index 6e161c9ec10342fe8d78c7cf35a0d351461a7cd7..4eb0ef038157f1d60283cb90216f1b90df0ae33b 100644 (file)
@@ -12,7 +12,7 @@ SEGMENTS {
     DATA: load = RAM, type = rw;
     BSS: load = RAM, type = bss, define = yes;
     ZEROPAGE: load = ZP, type = zp;
-    GEOSZP: load = ZP, type = zp;
+    EXTZP: load = ZP, type = zp;
 }
 FEATURES {
     CONDES: segment = RODATA,
index 7783f995afe4d29fecd35b9d5a9c675617ae03e5..613716ff64efb0456c00ca7231861c1b34f7c197 100644 (file)
@@ -9,6 +9,7 @@ SEGMENTS {
     DATA: load = COMBINED, type = rw, define = yes;
     BSS: load = COMBINED, type = bss, define = yes;
     ZEROPAGE: load = ZP, type = zp;
+    EXTZP: load = ZP, type = zp;
 }
 FILES {
     %O: format = o65;
index fa049488b0063b80fae1267c38926e10b9daf0d1..807a48cae30558d1018964647181632223f17e09 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+                
+/* common */
+#include "cmdline.h"
 
+/* ld65 */
 #include "error.h"
 
 
@@ -52,7 +56,7 @@ void Warning (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Warning: ");
+    fprintf (stderr, "%s: Warning: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -65,7 +69,7 @@ void Error (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Error: ");
+    fprintf (stderr, "%s: Error: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -79,7 +83,7 @@ void Internal (const char* Format, ...)
 {
     va_list ap;
     va_start (ap, Format);
-    fprintf (stderr, "Internal error: ");
+    fprintf (stderr, "%s: Internal error: ", ProgName);
     vfprintf (stderr, Format, ap);
     putc ('\n', stderr);
     va_end (ap);
@@ -87,4 +91,4 @@ void Internal (const char* Format, ...)
 }
 
 
-
+                                                     
index 76a2e9f7ea31a946aaf7d275afd1f8b299b81921..489ac5cb9fd458d625f1c55116f35c75775f9ecb 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                          */
 /*                                                                          */
 /*                                                                          */
-/* (C) 1998-2002 Ullrich von Bassewitz                                      */
-/*              Wacholderweg 14                                             */
-/*              D-70597 Stuttgart                                           */
-/* EMail:       uz@musoftware.de                                            */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                          */
 /*                                                                          */
 /* This software is provided 'as-is', without any expressed or implied      */
@@ -103,6 +103,7 @@ static void Usage (void)
             "\n"
             "Long options:\n"
                     "  --config name\t\tUse linker config file\n"
+             "  --dump-config name\tDump a builtin configuration\n"
             "  --help\t\tHelp (this text)\n"
             "  --mapfile name\tCreate a map file\n"
              "  --module-id id\tSpecify a module id\n"
@@ -236,6 +237,21 @@ static void OptDbgFile (const char* Opt attribute ((unused)), const char* Arg)
 
 
 
+static void OptDumpConfig (const char* Opt attribute ((unused)), const char* Arg)
+/* Dump a builtin linker configuration */
+{
+    /* Map the given target name to its id */
+    target_t T = FindTarget (Arg);
+    if (T == TGT_UNKNOWN) {
+        Error ("Target system `%s' is unknown", Arg);
+    }
+
+    /* Dump the builtin configuration */
+    DumpBuiltinConfig (stdout, T);
+}
+
+
+
 static void OptHelp (const char* Opt attribute ((unused)),
                     const char* Arg attribute ((unused)))
 /* Print usage information and exit */
@@ -314,6 +330,7 @@ int main (int argc, char* argv [])
     static const LongOpt OptTab[] = {
                { "--config",           1,      OptConfig               },
        { "--dbgfile",          1,      OptDbgFile              },
+               { "--dump-config",      1,      OptDumpConfig           },
        { "--help",             0,      OptHelp                 },
        { "--mapfile",          1,      OptMapFile              },
                { "--module-id",        1,      OptModuleId             },
index aac9005c525d6d61bcd428349bf4eb65c71c7416..219ce9302a035d55f6803cef9bb1186b08f70253 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2002 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+/* common */
+#include "check.h"
+
+/* ld65 */
 #include "binfmt.h"
 #include "tgtcfg.h"
 
@@ -96,4 +100,21 @@ const TargetDesc Targets [TGT_COUNT] = {
 
 
 
-                  
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+void DumpBuiltinConfig (FILE* F, target_t T)
+/* Dump a builtin linker configuration */
+{
+    /* Check the given parameter */
+    PRECONDITION (T > TGT_UNKNOWN && T < TGT_COUNT);
+
+    /* Dump the config */
+    fprintf (F, "%s\n", Targets[T].Cfg);
+}
+
+
+
index d60711c73935610e7129792c8c0b71f1f2e28588..c37e2f3134f08530be3e73ac397c26d3558c8be2 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -38,6 +38,8 @@
 
 
 
+#include <stdio.h>
+
 /* common */
 #include "target.h"
 
@@ -61,8 +63,18 @@ extern const TargetDesc Targets [TGT_COUNT];
 
 
 
-/* End of tgtcfg.h */
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
 
+
+void DumpBuiltinConfig (FILE* F, target_t T);
+/* Dump a builtin linker configuration */
+
+
+
+/* End of tgtcfg.h */
 #endif