* src/SDCCmain.c (linkEdit): Added support for passing a legacy command line through...
[fw/sdcc] / src / z80 / mappings.i
index 987d4e6077d99ee0ce95dfdc376cb5bad614bacc..319afdd1190fe44d3e1a0878911cc15601fc7d86 100644 (file)
@@ -3,6 +3,7 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     { "area", ".area _%s" },
     { "areacode", ".area _%s" },
     { "areadata", ".area _%s" },
+    { "areahome", ".area _%s" },
     { "functionlabeldef", "%s:" },
     { "*hl", "(hl)" },
     { "di", "di" },
@@ -14,10 +15,20 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     { "enter", "" },
     { "enterx", 
       "lda sp,-%d(sp)" },
+    { "enterxl",
+                "ld hl,#-%d\n"
+                "\tadd\thl,sp\n"
+                "\tld\tsp,hl"
+    },
     { "leave", ""
     },
     { "leavex", "lda sp,%d(sp)"
     },
+    { "leavexl",
+                "ld hl,#%d\n"
+                "\tadd\thl,sp\n"
+                "\tld\tsp,hl"
+    },
     { "pusha", 
       "push af\n"
       "\tpush bc\n"
@@ -26,6 +37,14 @@ static const ASM_MAPPING _asxxxx_gb_mapping[] = {
     },
     { "adjustsp", "lda sp,-%d(sp)" },
     { "fileprelude", "" },
+    { "profileenter",
+                "ld a,#3\n"
+                "\trst\t0x08"
+    },
+    { "profileexit",
+                "ld a,#4\n"
+                "\trst\t0x08"
+    },
     { NULL, NULL }
 };
 
@@ -34,6 +53,7 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
     { "area", ".area _%s" },
     { "areacode", ".area _%s" },
     { "areadata", ".area _%s" },
+    { "areahome", ".area _%s" },
     { "*ixx", "%d(ix)" },
     { "*iyx", "%d(iy)" },
     { "*hl", "(hl)" },
@@ -60,7 +80,8 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
                "\tadd\tix,sp\n"
                "\tld\thl,#-%d\n"
                "\tadd\thl,sp\n"
-               "\tld\tsp,hl" },
+               "\tld\tsp,hl\n" 
+        },
     { "leave", 
                "pop\tix\n"
     },
@@ -75,6 +96,14 @@ static const ASM_MAPPING _asxxxx_z80_mapping[] = {
                "\tpush\thl"
     },
     { "adjustsp", "lda sp,-%d(sp)" },
+    { "profileenter",
+                "ld a,#3\n"
+                "\trst\t0x08"
+    },
+    { "profileexit",
+                "ld a,#4\n"
+                "\trst\t0x08"
+    },
     { NULL, NULL }
 };
 
@@ -113,9 +142,10 @@ static const ASM_MAPPING _rgbds_mapping[] = {
     { "functionlabeldef", "%s:" },
     { "zero", "$00" },
     { "one", "$01" },
-    { "area", "SECTION \"%s_%F_%I\",%C" },
-    { "areacode", "SECTION \"CODE\",%C" },
-    { "areadata", "SECTION \"DATA\",BSS" },
+    { "area", "SECTION \"%s\",CODE" },
+    { "areadata", "SECTION \"%F_%s\",BSS" },
+    { "areacode", "SECTION \"%F_CODE\",%s" }, 
+    { "areahome", "SECTION \"%F_HOME\",HOME" },
     { "ascii", "DB \"%s\"" },
     { "ds", "DS %d" },
     { "db", "DB" },
@@ -200,6 +230,7 @@ static const ASM_MAPPING _isas_mapping[] = {
     { "area", "%s\tGROUP" },
     { "areacode", "_CODE\tGROUP" },
     { "areadata", "_DATA\tGROUP" },
+    { "areahome", "_CODE\tGROUP" },
     { "ascii", "DB \"%s\"" },
     { "ds", "DS %d" },
     { "db", "DB" },