Question

My university is hosting a Programming Competition, and have decided to support Turbo C (the 16-bit DOS version) as a valid programming environment. I have just read that PC^2, the software that is going to be used to auto-judge the competition, does not support 16-bit programs.

So, is there any alternative to Turbo C that I can use. I need the same header files, and the compiler would need to support all the outdated C standards that Turbo C supports. But the output needs to be 32-bit. Is there any compiler that can satisfy these conditions?

Was it helpful?

Solution

Portable C programs can be written in many different free compilers and non-free compilers.

For compatibility, you can't go wrong with gcc on Linux machines. If it doesn't work with GCC, you probably have a problem.

In Windows, the Microsoft C compiler is generally considered acceptable, but if you use MS Visual Studio (most schools have an installation) then you need to be very careful to ensure that you are compiling as ANSI-C, rather than later versions of C or even C++. When I used to teach, students used to miss that option, leading to problems with automated tests. Here are some instructions on how to do this with Visual Studio 2005, you can find similar features in later versions.

OTHER TIPS

I realize this question has an answer, but for anyone searching SO for an alternative to Turbo C for building 16-bit DOS apps, I just want to point out that OpenWatcom has been an excellent alternative. I've been using it under Windows 7 to build 16-bit DOS apps with great success for an embedded target running DOS 6.22.

There is a project to support the Turbo C API on modern compilers (GCC) in Linux.

See: http://www.sandroid.org/TurboC/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top