There are many C files in my project, in my manidemo.c I define such a buffer
#pragma udata SEC_BUF // locate 0x0b00
BYTE Buffer[512]; //unsigned char data area
#pragma udata
then in somewhere of the main file I call for a function
Data_write(Buffer,length);
In another C file I write a function like this
for example:
Data_write (pBuffer ,data)//pBuffer-unsigned char ,data-unsigned int
{
char str[16]="12345678";
unsigned int i=0;
while(data-->0)
{
*pBuffer++=a;
i++;
}
this is a test function in my project ,and it seems realy OK,I can't figure out if there are mistakes.Please give advise , Thank you.
}