Re: [cc65] Problem with code compiled as overlay.

From: Groepaz <groepaz1gmx.net>
Date: 2012-01-22 02:10:10
On Saturday 21 January 2012, Ullrich von Bassewitz wrote:
> Greg has already answered the first question. Regarding
> 
> On Sat, Jan 21, 2012 at 12:33:59PM -0600, Payton Byrd wrote:
> >    PS.  Another issue I have with this code is that the string literal in
> >    the method is not compiled as part of the overlay.  I may have a lot
> >    of text in each overlay, how do I make sure all the literals are
> >    compiled in the overlays?
> 
> the compiler behaves as follows:
> 
>   1. Depending on the compiler flag --writable-strings, strings will either
> go into the DATA or the RODATA segment.

shouldnt that depend on wether they are declared as const or not?

>   2. Depending on the compiler flag --local-strings, strings will either
> get emitted when they're used, or when the end of the module is reached.
> If strings are readonly, the latter has the advantage that merging of
> strings is possible. So if your program uses
> 
>         "Hello world"
>         "world"
>         "Hello world"
> 
>      the compiler will only store one string. The other two are pointers
>      to this copy.
> 
> Assuming that you're using the default settings, you will have to give
> another name to the RODATA segment and place that into the overlay.

is this actually documented anywhere?

-- 

http://www.hitmen-console.org    http://magicdisk.untergrund.net
http://www.pokefinder.org        http://ftp.pokefinder.org

Vor tausend Jahren hätten die Höflinge es gemerkt, wenn der König oder 
Herrscher unmerklich verrückt geworden wäre. Heute würde es ihnen garnicht 
auffallen. 
<Sir Peter Ustinov>

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jan 22 02:09:49 2012

This archive was generated by hypermail 2.1.8 : 2012-01-22 02:09:52 CET