On Fri, 14 Nov 2014 10:33:26 +0100
Hynek Sladky <ec...@centrum.cz> wrote:

> Thanks for Your reply.
> I am not sure if I understand it correctly. When I need to compile 
> source, code should be in INITIALIZED section to get correct addresses; 
> INITIALIZER section will contain .ds with correct size just to make 
> place for initialization data after special utility is executed - this 
> below mentioned utility should move this data to this place in 
> INITIALIZER section. Startup code then takes data from INITIALIZER and 
> moves it back to RAM to INITIALIZED section for run-time. Do I 
> understand it correctly? Is it possible to download Fuzix source (at 
> least these low-level parts) to get inspiration?

Yes - sdcc builds with the INITIALIZER section holding the data, but with
all relocations for the INITIALIZED section.

You simply take the INITIALIZER section of the sdcc output and move it
to the INITIALZED section when creating the final binary, then you don't
need to do anything in the start up code.

See

https://github.com/EtchedPixels/FUZIX/blob/master/Library/tools/binman.c

This reads the map file and the makebin output of the ihx file sdcc
generates. Note that the binman example there makes some assumptions about
how the memory is laid out by the crt0.s and bits I use.

There's not really a lot to it on Z80 beyond makebin and moving the block
as the bugs in the sdcc ihx output don't affect anything under 64K long.

Alan

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to