]> git.sur5r.net Git - cc65/commitdiff
New DefAddrSize variable
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 23 Nov 2003 21:38:54 +0000 (21:38 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 23 Nov 2003 21:38:54 +0000 (21:38 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2679 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/global.c
src/ca65/global.h
src/ca65/symentry.c

index 051845ac53f0b9fbce48cd7895a555bd252d0c8b..cc0dc79f3cf06131f7cf0027eb54c7d3d12528e1 100644 (file)
@@ -7,7 +7,7 @@
 /*                                                                           */
 /*                                                                           */
 /* (C) 1998-2003 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
+/*               Römerstraße 52                                              */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 
 
 
-#include "global.h"
+/* common */
+#include "addrsize.h"
+
+/* ca65 */
+#include "global.h"                                     
 
 
 
@@ -60,7 +64,8 @@ unsigned char SmartMode                = 0;   /* Smart mode */
 unsigned char DbgSyms           = 0;   /* Add debug symbols */
 unsigned char Listing                   = 0;   /* Create listing file */
 unsigned char LineCont          = 0;   /* Allow line continuation */
-
+unsigned char DefAddrSize        = ADDR_SIZE_ABS;       /* Default address size */
+                                    
 /* Emulation features */
 unsigned char DollarIsPC         = 0;   /* Allow the $ symbol as current PC */
 unsigned char NoColonLabels      = 0;   /* Allow labels without a colon */
index 24a41c03b711fca3f1fe149a46f7a638e55779e9..69633c6355a66be27a0781079063757177fbcc79 100644 (file)
@@ -7,7 +7,7 @@
 /*                                                                           */
 /*                                                                           */
 /* (C) 1998-2003 Ullrich von Bassewitz                                       */
-/*               Römerstrasse 52                                             */
+/*               Römerstraße 52                                              */
 /*               D-70794 Filderstadt                                         */
 /* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
@@ -61,6 +61,7 @@ extern unsigned char          SmartMode;          /* Smart mode */
 extern unsigned char           DbgSyms;            /* Add debug symbols */
 extern unsigned char           Listing;            /* Create listing file */
 extern unsigned char           LineCont;           /* Allow line continuation */
+extern unsigned char    DefAddrSize;        /* Default address size */
 
 /* Emulation features */
 extern unsigned char           DollarIsPC;         /* Allow the $ symbol as current PC */
index 6d3dbc30c0d270a17bf768c58d35b2abc4136dc6..bc230097154908fdd1a7176f690e747618999f0e 100644 (file)
@@ -271,9 +271,9 @@ void SymImport (SymEntry* S, unsigned char AddrSize, unsigned Flags)
        return;
     }
 
-    /* Map a default address size to a real value */
+    /* If no address size is given, use the default address size */
     if (AddrSize == ADDR_SIZE_DEFAULT) {
-        AddrSize = SymAddrSize (S);
+        AddrSize = DefAddrSize;
     }
 
     /* If the symbol is marked as import or global, check the symbol flags,