Just out of curiosity, from where did you get the idea that a semicolon alone would produce a NOP? Isaac Em 10/4/2012 15:51, AdiCH escreveu: > Hi Mike > > Thanks you very much for your answer.=20 > > Here is the c function that works now for me: > > unsigned int ReadFlash( unsigned int address ) { > EEADRL =3D address%256; > EEADRH =3D address/256; > EEPGD =3D 1; // program memory > RD =3D 1; // read > asm("nop"); > asm("nop"); > return EEDATH*256 + EEDATL; > } > > It was the point that only a semicolon is not a nop in the compiled code.= So > it worked during debugging but not during the normal release version. > > I used a lot of time to solve this now and I got also a wrong answer from > the microchip support that sad that the current compiler does not support > this functions. > > Many thanks again you helped me a lot. > > Adrian > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .