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

error A9 ,A3 and Warning A41

My Program code is following:

system.c

#include <reg51.h>

#include <Memory.set>
#include <Delay.h>

void main(void)
{

//unsigned char xdata uc_xdata_Buf[32768];

//uc_xdata_Buf[0]=1;

Delay_Ms_24M(1);

}

Memory.set

//---------------------------------------------------------------------------------------------
//Test
//---------------------------------------------------------------------------------------------

unsigned char xdata uc_xdata_Buf[32768] _at_ 0x0010;

Error Message as following:
Comm Group\Memory.set(5): error A9: SYNTAX ERROR
Comm Group\Memory.set(5): error A3: ILLEGAL CHARACTER
Comm Group\Memory.set(5): error A3: ILLEGAL CHARACTER
Comm Group\Memory.set(6): warning A41: MISSING 'END' STATEMENT

Please give me suggestion. Thanx.

  • first: DO NOT retype code into the forum use cut-and-paste. There has been a lot of threads that ran forever because the error was different in the retype than in the code.

    second: if you want help with errors, mark the lines in your source the errors refer to or only someone that has hours on hand could try (most likely w/o success) to help you.

    Erik

  • Sorry. I posted the question in this forum first time. I hasnt known what happen in my program. So I paste two files content (System.c and Memory.set). If the post is not OK. Please tell me again. I will delete it. Thanx.

  • do not forget to mark the lines the error messages refer to

  • I define a array in the other file(Memory.set). But I use the array in system.c and I compile it. It show the errow message. Memory.set has something wrong. If I move the array definition to the system.c. It can pass. Everything is ok.
    My Program code is following:

    system.c

    #include <reg51.h>
    #include <Memory.set>
    #include <Delay.h>

    void main(void)
    { //unsigned char xdata uc_xdata_Buf[32768];->If the array definition move to here.It will be Ok.

    uc_xdata_Buf[0]=1;

    Delay_Ms_24M(1);

    }

    Memory.set

    unsigned char xdata uc_xdata_Buf[32768] _at_ 0x0010;------>Error

    Error Message as following:
    Comm Group\Memory.set(5): error A9: SYNTAX ERROR
    Comm Group\Memory.set(5): error A3: ILLEGAL CHARACTER
    Comm Group\Memory.set(5): error A3: ILLEGAL CHARACTER
    Comm Group\Memory.set(6): warning A41: MISSING 'END' STATEMENT

    Please give me suggestion. Thanx.

  • I found why error happen. I have two group. The Main group has system.c. The Comm group has memory.set. If I remove the memory.set from Comm group. The error disappear. Thanx.