-/* 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.
*/
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 */
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 */
#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
*/
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
*/
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[]
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).
*/
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
extern int hash();
extern struct sym * lookup();
extern VOID * new();
+extern char * strsto(char *str);
extern int symeq();
extern VOID syminit();
extern VOID symglob();
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();
/* 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);