dom wrote:Weird. Can you devise the smallest program that shows the difference and post the code and the resulting assembler if it's different between the two sets of binaries, if it's the same then just the code will do.
Well, finally i spend some time to find the compiler error, this is the smallest code:
Code: Select all
void main()
{
int nY = 0;
int nValue = 0;
nY = 13 + 16 * (nValue / 7);
printf("nValue %d, nY %d\n", nValue, nY);
nValue = 7;
nY = 13 + 16 * (nValue / 7);
printf("nValue %d, nY %d\n", nValue, nY);
nValue = 14;
nY = 13 + 16 * (nValue / 7);
printf("nValue %d, nY %d\n", nValue, nY);
while (getk() != 13) {};
}
The output in the amstrad is,
Compiling with "z88dk-win32-1.7.zip":
Compiling with "z88dk-1.7.0-setup.exe":
As you can see, the setup.exe compilation fails doing the operation,
16 * (nValue / 7); allways calcs 0, if i replace nValue variable with a 7 or a 14 numeric constant the calc works fine.
I hope that with this explanation you could find the error,
cheers,
Mochilote.