Use 'ao-dbg' instead of 's51' to communicate with TeleMetrum
[fw/sdcc] / src / SDCCasm.h
1 /*-------------------------------------------------------------------------
2   SDCCasm.h - header file for all types of stuff to support different assemblers.
3
4   Written By - Michael Hope <michaelh@juju.net.nz> 2000
5
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
9   later version.
10
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.
15
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.
19
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 -------------------------------------------------------------------------*/
24
25 #ifndef ASM_PORT_INCLUDE
26 #define ASM_PORT_INCLUDE
27
28 #include "dbuf.h"
29
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);
34
35 typedef struct
36   {
37     const char *szKey;
38     const char *szValue;
39   }
40 ASM_MAPPING;
41
42 typedef struct _ASM_MAPPINGS ASM_MAPPINGS;
43
44 /* PENDING: could include the peephole rules here as well.
45  */
46 struct _ASM_MAPPINGS
47   {
48     const ASM_MAPPINGS *pParent;
49     const ASM_MAPPING *pMappings;
50   };
51
52 /* The default asxxxx token mapping.
53  */
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;
58
59 /** Last entry has szKey = NULL.
60  */
61 void asm_addTree (const ASM_MAPPINGS *pMappings);
62
63 char *FileBaseName (char *fileFullName);
64
65 const char *printILine (iCode *ic);
66 const char *printCLine (const char *srcFile, int lineno);
67 #endif