1 static const ASM_MAPPING _asxxxx_gb_mapping[] = {
2 { "functionlabeldef", "%s:" },
5 { "ldahli", "ld a,(hl+)" },
6 { "ldahlsp", "lda hl,%d(sp)" },
7 { "ldaspsp", "lda sp,%d(sp)" },
10 { "enter", "push bc" },
29 { "adjustsp", "lda sp,-%d(sp)" },
33 static const ASM_MAPPING _asxxxx_z80_mapping[] = {
36 { "ldahli", "ld a,(hl+)" },
37 { "ldahlsp", "lda hl,%d(sp)" },
38 { "ldaspsp", "lda sp,%d(sp)" },
41 { "enter", "push bc" },
60 { "adjustsp", "lda sp,-%d(sp)" },
64 static const ASM_MAPPING _rgbds_mapping[] = {
65 { "global", "GLOBAL %s" },
66 { "labeldef", "%s:" },
67 { "tlabeldef", ".l%05d:" },
68 { "tlabel", ".l%05d" },
70 "; Generated using the rgbds tokens.\n"
71 "\t; We have to define these here as sdcc dosnt make them global by default\n"
72 "\tGLOBAL __mulschar\n"
73 "\tGLOBAL __muluchar\n"
74 "\tGLOBAL __mulsint\n"
75 "\tGLOBAL __muluint\n"
76 "\tGLOBAL __divschar\n"
77 "\tGLOBAL __divuchar\n"
78 "\tGLOBAL __divsint\n"
79 "\tGLOBAL __divuint\n"
80 "\tGLOBAL __modschar\n"
81 "\tGLOBAL __moduchar\n"
82 "\tGLOBAL __modsint\n"
86 "; ---------------------------------\n"
88 "; ---------------------------------"
90 { "functionlabeldef", "%s:" },
93 { "area", "SECTION \"%s\",CODE" },
94 { "areacode", "SECTION \"CODE\",CODE" },
95 { "areadata", "SECTION \"DATA\",BSS" },
96 { "ascii", "DB \"%s\"" },
103 { "constbyte", "$%02X" },
104 { "constword", "$%04X" },
105 { "immedword", "$%04X" },
106 { "immedbyte", "$%02X" },
107 { "hashedstr", "%s" },
108 { "lsbimmeds", "%s & $FF" },
109 { "msbimmeds", "%s >> 8" },
110 { "module", "; MODULE %s" },
114 static const ASM_MAPPING _rgbds_gb_mapping[] = {
122 { "adjustsp", "add sp,-%d" },
123 { "enter", "push bc" },
137 { "ldahli", "ld a,[hl+]" },
139 { "ldahlsp", "ld hl,[sp+%d]" },
140 { "ldaspsp", "add sp,%d" },
146 static const ASM_MAPPING _isas_mapping[] = {
147 { "global", "GLOBAL %s" },
148 { "labeldef", "%s:" },
149 { "tlabeldef", "?l%05d:" },
150 { "tlabel", "?l%05d" },
152 ";Generated using the isas tokens.\n"
153 "\tLPREFIX '?' ; Treat labels starting with ? as local.\n"
154 "\tONCNUM ; Numbers are hex\n"
155 "\tCAPSOFF ; Case sensitive\n"
156 "\tISDMG ; Gameboy mode\n"
158 "\t; We have to define these here as sdcc dosnt make them global by default\n"
159 "\tGLOBAL __mulschar\n"
160 "\tGLOBAL __muluchar\n"
161 "\tGLOBAL __mulsint\n"
162 "\tGLOBAL __muluint\n"
163 "\tGLOBAL __divschar\n"
164 "\tGLOBAL __divuchar\n"
165 "\tGLOBAL __divsint\n"
166 "\tGLOBAL __divuint\n"
167 "\tGLOBAL __modschar\n"
168 "\tGLOBAL __moduchar\n"
169 "\tGLOBAL __modsint\n"
173 "; ---------------------------------\n"
175 "; ---------------------------------"
177 { "functionlabeldef", "%s:" },
180 { "area", "%s\tGROUP" },
181 { "areacode", "_CODE\tGROUP" },
182 { "areadata", "_DATA\tGROUP" },
183 { "ascii", "DB \"%s\"" },
190 { "constbyte", "0x%02X" },
191 { "constword", "0x%04X" },
192 { "immedword", "0x%04X" },
193 { "immedbyte", "0x%02X" },
194 { "hashedstr", "%s" },
195 { "lsbimmeds", "%s & 0xFF" },
196 { "msbimmeds", "%s >> 8" },
197 { "module", "; MODULE %s" },
201 static const ASM_MAPPING _isas_gb_mapping[] = {
209 { "adjustsp", "add sp,-%d" },
210 { "enter", "push bc" },
224 { "ldahli", "ld a,(hli)" },
226 { "ldahlsp", "ldhl sp,%d" },
227 { "ldaspsp", "add sp,%d" },
233 static const ASM_MAPPINGS _isas = {
238 const ASM_MAPPINGS _isas_gb = {
243 static const ASM_MAPPINGS _rgbds = {
248 const ASM_MAPPINGS _rgbds_gb = {
253 const ASM_MAPPINGS _asxxxx_gb = {
258 const ASM_MAPPINGS _asxxxx_z80 = {