* as/hc08/lkaomf51.c (OutputName): made name unsigned char,
[fw/sdcc] / as / mcs51 / lklist.c
index 31f134232929f42ca526e666bf08f407163a001f..5325ec895e5d94519f23373098ba460ec2ede7bb 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <alloc.h>
 #include <stdlib.h>
 #include "aslink.h"
 
@@ -156,9 +155,9 @@ static int _cmpSymByAddr(const void *p1, const void *p2)
  *             int     j               bubble sort update status
  *             char *  ptr             pointer to an id string
  *             int     nmsym           number of symbols in area
- *             addr_t  a0              temporary
- *             addr_t  ai              temporary
- *             addr_t  aj              temporary
+ *             Addr_T  a0              temporary
+ *             Addr_T  ai              temporary
+ *             Addr_T  aj              temporary
  *             sym *   sp              pointer to a symbol structure
  *             sym **  p               pointer to an array of
  *                                     pointers to symbol structures
@@ -189,8 +188,8 @@ struct area *xp;
        /* int j; */
        register char *ptr;
        int nmsym;
-       /* addr_t a0; */
-       addr_t     ai, aj;
+       /* Addr_T a0; */
+       Addr_T     ai, aj;
        struct sym *sp;
        struct sym **p;
        int memPage;
@@ -206,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");
        /*
@@ -225,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 {
@@ -367,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 );
 
@@ -398,9 +400,9 @@ struct area *xp;
  *             int     j               bubble sort update status
  *             char *  ptr             pointer to an id string
  *             int     nmsym           number of symbols in area
- *             addr_t  a0              temporary
- *             addr_t  ai              temporary
- *             addr_t  aj              temporary
+ *             Addr_T  a0              temporary
+ *             Addr_T  ai              temporary
+ *             Addr_T  aj              temporary
  *             sym *   sp              pointer to a symbol structure
  *             sym **  p               pointer to an array of
  *                                     pointers to symbol structures
@@ -430,7 +432,7 @@ struct area *xp;
        register c, i, j;
        register char *ptr;
        int nmsym;
-       addr_t a0, ai, aj;
+       Addr_T a0, ai, aj;
        struct sym *sp;
        struct sym **p;
         int page;
@@ -614,7 +616,7 @@ struct area *xp;
  *     output file.
  *
  *     local variables:
- *             addr_t  pc              current program counter address
+ *             Addr_T  pc              current program counter address
  *
  *     global variables:
  *             int     hilo            byte order
@@ -625,7 +627,7 @@ struct area *xp;
  *                                     output RST file
  *             int     rtcnt           count of data words
  *             int     rtflg[]         output the data flag
- *             addr_t  rtval[]         relocated data
+ *             Addr_T  rtval[]         relocated data
  *             FILE    *tfp            The file handle to the current
  *                                     LST file being scanned
  *
@@ -645,7 +647,7 @@ VOID
 lkulist(i)
 int i;
 {
-       addr_t pc;
+       Addr_T pc;
 
        /*
         * Exit if listing file is not open
@@ -746,7 +748,7 @@ int i;
 
 VOID
 lkalist(pc)
-addr_t pc;
+Addr_T pc;
 {
        char str[8];
        int i;
@@ -873,7 +875,7 @@ loop:       if (tfp == NULL)
 
 VOID
 lkglist(pc,v)
-addr_t pc;
+Addr_T pc;
 int v;
 {
        char str[8];