summaryrefslogtreecommitdiff
path: root/int2tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'int2tap.c')
-rw-r--r--int2tap.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/int2tap.c b/int2tap.c
index 2c3eae9..ccfce7f 100644
--- a/int2tap.c
+++ b/int2tap.c
@@ -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)