From 56df2ea164f3decffdfa30a06514efa19c46c678 Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 2 Sep 2000 12:05:10 +0000 Subject: [PATCH] Added -l and --listing options. git-svn-id: svn://svn.cc65.org/cc65/trunk@317 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cl65/main.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/cl65/main.c b/src/cl65/main.c index 69ab91224..929bb8d17 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -549,6 +549,7 @@ static void Usage (void) " -d\t\t\tDebug mode\n" " -g\t\t\tAdd debug info\n" " -h\t\t\tHelp (this text)\n" + " -l\t\t\tCreate a listing if assembly was ok\n" " -m name\t\tCreate a map file\n" " -o name\t\tName the output file\n" " -t sys\t\tSet the target system\n" @@ -563,6 +564,7 @@ static void Usage (void) " --feature name\tSet an emulation feature\n" " --help\t\tHelp (this text)\n" " --include-dir dir\tSet a compiler include directory path\n" + " --listing\t\tCreate a listing if assembly was ok\n" " --mapfile name\tCreate a map file\n" " --start-addr addr\tSet the default start address\n" " --target sys\t\tSet the target system\n" @@ -634,6 +636,14 @@ static void OptIncludeDir (const char* Opt, const char* Arg) +static void OptListing (const char* Opt, const char* Arg) +/* Create an assembler listing */ +{ + CmdAddArg (&CA65, "-l"); +} + + + static void OptMapFile (const char* Opt, const char* Arg) /* Create a map file */ { @@ -693,14 +703,15 @@ int main (int argc, char* argv []) { "--asm-include-dir", 1, OptAsmIncludeDir }, { "--debug", 0, OptDebug }, { "--debug-info", 0, OptDebugInfo }, - { "--feature", 1, OptFeature }, - { "--help", 0, OptHelp }, + { "--feature", 1, OptFeature }, + { "--help", 0, OptHelp }, { "--include-dir", 1, OptIncludeDir }, - { "--mapfile", 1, OptMapFile }, - { "--start-addr", 1, OptStartAddr }, - { "--target", 1, OptTarget }, - { "--verbose", 0, OptVerbose }, - { "--version", 0, OptVersion }, + { "--listing", 0, OptListing }, + { "--mapfile", 1, OptMapFile }, + { "--start-addr", 1, OptStartAddr }, + { "--target", 1, OptTarget }, + { "--verbose", 0, OptVerbose }, + { "--version", 0, OptVersion }, }; int I; @@ -817,6 +828,11 @@ int main (int argc, char* argv []) OptHelp (Arg, 0); break; + case 'l': + /* Create an assembler listing */ + OptListing (Arg, 0); + break; + case 'm': /* Create a map file (linker) */ OptMapFile (Arg, GetArg (&I, 2)); -- 2.39.5