diff options
author | Ian C <ianc@noddybox.co.uk> | 2004-08-22 22:51:39 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2004-08-22 22:51:39 +0000 |
commit | 6cee147b6b1f583a03844978c706a9a75749eef5 (patch) | |
tree | 42c9c308083fc54199698c71ebf2fb48f2761685 /int2tap.c | |
parent | 5b510f1aeab809f8265004ed6e64cd353f6005cc (diff) |
Added -c switch
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) |