Fixed to work with lates CDB format. Needs more work though...
[fw/sdcc] / as / mcs51 / lklist.c
index 3842b1d9f3b4787400e5f237cd1b3131402cf7c5..5325ec895e5d94519f23373098ba460ec2ede7bb 100644 (file)
@@ -17,9 +17,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#if !defined(_MSC_VER)
-#include <alloc.h>
-#endif
 #include <stdlib.h>
 #include "aslink.h"
 
@@ -208,7 +205,8 @@ struct area *xp;
                fprintf(mfp, "Decimal\n\n");
        }
        fprintf(mfp, "Area                               ");
-       fprintf(mfp, "Addr   Size   Decimal Bytes (Attributes)\n");
+       fprintf(mfp, "Addr   Size   Decimal %s (Attributes)\n",
+               (xp->a_flag & A_BIT)?"Bits ":"Bytes");/* JCF: For BIT print bits...*/
        fprintf(mfp, "--------------------------------   ");
        fprintf(mfp, "----   ----   ------- ----- ------------\n");
        /*
@@ -227,7 +225,8 @@ struct area *xp;
        if (xflag == 2) {
                fprintf(mfp, "  %05u  %05u", ai, aj);
        }
-       fprintf(mfp, " = %6u. bytes ", aj);
+       fprintf(mfp, " = %6u. %s ", aj,
+               (xp->a_flag & A_BIT)?"bits ":"bytes"); /* JCF: For BIT print bits...*/
        if (xp->a_flag & A_ABS) {
                fprintf(mfp, "(ABS");
        } else {
@@ -369,6 +368,7 @@ struct area *xp;
                if (dflag &&
                    strchr(ptr,'$'))
                    fprintf(dfp,"L:%s:%X\n",ptr,aj);
+
                /* NoICE output of symbol */
                if (jflag) DefineNoICE( ptr, aj, memPage );