* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / as / mcs51 / asm.h
index 3d4cd97ec95498b8b3b95098a1a826b20c936c99..681a81dd93baf24e528c020be3ba40c9dd773284 100644 (file)
@@ -1,13 +1,22 @@
-/* asm.h */
+/* asm.h
+
+   Copyright (C) 1989-1995 Alan R. Baldwin
+   721 Berkeley St., Kent, Ohio 44240
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 /*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio  44240
- *
  * 28-Oct-97 JLH:
  *           - add proto for StoreString
  *           - change s_id from [NCPS] to pointer
 #endif
 #endif
 
+#ifdef _WIN32       /* WIN32 native */
+
+#  define NATIVE_WIN32          1
+#  ifdef __MINGW32__  /* GCC MINGW32 depends on configure */
+#    include "../../sdccconf.h"
+#  else
+#    include "../../sdcc_vc.h"
+#    define PATH_MAX  _MAX_PATH
+#  endif
+
+#else               /* Assume Un*x style system */
+#  include "../../sdccconf.h"
+#endif
+
 /*
  * Assembler definitions.
  */
@@ -145,6 +168,7 @@ struct  area
         struct  area *a_ap;             /* Area link */
         char    a_id[NCPS];             /* Area Name */
         int     a_ref;                  /* Ref. number */
+        Addr_T  a_addr;                 /* Area address */
         Addr_T  a_size;                 /* Area size */
         Addr_T  a_fuzz;                 /* Area fuzz */
         int     a_flag;                 /* Area flags */
@@ -296,6 +320,7 @@ struct  sym
         struct  area *s_area;           /* Area line, 0 if absolute */
         int     s_ref;                  /* Ref. number */
         Addr_T  s_addr;                 /* Address */
+        Addr_T  s_org;                  /* Start Address if absolute */
 };
 
 #define S_GBL           01              /* Global */
@@ -335,7 +360,6 @@ struct  sym
 #define S_FLAT24        27              /* .flat24 */
 #define S_OPTSDCC       28              /* .optsdcc */
 
-
 /*
  *      The tsym structure is a linked list of temporary
  *      symbols defined in the assembler source files following
@@ -416,6 +440,8 @@ extern  int     lop;                    /*      current line number on page
                                          */
 extern  int     pass;                   /*      assembler pass number
                                          */
+extern  int     org_cnt;                /*      .org directive counter
+                                         */
 extern  int     lflag;                  /*      -l, generate listing flag
                                          */
 extern  int     cflag;                  /*      -c, generate sdcdb debug information
@@ -464,10 +490,10 @@ extern  char    *ep;                    /*      pointer into error list
                                          */
 extern  char    eb[NERR];               /*      array of generated error codes
                                          */
-extern  char    *ip;                    /*      pointer into the assembler-source
+extern  const char *ip;                 /*      pointer into the assembler-source
                                          *      text line in ib[]
                                          */
-extern  char    ib[NINPUT];             /*      assembler-source text line
+extern  const char *ib;                 /*      assembler-source text line
                                          */
 extern  char    *cp;                    /*      pointer to assembler output
                                          *      array cb[]
@@ -485,7 +511,7 @@ extern  char    tb[NTITL];              /*      Title string buffer
 extern  char    stb[NSBTL];             /*      Subtitle string buffer
                                          */
 extern  char    optsdcc[NINPUT];        /*      sdcc compile options
-                                        */
+                                         */
 extern  int     flat24Mode;             /*      non-zero if we are using DS390 24 bit
                                          *      flat mode (via .flat24 directive).
                                          */
@@ -506,8 +532,8 @@ extern  FILE    *sfp[MAXFIL];           /*      array of assembler-source file h
 extern  FILE    *ifp[MAXINC];           /*      array of include-file file handles
                                          */
 extern  unsigned char   ctype[128];     /*      array of character types, one per
-                                              ASCII character
-                                        */
+                                         *      ASCII character
+                                         */
 
 extern  char    ccase[128];             /* an array of characters which
                                          * perform the case translation function
@@ -607,6 +633,7 @@ extern  struct  mne *   mlookup();
 extern  int             hash();
 extern  struct  sym *   lookup();
 extern  VOID *          new();
+extern  char *          strsto(char *str);
 extern  int             symeq();
 extern  VOID            syminit();
 extern  VOID            symglob();
@@ -664,9 +691,6 @@ extern  VOID            out_t24(int);
 extern  VOID            outr11();       /* JLH */
 extern  VOID            outr19(struct expr *, int, int);
 
-/* asstore.c */
-extern char *StoreString( char *str );
-
 /* asnoice.c */
 extern void DefineNoICE_Line();
 extern void DefineCDB_Line();
@@ -681,4 +705,8 @@ extern  struct  mne     mne[];
 /* Machine dependent functions */
 
 extern  VOID            minit();
-extern VOID machine(struct mne *);
+extern  VOID            machine(struct mne *);
+
+/* strcmpi.c */
+extern  int as_strcmpi(const char *s1, const char *s2);
+extern  int as_strncmpi(const char *s1, const char *s2, size_t n);