Turbo Pascal Content from the guide to life, the universe and everything

Turbo Pascal

3 Conversations

Turbo Pascal is a compiler or rather an IDE (Integrated Development Environment) for the programming language Pascal, designed by the Danish programmer Anders Hejlsberg1 and produced and distributed by Borland International, Inc. It was available from 1983 through to 1993 bearing version numbers from 1.0 up to 7.0 for MS-DOS and 1.0, 1.5 and 7.0 for Windows, until it was eventually replaced by a product named Delphi.

A Turbo Description

Written originally for the now mostly forgotten operating system CP/M2, it was very soon ported to the IBM PC with the then new operating system MS-DOS. So Turbo Pascal benefited by the boom of the IBM PC and later clones; if one's programming language of choice was Pascal, then there was no real alternative to Turbo Pascal. Speaking in terms of quality, both software and documentation, it was actually not possible to outdo Turbo Pascal and so competing products were extremely rare.

A characteristic feature of Turbo Pascal was the legendary short compile time (just in case you ever wondered what the 'Turbo' in all Borland Compilers stood for). For once, the compiler core of Turbo Pascal was written in assembler, heavily optimised of course3. On the other hand it was a one-pass compiler, meaning that the program code was analysed, made into machine code and subsequently linked into an executable program in just one pass. This was an incredible shortcut in program development, when you take into consideration the 64K RAM / 4.77 MHz PCs of that time.

Furthermore, Turbo Pascal enabled the programmer to create relatively small 'standalone' executable programs, which didn't need any runtime libraries for support. Other Pascal compilers at that time generated pseudo code which then had to be interpreted by a runtime environment4 rather than machine code for immediate execution. So shipping of your own programs was reasonably simple as no specific runtime libraries had to be included.

Pascal vs Turbo Pascal

One of the main reasons why Turbo Pascal was so popular were the enhancements of Standard Pascal. Pascal was originally designed in the 1960s by Niklaus Wirth, Professor for computer science at Stanford and later at the ETH Z├╝rich, for learning purposes. So it was rather restrictive at type-checking5 and, furthermore, didn't contain many possibilities to control the underlying operating system or hardware, as the graphics subsystem, for instance.

What Borland did was to enhance the existing standard for Pascal6 with their own features. These were for instance minor changes for file handling and allowing low-level system calls (interrupts); later, Borland introduced a proprietary object orientation extension in Version 5.5. From early on, chunks of assembler code for time-critical routines could be embedded directly into Pascal programs, at first in hexadecimal coding only but later also in real assembly language.

On the whole, all these extensions were greatly appreciated by most Turbo Pascal fans, as they wanted to use it for creating real world programs and not just for education purposes. They could take advantage of nearly every documented and undocumented feature of the IBM PC without having to fall back to C or assembler.

The consequence is of course that programs using these extensions are no more portable to other platforms, which is a major downside considering that Turbo Pascal was most of the time only available for MS-DOS. UNIX platforms for instance were not supported, even though a version for the XENIX operating system7 was announced on the back cover of the version 3.0 manual, along with a version for the Motorola 68000 processor both of which were never released.

Version History

Throughout the life cycle of Turbo Pascal, an evolution of features, both in the language itself as in the programming environment took place. Note that some of the old versions are still available for free (registration required) at the Borland Museum.

Turbo Pascal 1.0

In 1983, Version 1.0 for CP/M or DOS on a single floppy disk (either 8" or 5.25") was released. It relied on the compiler core from Anders Hejlsberg's Danish Company PolyCore with added simple user interface, editor and runtime from Borland. As a demo program, it included a small spreadsheet program named MicroCalc; this demo program survived under different names up to today's latest versions of Delphi.

Turbo Pascal 2.0

Version 2.0 was released in 1984, with (at first) left over manuals from version 1.0. Rudimentary support of the Intel 8087 math co-processor was introduced.

Turbo Pascal 3.0

This was the bread-and-butter version of many Pascal programmers for a long time (first release 1985) and in fact the one with which Turbo Pascal got really popular.

It was also the last version available for CP/M. Turbo Pascal 3 for MS-DOS was the first Turbo Pascal version to support the 8087 co-processor with a full library along with an emulator if you hadn't such a device and also included support for Binary Coded Decimal (BCD) math applications. It also allowed you to build larger programs as the limit of 64K could now be bypassed using overlays. The PC version also supported Turtle Graphics, Colour, Sound, Window Routines, DOS path names and more.

With version 3, various toolboxes were introduced to support the ambitious programmer; they survived up to version 4.0. There was Turbo Editor, Turbo Tutor, Turbo Gameworks, Turbo Graphix, Turbo Database and Numerical Methods available.

Turbo Pascal 4.0

With this version from 1987, it was possible to create own libraries, 'Units', which could be used exactly as the included ones, making obsolete the overlay technique from version 3. The IDE was improved having a window-like editor with supplementary windows for compile output etc and contained a real help system.

Turbo Pascal 5.0

From now on (1988), Turbo Pascal was available 'standalone' (compiler and IDE as in previous versions) or as 'professional' edition bundled with the external Turbo Debugger 1.0 and Turbo Assembler 1.0. Turbo Pascal now had an internal assembler which allowed coding assembler mnemonics directly in Pascal source as opposed to either coding it in hex or linking external object files. It was the first IDE which had mouse support.

Turbo Pascal 5.5

Released in 1989, version 5.5 introduced object orientation with major features inheritance, static and dynamic objects and so on. It contained a rather rudimentary class library that was to be greatly enhanced in later versions. As for the IDE, there was a hypertext help system with full cut-and-paste available and furthermore an integrated source level debugger when one didn't want to use the external Turbo Debugger.

Turbo Pascal 6.0

Version 6.0 was shipped 1990 and included a full class library for Windows-like user interfaces in textmode, named Turbo Vision. It allowed development of multiple-document interfaces (overlapping windows) with full mouse support, which before was quite a hairy task when one tried to implement it without object-oriented techniques.

The IDE itself also had a Windows-like user interface, obviously created with Turbo Vision. The command line compiler made use of the Intel 80386 processor's protected mode and thus used also memory beyond the 640K boundary. In the professional edition a tool named Turbo Profiler was introduced; with this the performance of your programs could be measured by showing you where time is spent in your routines, overlays, interrupts and file I/O.

Turbo Pascal for Windows Version 1.0

1991 saw the first version explicitly designed for Windows (version 3.0). It came with a class library for Windows, but you could also create generic Windows programs using only the Windows API (Application Programming Interface). Shortly after the release of Turbo Pascal for Windows, Microsoft released Windows 3.1, which API-wise wasn't fully compatible with the one for 3.0 and so was not fully supported by the compiler. Borland offered upgrades for those who complained, but a general solution was yet to come.

Turbo Pascal for Windows was delivered with a rather spartan resource toolkit8, a better one came a bit later and you had to purchase it separately. The debugger was in textmode only and better be used remote from another PC due to the poor performance of the computers of that time.

Turbo Pascal for Windows Version 1.5

Version 1.5 from 1992 now fully supported the Windows 3.1 API, the new Windows help system, the new Windows charset and all the other new features of Windows 3.1. The editor supported syntax highlighting and the IDE included the enhanced resource toolkit.

Borland Pascal 7.0 and Turbo Pascal 7.0

The last Turbo Pascal version from 1992, (very) shortly after the release of Turbo Pascal for Windows 1.5, was mainly a bundle of the respective latest versions of Turbo Pascal and Turbo Pascal for Windows along with further improved development tools. There also were internal improvements, however, as better support for the Windows 3.1 API for instance, DPMI9 support and syntax highlighting in both IDEs.

What Then?

In 1994, Borland released Delphi 1.0 as follow-up for the Turbo (Borland) Pascal series as a response to the 'Visual Basic threat'. With Microsoft's Visual Basic, creating Windows programs was much easier than with any other development tools, Borland Pascal included. Delphi had a similar approach: you first created your user interface (main windows, dialog boxes and so forth), then Delphi generated a program frame for you which 'only' had to be filled out with the desired functionality, also in Pascal.

On the more technical level, a major improvement in Delphi was the integration of database handling, using a database engine which could handle various database formats and could also be used for client/server programming.

At the time of writing, Delphi 2005 (Delphi 8.0) is the latest version available for Windows and since 2001, there is also a Linux version named Kylix available (at last).

1Anders Hejlsberg designed and created the compiler core of every Turbo Pascal compiler and of the first three versions of Delphi. Then he went to Microsoft to become chief designer of C# and one of the architects of their .NET strategy.2Home computers and computers for semi-professional use in the early 1980s, based on the Zilog Z80 processor, very often used CP/M as an operating system.3Anders Hejlsberg said once in an interview that he kicked out all the traditional methods of compiler design in favour of optimising the compile time.4Like BASIC interpreters of that time but also the popular UCSD (University of California in San Diego) Pascal.5Meaning that you are not allowed to use variables of different data types interchangeably. This is appreciated by Pascal programmers as much as it is detested by C programmers.6As described by Wirth and the later ANSI Standard.7Microsoft's then UNIX-like OS, available approximately at the time of MS-DOS 2.0.8With a resource toolkit you design your user interface (dialog boxes, buttons, icons etc).9DOS Protected Mode Interface - a method for programs to access extended memory.

Bookmark on your Personal Space

Edited Entry


Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:

Written by

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more