Hi. I m facing a problem regarding data reading from one memory to another via pointer. I am using LARGE memory model for ROM & RAM. I defined one function in idata as below: unsigned char func1(void) small { unsigned char status; unsigned char xdata *pSrc; unsigned char *pDst; pSrc = (unsigned char xdata *) &Obj_Xdata; pDst = (unsigned char idata *) &status; *pSrc = *pDst; } here, Obj_Xdata is a 1 byte data located in XDATA. But writting the code as above, i m not able to get the proper value of Obj_Xdata in the status variable. Please suggest the way to achive this.
There are several separate issues here: 1) you're going through all those explicitly constructed pointers, without any demonstrated need to for most of them. As I said, all that pointer gymnastics is equivalent to a plain and simple assignment
status = Obj_Xdata;
unsigned char xdata * pSrc = &Obj_Xdata; status = *pSrc;