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

Problems getting _at_ to work

Hi,

I have read through the documentation and searched the knowledge base, yet I cannot figure out why my _at_ statement is not working!! My problem is that I need to locate a block of data at a specific location. I have the tried the following:

BYTE xdata PTMEM[100] _AT_ 0x2000;
unsigned char xdata PTMEM [100] _AT_ 0x2000;
xdata char PTMEM [100] _AT_ 0x2000;
... and other variations with no use. The compiler finds a syntax error C129.

I'm sure it's something simple, but I can't figure it out.

Alternatively, I have removed the _AT_ keyword, and tried using the XD? directive in BL51:

BYTE xdata PTMEM [100]; //in source file

?XD?PTMEM?MYPROG(0x2000)
in the XDATA box under Options.

Any help is appreciated.

Jerrold.

Parents
  • Hi Jerrold,

    I have just tried one of your examples and get this, which is what i think you are getting:-

    error C129: missing ';' before '_AT_'

    If i change the '_AT_' to '_at_' ie. lower case, the problem goes away, have you tried that?.

    Mark

Reply
  • Hi Jerrold,

    I have just tried one of your examples and get this, which is what i think you are getting:-

    error C129: missing ';' before '_AT_'

    If i change the '_AT_' to '_at_' ie. lower case, the problem goes away, have you tried that?.

    Mark

Children
  • Hi Mark,

    No, that is one alternative I didn't try! HAHA! I knew it was something easy.
    Thanks a lot.

    BTW, I got it to work by declaring the array in another file.

    //PTMEM.C
    BYTE xdata PTMEM [100];
    
    //MYPROG.C
    extern BYTE xdata PTMEM[100];
    
    //XDATA options
    ?XD?PTMEM(0x2000)
    
    Now I can get rid of that one-line file.

    Jerrold.