"code", "data" and "at" are obsolete and shall be replaced by "__code" "__data" and "__at".

in the past you could not have a variable named "data" because it was a reserved word.

__CONFIG1L and other are addresses defined in the PIC headers.

CONFIG seems to be a macro that expands to what I wrote in my previous mail, but I never used it myself.

Regards
Sebastien

On Tue, Apr 19, 2011 at 2:57 PM, Olgierd Eysymontt <oecpub@eid.cl> wrote:
Yeah, but why sometimes we use "__code" and others simply "code" and "CONFIG" or "__CONFIG",  general concept and syntax it's in fact the same, keywords or macros are the difference (at least it seems so to me).

Regards

Olgierd


On 19-04-2011 7:47, Sébastien Lorquet wrote:
This is nothing magic but simply a variable definition, in the code address space (__code) at the correct address (__at adr) and initialized with a value!

The name is not important, e.g.

char foovalue; /*variable*/

char foovalue = 42; /* initialized*/

__code char foovalue = 42; /*address space defined*/

__code char __at __CONFIG1L foovalue = 0x42; /*storage address defined*/

this creates the correct definition in the hex file.

Sebastien

On Tue, Apr 19, 2011 at 2:21 PM, Olgierd Eysymontt <oecpub@eid.cl> wrote:
I'll give it a try tonight and let you know.

It's a very different syntax, ¿ where did you got that info ?, I'm curious.

Cheers,

Olgierd


On 18-04-2011 16:57, Rob Connolly wrote:
> __code __at __CONFIG1L _C1L = 0x20;
> __code __at __CONFIG1H _C1H = 0x04;
> __code __at __CONFIG2L _C2L = 0x04&  0x01;
> __code __at __CONFIG2H _C2H = 0x0C;
> __code __at __CONFIG3L _C3L = 0x30&  0x40;
> __code __at __CONFIG3H _C3H = 0x07;


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user