diff options
Diffstat (limited to 'int2tap.c')
-rw-r--r-- | int2tap.c | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -52,7 +52,7 @@ const char *progname; */ static void Usage(void) { - fprintf(stderr,"%s: usage %s [ -b ] [ -s ] [ -a address ] " + fprintf(stderr,"%s: usage %s [-b] [-s] [-a addr] [-c addr] " "output-file input-file ... \n",progname,progname); exit(EXIT_FAILURE); } @@ -66,9 +66,11 @@ int main(int argc, char *argv[]) IntelInfo *info; char *outname; unsigned exec_addr; + unsigned clear_addr; + int addr_defined; + int clear_defined; int bin_only; int split; - int addr_defined; int base; int no; int f; @@ -88,6 +90,7 @@ int main(int argc, char *argv[]) /* Set defaults and parse args */ addr_defined=FALSE; + clear_defined=FALSE; bin_only=FALSE; split=FALSE; @@ -120,11 +123,21 @@ int main(int argc, char *argv[]) } addr_defined=TRUE; - exec_addr=(unsigned)strtoul(argv[++f],NULL,0); break; + case 'c': + if (f>argc-2) + { + Usage(); + } + + clear_defined=TRUE; + clear_addr=(unsigned)strtoul(argv[++f],NULL,0); + + break; + default: Usage(); break; @@ -184,6 +197,11 @@ int main(int argc, char *argv[]) { BasicInit(); + if (clear_defined) + { + BasicClearLine(clear_addr); + } + BasicLoadLine(); if (split) |