]> git.gag.com Git - fw/sdcc/blobdiff - src/asm.c
* Changed banked for nonbanked
[fw/sdcc] / src / asm.c
index 2766b9875aee9da29897f9122084cb5e949ab407..733e338396933b0d62536329a1c7320efe3410e9 100644 (file)
--- a/src/asm.c
+++ b/src/asm.c
@@ -12,6 +12,7 @@ static va_list _iprintf(char *pInto, const char *szFormat, va_list ap)
 {
     char *pStart = pInto;
     char *sz = gc_strdup(szFormat);
+    static int count;
 
     while (*sz) {
        if (*sz == '%') {
@@ -26,6 +27,16 @@ static va_list _iprintf(char *pInto, const char *szFormat, va_list ap)
                pInto = pStart + strlen(pStart);
                sz++;
                break;
+           case 'F':
+               strcpy(pInto, srcFileName);
+               pInto = pStart + strlen(pStart);        
+               sz++;
+               break;
+           case 'I':
+               sprintf(pInto, "%u", ++count);
+               pInto = pStart + strlen(pStart);
+               sz++;
+               break;
            default:
                {
                    /* Scan out the arg and pass it on to sprintf */
@@ -155,8 +166,8 @@ static const ASM_MAPPING _asxxxx_mapping[] = {
     { "immedword", "#0x%04X" },
     { "immedbyte", "#0x%02X" },
     { "hashedstr", "#%s" },
-    { "lsbimmeds", "#>%s" },
-    { "msbimmeds", "#<%s" },
+    { "lsbimmeds", "#<%s" },
+    { "msbimmeds", "#>%s" },
     { "module", ".module %s" },
     { "global", ".globl %s" },
     { "fileprelude", "" },