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 = "";
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,
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 {
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,
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,
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;
/* */
/* */
/* */
-/* (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"
{
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);
{
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);
{
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);
}
-
+
/* */
/* */
/* */
-/* (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 */
"\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"
+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 */
static const LongOpt OptTab[] = {
{ "--config", 1, OptConfig },
{ "--dbgfile", 1, OptDbgFile },
+ { "--dump-config", 1, OptDumpConfig },
{ "--help", 0, OptHelp },
{ "--mapfile", 1, OptMapFile },
{ "--module-id", 1, OptModuleId },
/* */
/* */
/* */
-/* (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"
-
+/*****************************************************************************/
+/* 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);
+}
+
+
+
/* */
/* */
/* */
-/* (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>
+
/* common */
#include "target.h"
-/* End of tgtcfg.h */
+/*****************************************************************************/
+/* Code */
+/*****************************************************************************/
+
+
+void DumpBuiltinConfig (FILE* F, target_t T);
+/* Dump a builtin linker configuration */
+
+
+
+/* End of tgtcfg.h */
#endif