Hello,
new compiler V5.05 does not handle an expression: lastrec[2] = (kol_strok / 4); //
and so works: lastrec[2] = kol_strok / 4; //
What, exactly, do you mean by that?
Is there an error message? If so, what?
this works: lastrec[2] = resint / 4; // resint == 0xDF __nop(); __nop(); //lastrec[3] = resint - (lastrec[2] * 4) + 1; // lastrec[3] = resint - ((resint / 4) * 4) + 1; // __nop(); __nop(); lastrec[3] *= 0x40; // lastrec[2] += 0xC0; //
this not works: lastrec[2] = resint / 4; // lastrec[3] = resint - (lastrec[2] * 4) + 1; // lastrec[3] *= 0x40; // lastrec[2] += 0xC0; //
P.S.: my name is Sergey
(Please remove code that is commented out from your snippets)
Testing that code also did not result in an error.
For a closer investigation it is required to know: - the toolchain and version in use (Help - About µVision) - the definitons of all variables - the error message your project results in (screenshot of Build Output window)
Thank you and best regards, Ralf
R.Kopsch Senior Applications Engineer ARM Germany GmbH
View all questions in Keil forum