1 /*-------------------------------------------------------------------------
2 SDCCasm.h - header file for all types of stuff to support different assemblers.
4 Written By - Michael Hope <michaelh@juju.net.nz> 2000
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 In other words, you are welcome to use, share and improve this program.
21 You are forbidden to forbid anyone else to use, share and improve
22 what you give them. Help stamp out software-hoarding!
23 -------------------------------------------------------------------------*/
25 #ifndef ASM_PORT_INCLUDE
26 #define ASM_PORT_INCLUDE
30 void tfprintf (FILE * fp, const char *szFormat, ...);
31 void tsprintf (char *buffer, size_t len, const char *szFormat, ...);
32 void dbuf_tprintf (struct dbuf_s *dbuf, const char *szFormat, ...);
33 void dbuf_tvprintf (struct dbuf_s *dbuf, const char *szFormat, va_list ap);
42 typedef struct _ASM_MAPPINGS ASM_MAPPINGS;
44 /* PENDING: could include the peephole rules here as well.
48 const ASM_MAPPINGS *pParent;
49 const ASM_MAPPING *pMappings;
52 /* The default asxxxx token mapping.
54 extern const ASM_MAPPINGS asm_asxxxx_mapping;
55 extern const ASM_MAPPINGS asm_gas_mapping;
56 extern const ASM_MAPPINGS asm_a390_mapping;
57 extern const ASM_MAPPINGS asm_xa_asm_mapping;
59 /** Last entry has szKey = NULL.
61 void asm_addTree (const ASM_MAPPINGS *pMappings);
63 char *FileBaseName (char *fileFullName);
65 const char *printILine (iCode *ic);
66 const char *printCLine (const char *srcFile, int lineno);