From 09c566e6916d431606284a527ce373c103be39dc Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 22 Aug 2004 01:06:09 +0000 Subject: Initial working version --- int2tap.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) (limited to 'int2tap.c') diff --git a/int2tap.c b/int2tap.c index b2fba26..2c3eae9 100644 --- a/int2tap.c +++ b/int2tap.c @@ -34,6 +34,7 @@ static const char id[]="$Id$"; #include "intel.h" #include "tap.h" +#include "basic.h" /* ---------------------------------------- GLOBALS @@ -53,6 +54,7 @@ static void Usage(void) { fprintf(stderr,"%s: usage %s [ -b ] [ -s ] [ -a address ] " "output-file input-file ... \n",progname,progname); + exit(EXIT_FAILURE); } @@ -158,9 +160,15 @@ int main(int argc, char *argv[]) printf("Memory altered from 0x%4.4x for 0x%4.4x bytes, base 0x%4.4x\n", info[f].low,info[f].len,info[f].addr); + + if (!addr_defined) + { + exec_addr=info[f].addr; + addr_defined=TRUE; + } } - /* TODO: Properly - just a quick test + /* Create the tape */ printf("Creating %s\n",outname); @@ -170,7 +178,56 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - TapWrite(mem,info[0].low,info[0].len,TRUE); + /* Create the basic loader + */ + if (!bin_only) + { + BasicInit(); + + BasicLoadLine(); + + if (split) + { + for(f=1;fhigh) + { + high=info[f].high; + } + } + + TapBinary(mem,low,high-low+1); + } TapClose(); -- cgit v1.2.3