]> git.sur5r.net Git - cc65/commitdiff
In the generated assembly file, add import statements for all zero page
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 29 Dec 2010 10:18:29 +0000 (10:18 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 29 Dec 2010 10:18:29 +0000 (10:18 +0000)
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

src/cc65/codegen.c

index 577623aa6d941a7cb2d00f6ba234a33841c871f8..de3b5584842fb30f3c65b64b092fb91ec2dffa70 100644 (file)
@@ -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");