From 7a8ee75769b80c8b2a6bf7b5ba31541cfc3ca543 Mon Sep 17 00:00:00 2001 From: michaelh Date: Wed, 11 Jul 2001 03:03:26 +0000 Subject: [PATCH] Added link support in the simple case git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1054 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/z80/main.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/z80/main.c b/src/z80/main.c index 1e8cfef6..e23320df 100644 --- a/src/z80/main.c +++ b/src/z80/main.c @@ -289,12 +289,25 @@ _getRegName (struct regs *reg) */ static const char *_z80_linkCmd[] = { - "link-z80", "-nf", "$1", NULL + "link-z80", + "-n", // Don't echo output + "-c", // Command line input + "--", // Again, command line input... + "-b_CODE=0x200", // Code starts at 0x200 + "-b_DATA=0x8000", // RAM starts at 0x8000 + "-j", // Output a symbol file as well + "-k" SDCC_LIB_DIR "/z80", // Library path + "-lz80.lib", // Library to use + "-i", // Output Intel IHX + "$1.ihx", // Output to + SDCC_LIB_DIR "/z80/crt0.o", // Link in crt0 first + "$1.o", // Actual code + NULL }; static const char *_z80_asmCmd[] = { - "as-z80", "-plosgff", "$1.o", "$1.asm", NULL + "as-z80", "-plosgff", "$1.o", "$1.asm", NULL }; /** $1 is always the basename. @@ -305,12 +318,13 @@ static const char *_z80_asmCmd[] = */ static const char *_gbz80_linkCmd[] = { - "link-gbz80", "-nf", "$1", NULL + // PENDING + "link-gbz80", "-nf", "$1", NULL }; static const char *_gbz80_asmCmd[] = { - "as-gbz80", "-plosgff", "$1.o", "$1.asm", NULL + "as-gbz80", "-plosgff", "$1.o", "$1.asm", NULL }; /* Globals */ -- 2.30.2