can the value in program counter be accessed,stored and modified while programming a p89lpc935..?? pls tel me how can PC be accessed since it is not listed in SFRs...
How about you explain first why you want to do this?
www.catb.org/.../smart-questions.html
I'm very interested too in the reason for this need.
Accessingthe PC while programming the chip does not sound like something anyone wants to do. It would not survive a reset. The only time it would be meaningful to set the PC externally would be in a debug session, when using a processor that can run the code from RAM.
Or when having a setup with a boot loader, but wanting to skip the boot loader and directly debug the application.
I can see zero reason for reading the PC while programming the chip.
But "accessed, stored and modified" sounds more like an interest in saving the PC somewhere, then reprogram the chip, and then restore the PC to the original value. Similar to Visual Studio where a function can be modified while debugging, and the program then continue the debugging after the changes have been patched into the currently running binary.
Alas, that requires special support from compiler/linker and in some part also from the OS/boot loader/ISP/IAP or whatever is used to control what program code the chip has.