
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';