This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

_at_ keyword

Hi all,

How to use _at_ keyword? The varaibles are declared in onchip EEPROM space. (T89C51RD2)

Regards.

Parents
  • Thank you for your responce. This is a sample program. "fvalue" is declared in EEPROM space at unknown addess. I can locate starting address of fvalue but that is not enouth.

    There is a linker error when I use _at_ keyword. If fvalue is declared in RAM or XRAM that is OK.

    #include <89c51rd2.H>
    #include <absacc.h>

    #pragma USERCLASS (HDATA = eeprom) // use HDATA_EEPROM for E2PROM area

    float far fvalue;// _at_ 0x20;

    void main (void)
    {
    f = 12.5;
    while(1);
    }

Reply
  • Thank you for your responce. This is a sample program. "fvalue" is declared in EEPROM space at unknown addess. I can locate starting address of fvalue but that is not enouth.

    There is a linker error when I use _at_ keyword. If fvalue is declared in RAM or XRAM that is OK.

    #include <89c51rd2.H>
    #include <absacc.h>

    #pragma USERCLASS (HDATA = eeprom) // use HDATA_EEPROM for E2PROM area

    float far fvalue;// _at_ 0x20;

    void main (void)
    {
    f = 12.5;
    while(1);
    }

Children