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

Installing on windows
Post Reply
Mochilote
Member
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

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

Post 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.
Last edited by Mochilote on Thu Sep 06, 2007 8:56 am, edited 1 time in total.
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post 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.
Mochilote
Member
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

Post 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.
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post 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.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post 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 :)
Mochilote
Member
Posts: 42
Joined: Thu Jul 19, 2007 10:54 am

Post 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.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Great.
Thanks to you, guy ! ;)
Post Reply