On 23.07.20 14:35, Maarten Brock wrote:
Sebastian 'basxto' Riedel wrote on 2020-07-23 13:02:
Is there a reason why __CODE and __DATA aren't set to default values
in the linker and instead the values defined in z80/main.c get passed
via command line arguments when called via `bin/sdcc`?
What default values would you expect? The z80 does not have internal
rom and ram lain out in a default memory map.
In the .lk file I see that `sdcc -mgbz80` calls sdasgb with `-b _CODE =
0x0200 -b _DATA = 0xc000` if you don't set code-loc or data-loc.
If you switch from sdcc to sdasgb you suddenly have to explicitly define
them, since they are 0x0 otherwise, which is a bit weird.
I guess this more relevant to gbz80 then, RAM has a fixed location there
and CODE can't be at 0x0 because it would overwrite the ROM header
otherwise or getting overwritten when the header gets fixed.
I also wonder why you ask this on the user mailing list. Are you
expecting answers from the users to this question?
I was wondering from a user perspective. So those mailing lists are
rather about who you wanna ask?
--
Freundliche Grüße / Yours sincerely
Sebastian „Baŝto“ Riedel
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user