gcc questions
Matthew Miller
mattdm at mattdm.org
Sat Nov 26 14:25:48 UTC 2005
On Sat, Nov 26, 2005 at 01:40:06PM +0200, Markku Kolkka wrote:
> > We're learning C in the university and we MUST compile on
> > Turbo C. So I need to know how different that piece of windows
> > software is from gcc. If I compile in gcc, can I safely bet
> > that the code will compile in Turbo C?
> No. Turbo C is an ancient (latest version is from 1989) compiler
> for 16-bit MS-DOS. It's possible that with careful coding and
> trial and error you might be able to create simple programs that
> compile correctly under both Turbo C and GCC.
Turns out Borland made Turbo C (a great compiler and IDE for its day)
available for free download from
<http://community.borland.com/article/0,1410,20841,00.html>. And, I was
curious, since there's a lot of nostalgia value for me, and I found that it
works wonderfully in DOSBox, the i386/DOS emulator -- which is available
from Fedora Extras. (So you could even use it on PPC.)
Hmm. They also have Turbo C++ 1.01 available for free -- that dates to 1991.
<http://community.borland.com/article/0,1410,21751,00.html>. This is
probably the one you want, since it also includes a plain C compiler, which
clearly states: "ANSI C! A 100% implementation of the ANSI C standard".
This means that programs you write *will* compile in both, provided you
don't use anything newer than the original ANSI C (or any nonstandard
extensions from either compiler). (Use the gcc -ansi option.)
DOSBox is also great if you ever need to delve into learning i386 assembly,
because you can't crash your actual machine.
--
Matthew Miller mattdm at mattdm.org <http://mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
More information about the fedora-list
mailing list