Thanks for the pointer to Z88DK. I am responding to a request for a simple development environment for a Z80 machine http://www.mtxworld.dk/memorum/viewtopic.php?t=557
The best solution I have found so far is Code::Blocks. This supports SDCC but not Z88DK. Also the IDE automatically generates the link, so there is no convenient way bypassing SDCC for this stage. On 14/07/2022, Alan Cox <alan@llwyncelyn.cymru> wrote: > On Wed, 13 Jul 2022 14:35:31 +0100 > William Brendling <wbrendl...@gmail.com> wrote: > >> I am using the following SDCC version: >> >> SDCC : >> mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 >> 4.2.0 #13081 (MINGW64) >> published under GNU General Public License (GPL) >> >> I am compiling with the line: >> >> sdcc -mz80 --code-loc 0x8000 main.c >> >> The resulting "main.lk" file is: >> >> -mjwx >> -i main.ihx >> -b _CODE = 0x8000 >> -b _DATA = 0x8000 >> -k C:\Program Files\SDCC\bin\..\lib\z80 >> -l z80 >> C:\Program Files\SDCC\bin\..\lib\z80\crt0.rel >> main.rel >> >> -e >> >> This contains the spurious line "-b _DATA = 0x8000". As a result the >> data overlaps the code. >> >> Is there any way of preventing SDCC from emitting a "-b DATA" >> directive so that the linker just packs the DATA section after the >> CODE section in the order specified by the "crt0.s" file? > > Dont use sdcc to do the link but write your own link file. Note btw that > SDCC doesn't support anything but ROM based content unless you fiddle > with it - it's wedded to the idea that initialized variables are > copied from ROM somewhere so if you are running from RAM you'll also need > to massage the binary and stuff. > > The Z88DK fork of SDCC is often more useful for retrcomputing and RAM > based setups. > > Alan > _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user