I dont test it ,but I think the
-------------------------------------------------------------------------
__code unsigned char a[4] = {0x12, 0x13, 0x14, 0x15};

shoule be same as:

const unsigned char a[4] = {0x12, 0x13, 0x14, 0x15};
---------------------------------------------------------------------------

Merry Christmas  :-)
ʥ.


2012/12/22 Gl Zsolt <tralitoverin@freemail.hu>
Hello,

You can find in the SDCC documentation a modifier. It is __code ( with
two underscore ).

So you can try this example and see what is the different form your
original code:

------------------------------------------------------------------------------------------
    #include<pic16f887.h>
    __code unsigned char a[4] = {0x12, 0x13, 0x14, 0x15};

    int main() {
        PORTA = a[2];
        return 0;
    }
-------------------------------------------------------------------------------------------

2012/12/21 feqin fan <feqin1023@gmail.com>:
> ------------------------------------------------------------------------------------------
>     #include<pic16f887.h>
>     unsigned char a[4] = {0x12, 0x13, 0x14, 0x15};
>
>     int main() {
>         PORTA = a[2];
>         return 0;
>     }
> -------------------------------------------------------------------------------------------



--
~~~~~~~~~~~~~~~~
http://galzsolt.zzl.org

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user



--
live long and prosper..