Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / sdas / asstm8 / stm8.h
blobd2a6255f04c33eb9104841fee599c65cf4a1bb34
1 /* ST8.h */
3 /*
4 * Copyright (C) 2010 Alan R. Baldwin
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
20 * Alan R. Baldwin
21 * 721 Berkeley St.
22 * Kent, Ohio 44240
26 /*)BUILD
27 $(PROGRAM) = ASSTM8
28 $(INCLUDE) = {
29 ASXXXX.H
30 ST8.H
32 $(FILES) = {
33 ST8MCH.C
34 ST8ADR.C
35 ST8PST.C
36 ASMAIN.C
37 ASMCRO.C
38 ASDBG.C
39 ASLEX.C
40 ASSYM.C
41 ASSUBR.C
42 ASEXPR.C
43 ASDATA.C
44 ASLIST.C
45 ASOUT.C
47 $(STACK) = 3000
51 * Registers
53 #define A 0
54 #define X 1
55 #define XL 2
56 #define XH 3
57 #define Y 4
58 #define YL 5
59 #define YH 6
61 #define SP 7
62 #define CC 8
65 * Addressing Modes
67 #define S_REG 0x00
68 #define S_SHORT 0x01
69 #define S_LONG 0x02
70 #define S_EXT 0x04
71 /* Illegal 0x03, 0x05, 0x06, 0x07 */
73 #define S_IXO 0x08
74 #define S_IXB 0x09
75 #define S_IXW 0x0A
76 #define S_IXE 0x0C
77 /* Illegal 0x0B, 0x0D, 0x0E, 0x0F */
79 #define S_IN 0x10
80 #define S_INB 0x11
81 #define S_INW 0x12
82 #define S_INE 0x14
83 /* Illegal 0x13, 0x15, 0x16, 0x17 */
85 #define S_INIX 0x18
86 #define S_INIXB 0x19
87 #define S_INIXW 0x1A
88 #define S_INIXE 0x1C
89 /* Illegal 0x1B, 0x1D, 0x1E, 0x1F */
91 #define S_IMM 0x20
92 #define S_IX 0x21
95 * Instruction types
97 #define S_JR 60
98 #define S_JRPG 61
99 #define S_JRBT 62
100 #define S_BT72 63
101 #define S_BT90 64
102 #define S_LD 65
103 #define S_LDF 66
104 #define S_LDW 67
105 #define S_MOV 68
106 #define S_AOP 69
107 #define S_BOP 70
108 #define S_WOP 71
109 #define S_ADDW 72
110 #define S_CPW 73
111 #define S_SUBW 74
112 #define S_RWA 75
113 #define S_EXG 76
114 #define S_EXGW 77
115 #define S_POP 78
116 #define S_PUSH 79
117 #define S_PW 80
118 #define S_CLJP 81
119 #define S_CLJPF 82
120 #define S_CALLR 83
121 #define S_INH 84
122 #define S_INH72 85
123 #define S_MLDV 86
124 #define S_DIVW 87
125 #define S_INT 88
128 * Extended Addressing Modes
130 #define R_BITS 0x0100 /* Bit Test Addressing Mode */
133 struct adsym
135 char a_str[4]; /* addressing string */
136 int a_val; /* addressing mode value */
139 extern struct adsym REG[];
141 extern int rcode;
143 /* machine dependent functions */
145 #ifdef OTHERSYSTEM
147 /* ST8adr.c */
148 extern int addr(struct expr *esp);
149 extern int addr1(struct expr *esp);
150 extern int addrsl(struct expr *esp);
151 extern int admode(struct adsym *sp);
152 extern int any(int c, char *str);
153 extern int srch(char *str);
155 /* ST8mch.c */
156 extern VOID machine(struct mne *mp);
157 extern int mchpcr(struct expr *esp);
158 extern VOID minit(void);
159 extern VOID opcy_aerr(void);
160 extern VOID valu_aerr(struct expr *e, int n);
161 extern int ls_mode(struct expr *e);
162 extern unsigned setbit(unsigned b);
163 extern unsigned getbit(void);
165 #else
167 /* ST8adr.c */
168 extern int addr();
169 extern int addr1();
170 extern int addrsl();
171 extern int admode();
172 extern int any();
173 extern int srch();
175 /* ST8mch.c */
176 extern VOID machine();
177 extern int mchpcr();
178 extern VOID minit();
179 extern VOID opcy_aerr();
180 extern VOID valu_aerr();
181 extern int ls_mode();
182 extern unsigned setbit();
183 extern unsigned getbit();
185 #endif