I'm new to z88dk, and I try to compile a c program written for the sdcc.
The program uses a multiplication between int and float which can be done on compile time. In sdcc it works, but with zcc I got zero as result.
Here is the code:
Code: Select all
#include <stdio.h>
#include <stdint.h>
#define WIDTH (40)
void do_something( uint8_t param1, uint8_t param2)
{
printf( "param1: %u\n", param1);
printf( "param2: %u\n", param2);
}
void main()
{
printf( "expect: 18, 20\n");
do_something( WIDTH * 0.45, WIDTH * 0.5);
}
Just for completness the compiler invocation:expect: 18, 20
param1: 0
param2: 0
Does anybody have a hint, what I'm doing wrong?zcc +kc85 -create-app --list --c-code-in-asm -lmath48 -lndos -o float_test main.c
Best regards,
Bert