I have studied that it is possible to write values in code memory during the execution time in A51.But when tried the test gets failed.If possible what is the actual procedure to do it?
Hi, Well, it is possible only with devices which have built-in bootloader flash API (for example, Atmel Temics-formed devices such as (A)T89C51RB2/ RC2/ RD2/ ED2/ ID2/ AC2/ IC2/ CC01 etc). Such devices contain extra program called bootloader which provides in-system programming of device. Thanks for manufacturer, they install user API as well there. So, yes, it is possible to write program flash; read flash API/bootloader sources to understand how. Good days!
"it is possible only with devices which have built-in bootloader flash API" Not true: this might be the easiest way, but it's not the only way. with a suitable memory architecture you can do this on any 8051 - but it requires the user to provice the necessary hardware and software support.