Turbo C was the name of Borland's old 16-bit DOS C compiler, back in the day. I've known a number of Windowsish C programmers who learned on it. It's a nostalgia thing. The whole compiler and environment (with IDE and debugger) would fit on one 3.5" floppy disk, though it was originally distributed on three 5.25" disks. Oh, yes. You bet.

Turbo C was named for the sake of consistency and brand recognition: Borland's first programming language product was Turbo Pascal1, a more-or-less legendary Pascal compiler for DOS back in 1983 when -- if I recall correctly -- there were no C compilers for that environment. Turbo Pascal 1.0 came with a line editor, much like ed. At that time, MS shipped an assembler with the "operating system" (many would dispute that description) and DOS software was just written in assembly language. Users wrote code, if at all, in the horrible BASIC dialect (GW-BASIC, wasn't it?2) that also shipped with DOS. That was the way it was. Turbo Pascal was quite a fine thing, under the circumstances. When Borland released a C compiler, they traded on the name recognition they'd built up with Pascal.

In fact, Microsoft never did get a real foothold in the 16-bit DOS C compiler market. It was their 32-bit compilers that finally could compete with Borland. It helped that they (reportedly) hired away Borland's best compiler developers with seven-figure bonuses.

The Turbo C IDE was a DOS program, like the compiler itself. An IDE is a text editor with commands to run your compiler and linker, and it usually has an interface for a debugger, too. Most of them let you set breakpoints, where the debugger will halt the program during execution and let you step through one line at a time while examining what's in memory. Turbo C's IDE had all those fine things.

Turbo C wasn't perfect, though. The version I had was version 2.013 (released in 1989), and it had two glaring "issues": First, there was a well-known bug (well-enough known for the workaround to be mentioned in the comp.os.msdos.programmer FAQ) where it would often fail to link the floating point runtime routines, even when they were needed. The other problem was that the runtime library had painfully slow buffered IO. In my first six months as a C programmer, I spent many delightful hours writing my own buffered file-read routines (seriously!) so I could read files at a reasonable speed. Of course, I was naïve: I found the file handle member of struct FILE and grabbed that directly to pass to read(). I didn't find out about fileno() until later.

And of course, everything had to fit into 64k, kinda more or less. Remember memory models? A "memory model" is a strange and terrible thing: 16-bit DOS used, naturally, 16-bit pointers. You could only address 64k of memory -- one segment -- at a time. "Memory models" were a bizarre kludge for coming to terms with that. 32-bit Windows came along just in time to save me from having to grok the details, thank God.

I loved that damn compiler. My whole world was 80x25 characters, and the operating system crashed when I smashed the stack. Turbo C was cool, but it's more fun to remember than it would be to use again. You can download it for free now from Borland's web site. It's a little piece of history.

  1. The Turbo Pascal compiler was originally written by a Dane named Anders Hejlsberg. He was the architect for the Turbo Pascal product as long as it lasted, and the first three versions of its successor, Delphi. Hejlsberg is now at Microsoft. He's one of the main architects of MS's shambling .NET monstrosity.

    As of January, 2002, you can still download the Turbo Pascal 1.0 binaries (a 63k zip file) for free from this page in Borland's "museum" site: http://community.borland.com/article/0,1410,20693,00.html. You'll have to register, but if you un-click all the "spam-me" checkboxes, they really and truly won't spam you.

  2. Thanks to Albert Herring for reassuring me that GW-BASIC was the culprit there, and that as of DOS version 5 (1991, 1992?) it was replaced by the slightly-less-gruesome QBASIC.


    ariels says GW-BASIC *except* on PC-DOS, where it is called BASICA. Really, kids these days...

  3. Just like Turbo Pascal in note 1 above, you can download Turbo C 2.01 binaries for free right here: http://community.borland.com/article/0,1410,20841,00.html. There's no sane reason to do that, but you will, won't you? Of course you will! It's only 1.1MB.

Log in or registerto write something here or to contact authors.