From: uz Date: Wed, 29 Dec 2010 10:18:29 +0000 (+0000) Subject: In the generated assembly file, add import statements for all zero page X-Git-Tag: V2.13.3~565 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4a92522c82cc943df7e865abf2624c121ef00616;p=cc65 In the generated assembly file, add import statements for all zero page variables known by the runtime. They aren't currently accessed by the compiler itself but may be useful for inline assembly. git-svn-id: svn://svn.cc65.org/cc65/trunk@4891 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 577623aa6..de3b55848 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 1998-2009, Ullrich von Bassewitz */ +/* (C) 1998-2010, Ullrich von Bassewitz */ /* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ @@ -177,8 +177,9 @@ void g_preamble (void) /* Tell the assembler if we want to generate debug info */ AddTextLine ("\t.debuginfo\t%s", (DebugInfo != 0)? "on" : "off"); - /* Import the stack pointer for direct auto variable access */ - AddTextLine ("\t.importzp\tsp, sreg, regsave, regbank, tmp1, ptr1, ptr2"); + /* Import zero page variables */ + AddTextLine ("\t.importzp\tsp, sreg, regsave, regbank"); + AddTextLine ("\t.importzp\ttmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4"); /* Define long branch macros */ AddTextLine ("\t.macpack\tlongbranch");