+static const ASM_MAPPING _z80asm_mapping[] = {
+ { "global", "XDEF %s" },
+ { "extern", "XREF %s" },
+ { "slabeldef", "\n.%s" },
+ { "labeldef", "\n.%s" },
+ { "tlabeldef", "\n.l%N%05d" },
+ { "tlabel", "l%N%05d" },
+ { "fileprelude",
+ "; Generated using the z80asm/z88 tokens.\n"
+ "\tXREF __muluchar_rrx_s\n"
+ "\tXREF __mulschar_rrx_s\n"
+ "\tXREF __mulint_rrx_s\n"
+ "\tXREF __mullong_rrx_s\n"
+ "\tXREF __divuchar_rrx_s\n"
+ "\tXREF __divschar_rrx_s\n"
+ "\tXREF __divsint_rrx_s\n"
+ "\tXREF __divuint_rrx_s\n"
+ "\tXREF __divulong_rrx_s\n"
+ "\tXREF __divslong_rrx_s\n"
+ "\tXREF __rrulong_rrx_s\n"
+ "\tXREF __rrslong_rrx_s\n"
+ "\tXREF __rlulong_rrx_s\n"
+ "\tXREF __rlslong_rrx_s\n"
+ },
+ { "functionheader",
+ "; ---------------------------------\n"
+ "; Function %s\n"
+ "; ---------------------------------"
+ },
+ { "functionlabeldef", ".%s" },
+ { "zero", "$00" },
+ { "one", "$01" },
+ { "ascii", "DEFM \"%s\"" },
+ { "ds", "DEFS %d" },
+ { "db", "DEFB" },
+ { "dbs", "DEFB %s" },
+ { "dw", "DEFW" },
+ { "dws", "DEFB %s" },
+ { "immed", "" },
+ { "constbyte", "$%02X" },
+ { "constword", "$%04X" },
+ { "immedword", "$%04X" },
+ { "immedbyte", "$%02X" },
+ { "hashedstr", "%s" },
+ { "lsbimmeds", "%s & $FF" },
+ { "msbimmeds", "%s / 256" },
+
+ { "bankimmeds", "BANK(%s)" },
+ { "module", "MODULE %s" },
+ { "area", "; Area %s" },
+ { "areadata", "; Aread BSS" },
+ { "areacode", "; Area CODE" },
+ { "areahome", "; Area HOME" },
+ { NULL, NULL }
+};
+
+static const ASM_MAPPING _z80asm_z80_mapping[] = {
+ { "*ixx", "(ix%+d)" },
+ { "*iyx", "(iy%+d)" },
+ { "*hl", "(hl)" },
+ { "di", "di" },
+ { "ei", "ei" },
+ { "ldahli",
+ "ld a,(hl)\n"
+ "\tinc\thl" },
+ { "ldahlsp",
+ "ld hl,%d\n"
+ "\tadd\thl,sp" },
+ { "ldaspsp",
+ "ld hl,%d\n"
+ "\tadd\thl,sp\n"
+ "\tld\tsp,hl" },
+ { "*pair", "(%s)" },
+ { "shortjp", "jp" },
+ { "enter",
+ "push\tix\n"
+ "\tld\tix,0\n"
+ "\tadd\tix,sp" },
+ { "enterx",
+ "push\tix\n"
+ "\tld\tix,0\n"
+ "\tadd\tix,sp\n"
+ "\tld\thl,-%d\n"
+ "\tadd\thl,sp\n"
+ "\tld\tsp,hl"
+ },
+ { "leave",
+ "pop\tix"
+ },
+ { "leavex",
+ "ld sp,ix\n"
+ "\tpop\tix"
+ },
+ { "pusha",
+ "push af\n"
+ "\tpush\tbc\n"
+ "\tpush\tde\n"
+ "\tpush\thl\n"
+ "\tpush\tiy"
+ },
+ { "popa",
+ "pop\tiy\n"
+ "\tpop\thl\n"
+ "\tpop\tde\n"
+ "\tpop\tbc\n"
+ "\tpop\taf"
+ },
+ { "adjustsp", "lda sp,(sp%+d)" },
+ { "profileenter",
+ "ld a,3\n"
+ "\trst\t$08"
+ },
+ { "profileexit",
+ "ld a,4\n"
+ "\trst\t$08"
+ },
+ { NULL, NULL }
+};
+