Don't know what the reason is but I have a memory reusability issue.
uint8_t i;
for (i = 0; i < 8; i++)
{
test++;
var++;
}
for (i = 0; i < 8; i++)
{
test++;
var++;
}
for (i = 0; i < 8; i++)
{
test++;
var++;
}
in code above each for loop allocates memory for 'i' variable and it's not reused in next one, so you can get out of memory by just having loops. Code below will also allocate memory for i variable
i = 0;
while(1) {
var++;
test++;
i++;
if(i > 8) break;
}
Attached code will not compile due exeteding RAM addressing for pdk13 by one byte, remove any loop and code will compile.
checked on
sdcc 4.0.3 #11850 (Linux)
and #11722