I think all you have to do is turn on PC-relative strings. Then anything in
double quotes will be in the code segment, except in some cases global
strings (drop static from below example).
Putting non-strings into the code segment is another matter. For example
foo()
{
static const int x[] = {0,1,2};
}
will not put 0,1,2 into the code segment. I've resorted to little bits of
assembly to get that into the code segment.
LL
At 10:34 AM 12/24/99 -0800, Chris Antos wrote:
>static const Char s_szMyString[] = "Blah Blah Blah";
>
>the above works for me (and does the same thing in MSVC, too). of course
>the string is const, which means due to the incorrect typing in the header
>files in OS3 and earlier you have to cast if you want to pass it to OS APIs.
>
>
>----- Original Message -----
>From: Chris Yourch <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, December 24, 1999 5:57 AM
>Subject: string in code segment
>
>
> >
> > I am using codewarrior and would like to put a string in the code segment?
> > I used to do this in the MS/Windows world using the compiler directive:
> > __based(__segname("_CODE"))
> >
> > How do I do this using codewarrior?
> >
> > Thanks,
> > Chris
> >
> >
> >
>