Turbo Pascal

One day, I decided I needed a compiler for an IBM PC. I wanted to write programs! I had read Nicklaus Wirth's book (Data + Algorithm = Program? Something like that), and played with a TinyPascal? on my ancient TRS-80 Model I. I decided that Pascal was a good language for me.

I went to one computer store and found that they had 3 Pascals available. One was UCSD Pascal, which was interpreted and buggy. Yech. Another commercial compiler was around $600. Yikes! And another was a garage Pascal that, according to the salesman, "worked sometimes... usually it just crashed."

Then I went to another software store and asked if they had any Pascal compilers. "Just this one," and the salesman handed me this tiny cardboard package. It looked like a cardboard mailer - not glossy or fancy - and inside it contained a soft-cover book and a single 5" floppy. I bought it for $35 and took it home.

It was Turbo Pascal 1.0.

That one floppy contained an editor which contained the compiler. It could execute my program out of memory OR write it to disk as an executable. It had access to the hardware when I needed it, and enough extensions to actually write something useful.

Yes, it had no objects (but we didn't know what those were then, anyhow). Yes, it wasn't standard (but ISO Pascal wasn't useful, anyhow). Yes, it suffered from segmentation limitations. But it worked flawlessly, it was blazingly fast, it was only $35, and the manual was great. None of the other Pascal compilers could touch it.

A funny thing started happening to compilers after that: The prices started going down. When TurboCee? came out, the prices for C compilers came down also. Don't you remember the days when PC compilers were only for the rich? Turbo Pascal started the change in compiler pricing that allowed everyone to write code for the PC.


A very efficient, but very low-cost, extended implementation of Pascal (PascalLanguage) by the Borland International (BorlandCorp) of PhilippeKahn, popularized on CP/M and the early IBM PCs. It compiled Pascal source code into directly executable files for the IBM PC, instead of using a stand-alone interpreter like UcsdPascal. For its history predating and on other platforms than the IBM PC, see the Wikipedia (http://en.wikipedia.org/wiki/Turbo_Pascal).

NiklausWirth himself (1996) once admitted "But the point is well taken that the actual standard for Pascal has been defined by Borland, just by producing a compiler and distributing it cheaply and widely. If you talk to anyone about Pascal today, probably Turbo Pascal from Borland is meant". ObjectOrientedProgramming features arrived in its version 5.5.

The cost issue should not be underestimated: Microsoft sold its notoriously sluggish Pascal compiler for $300, and UcsdPascal could cost $600-700 (e.g.: when bought directly from IBM).

Wirth 1996: "Recollections about the development of Pascal". In T.J. Bergin and R.G. Gibson (eds.): HistoryOfProgrammingLanguages?. Addison-Wesley: Reading, MA (USA).

For a more formal description not relying on collected 3rd-party reminisces, see Glenn Grotzinger: "Turbo Pascal". Chapter 5 in Peter H. Salus (series editor-in-chief): HandbookOfProgrammingLanguages?, volume II: Imperative Languages [ImperativeLanguage], Part IV: "Pascal", p. 251-324.

Ah, those were the days. A complete PC development environment that you could use and understand for under fifty bucks.

Was it in fact possible to write a Turbo Pascal program that would play nice in DOS? I seem to recall even writeln went straight to the video hardware, so you couldn't use even the primitive redirection DOS gave you.

At least in later versions, the default was to go through the DOS routines. However, you could also bypass DOS and access the video card directly. This seems horrendous now, but it probably should be pointed out that the DOS routines where really slow, that the indirection support referred to above was so bad that almost no-one used it, and that if you wanted to do anything more than simple glass-printer style IO you had to go to the hardware anyway. Moreover, using DOS routines wasn't anymore portable than doing direct hardware access.

Pascal's only a teaching language. It was never meant as a practical language. Heaven forbid, you might even go off and build an OS in Pascal. The horrors! You mean like OberonOperatingSystem?

Borland's Pascal dialect was rather different from ISO Pascal. It was much more suited for real-world programming. It was, unfortunately, also very much tied to the DOS x86 platform. A typical thing you could do in Turbo Pascal was to declare an array at a fixed position in memory, e.g. at the video RAM or the interrupt table. Then you could access the video ram with ordinary array indexing operations. This was easy to use and very efficient, but also highly unportable.

These days are gone. ObjectPascal is not well suited to write device drivers and operating systems. But beside that DelphiLanguage could compete well with the rest of the (windows desktop) world. -- ManfredSchaefer

The great thing about Turbo Pascal was not only that you had pretty much complete control over the machine, but also that compilation was almost instantaneous. In fact, the GNU C compiler still seems slower on my Pentium than TP on the old 286. TP was optimized for fast compilation; the resulting code sucked for modern standards, but at the time, TP was lightning from the sky. -- StephanHouben

Turbo Pascal was a lightning-fast compiler, but there wasn't really a linker, so you had to compile your entire program each time. That got slow and old fast.

Hey, man - I don't know what kind of system you were running on or how big your project was, but I did quite a few lab tools and stuff like that in TP. TP worked on anything at all, including original Plain Jane PCs with 32K RAM, 5 1/4" diskette, and a 4.77 MHz 8088. I never had a problem with the compiler or editor being slow. Period.

Oh, and by the way, at one time Turbo Pascal was the standard language for creating IBM PC applications around the world. I remember a period of a couple years (like about '84-'85) when almost everydamnthing I looked at on the IBM PC was compiled in Turbo Pascal. All you had to do was look at any executable on an IBM PC platform and you'd find the typical Borland Pascal compiler strings. I used to go looking through clients' machines just for phun, seeing how many of their apps were built on Turbo Pascal. It was amazing... -- MartySchrader

The "garage Pascal" was quite possibly JRT Pascal, so named because of its developer's initials. Back in the days when PC software was sold in zip-lock baggies, that product was very successful for a while. However, JRT apparently couldn't handle the success, with the result that orders were not filled, and products were not shipped. Possibly just a case of a guy with highly refined technical talent, but no business-management skills; I suppose only he and any lawyers of his ever knew for sure.

About a year after the JRT Pascal implosion, when PC programmers were still wary of unknowns selling Pascal for cheap, an imposingly large guy with a European accent appeared at a meeting of the SiliconValleyComputerSociety?, carrying a cardboard box filled with smaller cardboard boxes. It was PhilippeKahn, hawking version 1 of Turbo Pascal. -- ClayPhipps

It wasn't only the compiler that was fast, but TP made using the integrated "environment" fast as well. The editor understood WordStar key combinations, which are optimized for touch typists, and which many people already knew. The environment was shortcut-driven as well, and there were so few that you not only remembered them, but they quickly became a subconscious reflex. -- FalkBruegmann

Ah yes, Control+F9 was compile and run. I definitely could make that one in my sleep. Also Control-KB, Control-KK, etc. -- StephanHouben

I'm not that old am I? I'm only 35! Everyone here is talking about the IBM-PC versions of Turbo Pascal, but before that even existed there was the CP/M version. I'll probably date myself more by saying that back then I was using the BDS C compiler which was a C subset and found it lacking and I couldn't afford Aztec C or any of the other "real" C compilers. When Turbo Pascal came out, I was delighted. It was a powerful language (better than standard Pascal), blazingly fast on compiles, and it generated very efficient executables. That was version 1.0.

I later moved to an IBM clone platform and stayed with Turbo Pascal (later Borland Pascal) up through version 6.0. The latter versions (4.x I believe) introduced objects (taken from ObjectPascal with extensions). TP 5.5 was the first version with objects. The object system was revised in later versions. -- sh

Turbo/Borland Pascal was wonderful. You could do real work with them (including writing device drivers in later versions) and do virtually anything C would let you do. These days, it's morphed into DelphiLanguage.

I had an interesting experience with the CP/M and PC versions of TP. I wrote an instrument control program on a CP/M computer and later needed to use it as the basis for a (different) PC-based instrument. If I remember correctly, the only thing I had to change was the escape-sequences for manipulating the screen (the CP/M computer had a non-ANSI terminal attached to it). Amazingly, I'd encapsulated all of the screen stuff in a couple of routines. After literally a couple of changes, the system compiled and ran on the PC. So much for TP being tied to the PC so tightly. -- GeoffSobering

That's a matter of wrapping hardware-specific stuff behind an interface (functions). If the new target is not somehow more limited than the original, such as less pixels available, then in theory it should be fairly easy to switch.

Good memories for me there too. I remember one time in a job during college that I was forced to write a mammoth (well, it was about 6 person-months, which at the time felt mammoth) database system on a PC XT using a horrendous product called R:Base. After putting together the screens to update and maintain the database, I then wrote the program to do the searches on the database (about 98% of the use for this particular system). The performance stank - it took something like 10 minutes to do a search.

So, I dug out my copy of TurboPascal and wrote a translator from the ludicrous file format R:Base used the simple B-tree format that the TurboPascal libraries supported. I then rewrote the search program in TurboPascal - the whole programming effort took under two days, and the searches ran in well under 2 seconds... Ahhh, those were the days...

You can download Turbo Pascal 1.0, 3.0 and 5.5 for free (non-commercial use, IIRC). Go to http://community.borland.com, then click on "Museum" in the menu (free registration required).

Recently, we had some old (but well-written) TurboPascal code which we wanted to use in a C++ environment on Linux. It was surprisingly easy! We used the FreePascal compiler, which compiled the 10+ years old code without a hitch. Integration in C++ was also easy: extern "C" and a few prototypes did the trick. So TurboPascal turned out to be more portable than I thought... -- StephanHouben

My favorite bit about TurboPascal was in the manual for the editor. Sure it was fast, and usable and cheap,etc! And I loved it for that, but I still recall being most tied to one line in the manual about search and replace options:

gnuSearch out and replace without asking all small antelope-like creatures.

When they went GUI, it was a total downer (I'm talking about both TC++ and TP obviosuly). That old DOS ide was absolutely excellent - I'd missed it until Intellij Idea came along...

What great fun to see that I am not the only one who is nostalgic about TP. In fact, I found that switching to C++ was a step backwards in many ways. Obviously, this was before C++ was what it is today and TP even supported objects. But it had a friendlier string primitive (which allowed you to type things like "Hello " + "World!" without producing some ridiculous error message.. The 256-char limit never seemed a problem to me :) and what's more, TPU files were incredibly simple to work with! You could send them to anyone and they could type "using" in their code and it just worked. -- KristianDupont

The only problem I had with Pascal was that it was overstructured. I preferred the LogoLanguage to Pascal. -- PieterJansegers

"Overstructured." Heh. Yeah, all that modularity and hierarchy and stuff. Gee, I'd rather have everything in globals...

I liked the warmth and humor for programmers that was visible inside these old Borland line of products. This sensibility was lacking until IntellijIdea came along. -- RodneyRyan?

I remember that instead of "syntax error", it would say "fumble fingers!",

Tell you what, Turbo Pascal 7.0 is alive and kicking in MANY universities around Eastern Europe and Russia, being especially popular for indroductory CS courses. Some profs that fell in love with it during the 80s will actually FORCE you to write projects in Pascal. That's why, I think, the ACM contest rules allow Pascal in international events. BTW, TP 7.0 CRT module when used on fast Intel CPUs generates a run-time exception - division by zero! Fortunately, there is a patch for it.

Pascal is still an IOI (InternationalOlympiadinInformatics?) language. At least, it was this year; languages for 2006 have not yet been confirmed. In the South African olympiad we actually use FreePascal, but many entrants use TurboPascal at home/school.

I'm a hobbyist programmer and I don't "get" all this object-oriented stuff. For this reason, boxes TP 6.0 and TP Win 1.5 sit on my shelf unused. I still use TP 3.0 today that I bought way back in '85. Newer languages have locked us hobbyists out of programming our PCs! It would be so nice if there was a new verion of Turbo Pascal that ran native under Windows and used Windows funtions, but kept traditional structured programming techniques. Until that happens, I'll continue using TP 3.0.

CategorySoftwareTool CategoryProgrammingLanguage CategoryPascal

EditText of this page (last edited October 17, 2014) or FindPage with title or text search