Menu

#3004 .AREA is issued twice into the asm listing

open
None
GBZ80
5
2021-04-27
2020-05-21
Tony Pavlov
No
  1. declare something like: unsigned char test[20]; in some c-file (mine is src\sdcc4bank2code.c)
  2. issue a command:
    sdcc -mgbz80 --no-std-crt0 -I ....\gbdk\include -I ....\gbdk\include\asm -I src\include -c src\sdcc4bank2code.c -bo2 -ba1 -o build\sdcc4bank2code.rel
  3. the result is:
    .area _DATA_1
    .area _DATA
    _test::
    .ds 20

".area _DATA" is an artefact; ".area _DATA_1" is a correct area definition.

that happen because of both !areadata and !area are in the dict and there is no check for this in emitRegularMap() of the SDCCglue.c. that might affect not only the GBZ80 target.

SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ez80_z80/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 4.0.0 #11528 (MINGW64)
published under GNU General Public License (GPL)

Related

Feature Requests: #692

Discussion

  • Tony Pavlov

    Tony Pavlov - 2020-05-21

    i made this kind of fix of emitRegularMap(), but it's a bit dirty:

          else if (!strcmp (map->sname, DATA_NAME))
            {
              struct dbuf_s temp_buf;
              dbuf_init(&temp_buf, 64);
              dbuf_tprintf(&temp_buf, "!areadata", map->sname);
              if (strcmp(dbuf_c_str(&temp_buf), "!areadata") != 0) {
                  dbuf_tprintf(&map->oBuf, "\t!areadata\n", map->sname);
              } else {
                  if (options.data_seg && strcmp(DATA_NAME, options.data_seg))
                      dbuf_tprintf(&map->oBuf, "\t!area\n", options.data_seg);
              }
              dbuf_destroy(&temp_buf);
            }
    
     

    Last edit: Tony Pavlov 2020-05-21
  • Tony Pavlov

    Tony Pavlov - 2020-06-19

    what's about this?

     
  • Sebastian Riedel

    • assigned_to: Sebastian Riedel
     
  • Tony Pavlov

    Tony Pavlov - 2021-04-27

    This one is fixed long ago

     

Log in to post a comment.