/* */
/* */
/* */
-/* (C) 1998-2003 Ullrich von Bassewitz */
+/* (C) 1998-2004 Ullrich von Bassewitz */
/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
" --ignore-case\t\tIgnore case of symbols\n"
" --include-dir dir\tSet an include directory search path\n"
" --listing\t\tCreate a listing if assembly was ok\n"
+ " --list-bytes n\tMaximum number of bytes per listing line\n"
" --memory-model model\tSet the memory model\n"
" --pagelength n\tSet the page length for the listing\n"
" --smart\t\tEnable smart mode\n"
static void OptAutoImport (const char* Opt attribute ((unused)),
- const char* Arg attribute ((unused)))
+ const char* Arg attribute ((unused)))
/* Mark unresolved symbols as imported */
{
AutoImport = 1;
+static void OptListBytes (const char* Opt, const char* Arg)
+/* Set the maximum number of bytes per listing line */
+{
+ unsigned Num;
+ char Check;
+
+ /* Convert the argument to a number */
+ if (sscanf (Arg, "%u%c", &Num, &Check) != 1) {
+ AbEnd ("Invalid argument for option `%s'", Opt);
+ }
+
+ /* Check the bounds */
+ if (Num != 0 && (Num < MIN_LIST_BYTES || Num > MAX_LIST_BYTES)) {
+ AbEnd ("Argument for option `%s' is out of range", Opt);
+ }
+
+ /* Use the value */
+ SetListBytes (Num);
+}
+
+
+
static void OptListing (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Create a listing file */
{ "--help", 0, OptHelp },
{ "--ignore-case", 0, OptIgnoreCase },
{ "--include-dir", 1, OptIncludeDir },
+ { "--list-bytes", 1, OptListBytes },
{ "--listing", 0, OptListing },
{ "--memory-model", 1, OptMemoryModel },
{ "--pagelength", 1, OptPageLength },
" --lib-path path\tSpecify a library search path\n"
" --list-targets\tList all available targets\n"
" --listing\t\tCreate an assembler listing\n"
+ " --list-bytes n\tNumber of bytes per assembler listing line\n"
" --mapfile name\tCreate a map file\n"
" --memory-model model\tSet the memory model\n"
" --module\t\tLink as a module\n"
+static void OptListBytes (const char* Opt attribute ((unused)), const char* Arg)
+/* Set the maximum number of bytes per asm listing line */
+{
+ CmdAddArg2 (&CA65, "--list-bytes", Arg);
+}
+
+
+
static void OptListing (const char* Opt attribute ((unused)),
const char* Arg attribute ((unused)))
/* Create an assembler listing */
{ "--lib-path", 1, OptLibPath },
{ "--list-targets", 0, OptListTargets },
{ "--listing", 0, OptListing },
+ { "--list-bytes", 1, OptListBytes },
{ "--mapfile", 1, OptMapFile },
{ "--memory-model", 1, OptMemoryModel },
{ "--module", 0, OptModule },