char xdata lcdctr _at_ 0x4001;
char xdata adc_input _at_ 0x8000;
char xdata dataport _at_ 0x4000;
unsigned char xdata[0x4003]==0x83;
The first 3 lines are wrong. If you want to declare a variable at some absolute address you have to use something like this
char xdata _at_ 0x4001;
In your declaration how does the compiler interpret space between xdata and lcdctr?
And in unsigned char xdata[0x4003] == 0x83; which is wrong because 0x4003 = d16387. So it created an array named xdata of 16387 elements and you are assigning only one value to the array and you are using == instead of =. In array initialization you have to initialize all the elements of the array.
You should use something like
char xdata _at_ 0x4001; which will create variable xdata at address 0x4001.
I don't know much about 8051 but in mikroE Compiler we use something like
unsigned char readbuff[64] absolute 0x500;
unsigned char writebuff[64] absolute 0x540;
It created an array of type unsigned char of 64 bytes starting at the addresses mentioned.
This might help you.
https://sites.google.com/site/controlandelectronics/interface-lcd-with-8051-using-8255-pia