After I commented floating point code out of the program, the rest would run on the XT (V40, no FPU)
This simple program will build, but crashes the computer:
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%f\n",sqrt(2));
}
These compile-time options were used:
CFLAGS = -1 -fpc -ml -j -bt=dos -ohk -zp1 -os -zt32 -I$(%WATCOM)/h -D$(SYSTEM)
The program runs fine on anything 386+, with or without an FPU.
So, what am I doing wrong?
This simple program will build, but crashes the computer:
#include <math.h>
#include <stdio.h>
int main(void)
{
printf("%f\n",sqrt(2));
}
These compile-time options were used:
CFLAGS = -1 -fpc -ml -j -bt=dos -ohk -zp1 -os -zt32 -I$(%WATCOM)/h -D$(SYSTEM)
The program runs fine on anything 386+, with or without an FPU.
So, what am I doing wrong?