From b7be6f26f3fc4d263122543acc555c2ad62c24af Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Wed, 20 Nov 2019 01:37:28 -0500 Subject: [PATCH] Added command line option -d to c02 compiler --- src/c02.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/c02.c b/src/c02.c index d9c6414..80e7c4c 100644 --- a/src/c02.c +++ b/src/c02.c @@ -144,7 +144,11 @@ int popt(int arg, int argc, char *argv[]) { } DEBUG("Processing Command Line Option -%c\n", argstr[1]) switch (opt) { - case 'C': + case 'D': + debug = TRUE; + DEBUG("Debug output enable\n", 0) + break; + case 'C': strcpy(cputyp, optarg); DEBUG("CPU Type set to '%s'\n", cputyp) break; @@ -196,7 +200,7 @@ void chkcpu(void) { int main(int argc, char *argv[]) { - debug = TRUE; //Output Debug Info + debug = FALSE; //Do Not Output Debug Info by Default gencmt = TRUE; //Generate Assembly Language Comments printf("C02 Compiler (C) 2012 Curtis F Kaylor\n" );