Tuesday 17 August 2010

Turbo Pascal - A Brief History

Turbo Pascal is a famous Pascal compiler developed by Borland in early 1980s. It was the first compiler that included also an Integrated Development Environment (IDE). Because of this it was possible to write the code, compile it, run it and debug it without ever leaving the editor and running other tools. Another strength of the Turbo Pascal compiler was its speed. Comparing to other compilers at that time it was very fast.

Turbo Pascal was developed by Anders Hejlsberg who initially developed Blue Label Pascal and then Compas Pascal compiler. It was available on CP/M and MS-DOS platforms. Borland then licensed the compiler core and added user interface and editor. Anders Hejlsberg joined Borland where he was the chief architect of all versions of Turbo Pascal and first versions of its successor, Delphi. Anders Hejlsberg is now forking for Microsoft where he works as the lead architect of the C# programming language.

The first version of the Turbo Pascal compiler was released in November 1983. It was sold for $49.95 and was very affordable comparing to other Pascal compilers. It generated .com executable files which were also pretty fast. This was a direct consequence of the quality of the generated code by the compiler. Included Integrated Development Environment, fast compilation, fast development cycle (edit, compile, debug), quality of the generated code and affordable price contributed to additional popularity of the Pascal programming language in the 1980s. At that time Pascal was also used as the programming language for teaching in high schools and universities.

The compiler development went on. Later versions introduced a full-screen user interface with pull-down menus, generated .exe files, supported inline assembly instructions and object oriented programming. Many advanced features were added to ease software development. The last version of the compiler for DOS, Turbo Pascal 7, had everything needed to get the most out of a DOS program.

One of the most important contributions to the popularity of Pascal language made by Borland was a clever approach to add some simple extensions of the language which filled the gaps in the standard Pascal. The most important extension was the support for units. Unit is a separate file which could also be compiled separately. Usually a complex program is divided into logical units which make code writing and program development easier. Second important extension was support for strings. Strings are character arrays which can be used for anything not just for characters. Borland also added support for object oriented programming, access to absolute memory locations, support for interrupt procedures, inline assembly instructions, etc.

If you are interested in compiler construction and Turbo Pascal internals you can examine the Turbo Pascal compiler source code. This is not the original source code but a compatible compiler written in Turbo Pascal. This source code can be also used as a great book on compiler design and implementation.

No comments:

Post a Comment