]> git.sur5r.net Git - cc65/blobdiff - src/od65/dump.c
Rather stay with OFF_YEAR as it is an "officially" name.
[cc65] / src / od65 / dump.c
index e4ebcff7afcff19ce3fbb663ec1b96c4483f186a..b15dac59f7187fefa76c74dc80b933eab2313340 100644 (file)
@@ -6,7 +6,7 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2002-2011, Ullrich von Bassewitz                                      */
+/* (C) 2002-2012, Ullrich von Bassewitz                                      */
 /*                Roemerstrasse 52                                           */
 /*                D-70794 Filderstadt                                        */
 /* EMail:         uz@cc65.org                                                */
@@ -46,7 +46,6 @@
 #include "objdefs.h"
 #include "optdefs.h"
 #include "scopedefs.h"
-#include "segdefs.h"
 #include "symdefs.h"
 #include "xmalloc.h"
 
@@ -173,8 +172,9 @@ static void SkipExpr (FILE* F)
                break;
 
            case EXPR_SECTION:
+            case EXPR_BANK:
                /* Read the segment number */
-               (void) Read8 (F);
+               (void) ReadVar (F);
                break;
 
            default:
@@ -498,8 +498,9 @@ void DumpObjSegments (FILE* F, unsigned long Offset)
         unsigned long NextSeg   = ftell (F) + DataSize;
                const char*   Name      = GetString (&StrPool, ReadVar (F));
        unsigned      Len       = strlen (Name);
+        unsigned      Flags     = ReadVar (F);
        unsigned long Size      = ReadVar (F);
-       unsigned      Align     = (1U << Read8 (F));
+               unsigned long Align     = ReadVar (F);
                unsigned char AddrSize  = Read8 (F);
         unsigned long FragCount = ReadVar (F);
 
@@ -508,8 +509,9 @@ void DumpObjSegments (FILE* F, unsigned long Offset)
 
        /* Print the data */
        printf ("      Name:%*s\"%s\"\n", (int)(24-Len), "", Name);
+        printf ("      Flags:%25u\n", Flags);
                printf ("      Size:%26lu\n", Size);
-       printf ("      Alignment:%21u\n", Align);
+       printf ("      Alignment:%21lu\n", Align);
        printf ("      Address size:%14s0x%02X  (%s)\n", "", AddrSize,
                 AddrSizeToStr (AddrSize));
                printf ("      Fragment count:%16lu\n", FragCount);
@@ -930,7 +932,7 @@ void DumpObjSegSize (FILE* F, unsigned long Offset)
        unsigned long Size     = ReadVar (F);
 
         /* Skip alignment, type and fragment count */
-        (void) Read8 (F);
+        (void) ReadVar (F);
         (void) Read8 (F);
         (void) ReadVar (F);