Hello I am Leandro (Buenos Aires - Argentina) with respect to the limitation of sprintf/printf/stack. (15 bytes compact, 40 bytes large) This is valid for the TINI400 of 1M.? Why neither it shouts linker, nor the compilation, with this:
void _DebugProcess_(void) { unsigned char byCnt, byNum; char strVct[16][4]; char strOut[64]; for(byNum = 0x30, byCnt = 0; byNum < 0x3A; byNum++, byCnt++) { strVct[byCnt][0] = byNum; strVct[byCnt][1] = 0; } byNum+=7; for(; byNum < 0x47; byNum++, byCnt++) { strVct[byCnt][0] = byNum; strVct[byCnt][1] = 0; } sprintf( strOut, "%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", strVct[0], strVct[1], strVct[2], strVct[3], strVct[4], strVct[5], strVct[6], strVct[7], strVct[8], strVct[9], strVct[10], strVct[11], strVct[12], strVct[13], strVct[14], strVct[15] ); //48 bytes }
"Why neither it shouts linker, nor the compilation" I've run into this as well. I don't know why the compiler doesn't issue a diagnostic when you pass too many parameters to printf(), but it doesn't. It would be interesting to look at the .cod file in this situation.
I tried it once a while back, and it did! Maybe things have changed...?
yes, it works well, but some days later it dies... this is driving me crazy My versions are: LX51 V3.63 C51 V7.10 Thanks for everything. and... excuse my English :)