The xdata memory type may be used to declare variables only. You may not declare xdata functions. This memory is indirectly accessed using 16-bit addresses and is the external data RAM of the 8051. The amount of xdata is limited in size (to 64K or less).
Variables declared xdata are located in the XDATA memory class.
Declare xdata variables as follows:
unsigned char xdata variable;
from:
https://www.keil.com/support/man/docs/c51/c51_le_xdata.htm?_ga=2.141276795.895368043.1575953742-358333248.1570542484