compile C program to MS-DOS environment

2.6k Views Asked by At

i have a small program that uses 32bit object file, and i wish to run it under dos operating system. now, after searching i found DJGPP.
is there a way to use DJGPP to compile my program to 16Bit dos executable format?

thanks in advance

2

There are 2 best solutions below

1
Pablo Santa Cruz On BEST ANSWER

Take a look at this related Stack Overflow question. It might help.

0
Fabel On

If you want to take advantage of a 32-bit processor (386 and above) to run 32-bit code under 16-bit DOS (using DPMI), then DJGPP is definitely the right tool. That is, it produces 16-bit dos executable files containing 32-bit code. For object format it uses 32-bit COFF.