RE: [cc65] How smart is the linker?

From: Shawn Jefferson <sjefferson1shaw.ca>
Date: 2009-12-17 03:08:24
Hi Jakub,

I usually just create a custom linker config for more complicated programs
that have PMG, Display lists, charsets, etc.. then you can align them
yourself and maximize the space usuage.  You can define a segment to use the
space at the beginning of a PMG area for instance, and then use it in your C
programs for data/code storage.

For smaller things, I've used the align keyword.  I have some programs that
have custom dlists and these can't cross 1k boundaries.  I output a map file
(-m) and just look to see if the DATA segment crossed the boundary or not,
and if it did, I add the align=$400 to the linker config manually.

-- 
Shawn

> -----Original Message-----
> From: owner-cc65@musoftware.de [mailto:owner-cc65@musoftware.de] On Behalf
> Of Jakub
> Sent: Wednesday, December 16, 2009 7:56 AM
> 
> Hi,
> 
> How smart is the linker when it tries to align segments?
> Can anyone describe the algorithm?
> I have to define a lot of aligned segments because of 8bit Atari
> limitations
> (aligned segment for sprites, fonts, screen data in display list etc.)
> I could use the hand-calculated addresses in a large aligned segment, but
> the project would be cleaner if I could use the aligned segments in config
> file.
> I'm already on the memory limits with the current project, so every byte
> counts :-)

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Dec 17 03:08:35 2009

This archive was generated by hypermail 2.1.8 : 2009-12-17 03:08:37 CET