??? 11/04/08 22:50 Read: times Msg Score: -1 -1 Answer is Wrong |
#159669 - not xdata Responding to: ???'s previous message |
unsigned char xdata * idata pwrite; // pointer to FLASH used for writes // NOTE: this pointer must be located // in <data> or <idata> space! unsigned char code *pread; // pointer to FLASH used for reads // test string stored in FLASH unsigned char code test_string[] = "Howdy!"; ... while (*pread != '\0') { // copy until NULL is detected *pwrite = *pread; // copy byte pread++; // advance pointers pwrite++; } *pwrite = '\0'; Read pointer not in xdata and not pointing to xdata, so it should be ok. |