Re: [cc65] String Literal Segment in C code

From: Greg King <greg.king41verizon.net>
Date: 2010-12-03 08:33:51
From: "Agent Friday"; on Thurs., Dec. 02, 2010; at 09:19 PM -0500
>
>> On Thu, Dec 2, 2010 at 8:18 AM, Greg King wrote:
>> The reason for that need is that strings aren't put into the output
>> until the entire source file has been compiled. Then, all of the
>> strings are merged and dumped, as a block. In your example, you had
>> _two_ #pragma rodataseg() lines; cc65 used the last one!
>
> Wow!  So, rodataseg is a module-wide setting.  Good to know.
>
> Almost seems like the second use of that pragma within a module
> should generate a warning, since it's not likely doing what the
> author intended.

Only strings work that way!  Other const data is put into the output, as
soon as it is seen.  So, multiple pragmas can be useful.  Also, Uz
recently added a "#pragma local-strings()" to cc65.  It can generate
strings in the same immediate way that other const data is handled.  I
didn't mention it because modularity is a much more useful method, in
Joseph's case.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Dec 3 10:29:11 2010

This archive was generated by hypermail 2.1.8 : 2010-12-03 10:29:14 CET