Page 1 of 1

Problems with "z88dk-1.7.0-setup.exe", multiply operator doesn't work?

Posted: Thu Sep 06, 2007 8:54 am
by Mochilote
Hi again, i have installed on a computer the v1.7 binaries (z88dk-win32-1.7.zip) without any problems (except changin cp with copy in conf files). With this versi?n i have program a library and a aplication without problems for the amstrad cpc. Today, i have installed the windows setup on another computer, the installation is ok, and the compiler runs without problems, but the generated cpc binaries works different and finally crash. I have put some printf's and they tell me that multiply operator seems to not work and some calcs on my app don't work :( i rename the installation dir and unzip the binaries package, then i replace the conf files with the setup ones, then compile and it runs perfect again.

I don't know whats the problem exactly, the multiply seems to fail with the setup compiler/libraries. (Some multiply on my program make use of defines, some others not).

I hope this will help, for now i stay with zip binaries better :D

Sorry for my poor english,

Mochilote.

Posted: Thu Sep 06, 2007 7:58 pm
by dom
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.

Posted: Thu Sep 06, 2007 9:30 pm
by Mochilote
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":
Image

Compiling with "z88dk-1.7.0-setup.exe":
Image

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.

Posted: Thu Sep 06, 2007 10:06 pm
by dom
Wow, that compiler is spectacularly broken. It's totally missed out the second half of the expression. I think Stefano compiled the binaries in the installer so I'll ask him what he used. In the mean time, I'd stick with the .zip binaries as you have done so far.

Posted: Fri Sep 14, 2007 7:41 am
by stefano
I've just submitted an updated installer and got rid of the broken one.
The new executable name is "z88dk-1.7.0a-setup.exe".
We quickly checked it, but your feedback would be really appreciated :)

Posted: Fri Sep 14, 2007 9:19 pm
by Mochilote
stefano wrote:We quickly checked it, but your feedback would be really appreciated :)
Done, the installation works perfect in a clean machine and the 'error program' now works without errors.

Many thanks,

Mochilote.

Posted: Sat Sep 15, 2007 3:58 pm
by stefano
Great.
Thanks to you, guy ! ;)