Turbo Pascal is a software development system that includes a compiler and an Integrated Development Environment (IDE) for the Pascal programming language running under CP/M, CP/M-86, and MS-DOS, developed by Borland under Philippe Kahn's leadership. The name Borland Pascal was generally reserved for the high-end packages (with more libraries and standard library source code) while the original cheap and widely known version was sold as Turbo Pascal . The name Borland Pascal is also used more generically for Borland's dialect of Pascal.

Borland has released three old versions of Turbo Pascal free of charge because of their historical interest: versions 1.0, 3.02 and 5.5 for MS-DOS.

Motivation and release

Philippe Kahn first saw an opportunity for Borland, his newly formed software company, in the field of programming tools. Historically, the vast majority of programmers saw their workflow in terms of the edit/compile/link cycle, with separate tools dedicated to each task. Programmers wrote source code and entered it using a text editor, a compiler then created object code from source (often requiring multiple passes), and a linker combined object code with runtime libraries to produce an executable program.

In the IBM PC market of the early 1980s, the major programming tool vendors included IBM, Microsoft, and Lattice. They all made C compilers (and some made Pascal compilers), which all worked in a similar fashion. For example, the Microsoft Pascal system consisted of two compiler passes and a final linking pass (which could take minutes on systems with only floppy disks for secondary storage). This process was the cumbersome product of the extremely limited resources of the early IBM PC models. Vendors of software development tools aimed their products at professional developers, and the price for these basic tools plus ancillary tools like profilers ran into the hundreds of dollars.

Kahn's idea was to integrate these separate functions in a programming toolkit, have it run with much better performance, and charge one low price for it all. Instead of selling the kit through established sales channels (retailers or resellers), his new tool would be sold inexpensively via mail-order. Turbo Pascal is generally considered to be the first popular Integrated Development Environment (IDE) of any type.

As an additional selling point against the bigger vendors, Turbo Pascal disks came with no copy protection of any sort. Turbo Pascal came with the famous "Book License": "You must treat this software just like a book ... may be used by any number of people ... may be freely moved from one computer location to another". Since the first versions didn't have online help, copy protection was effectively enforced by possession of the Turbo Pascal reference manual (pictured below). So, treating it "like a book" was rather a redundant thing to ask, since one needed the real book anyway.

Versions 1 to 3

The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the Nascom microcomputer in 1981 by Anders Hejlsberg. This was first rewritten as the Compas Pascal compiler for CP/M and then as the Turbo Pascal compiler for MS-DOS and CP/M. A version of Turbo Pascal was available for the Apple Macintosh from about 1986 but was discontinued around 1992. Another version was available for CP/M machines like the DEC Rainbow through several releases.

Borland licensed the PolyPascal compiler core, written by Anders Hejlsberg ( Poly Data was the name of his company in Denmark), and added the user interface and editor. Anders joined the company as an employee and was the architect for all versions of the Turbo Pascal compiler and the first three versions of Borland Delphi.

The first version of Turbo Pascal, later referred to as version 1, was very fast compared to other microcomputer Pascal compilers. It was available for the CP/M, CP/M-86, and MS-DOS operating systems, all widely used at the time. The CP/M version could be used on the very popular Apple II computer if fitted with a Z-80 SoftCard, the first hardware product of the small company Microsoft released in 1980.

At the time CP/M used a simple executable file format using the file name extension .COM; MS-DOS could use either .COM files (incompatible with CP/M) or the more flexible relocatable .EXE format used almost universally in later years. Turbo Pascal generated only .COM files, which was not a severe restriction for the computer world of the time. Turbo Pascal itself was a single .COM file about 38 kilobytes long. which included the editor, compiler, linker, and the library routines. The edit/compile/run cycle was fast compared to other Pascal implementations because everything related to building the program was stored in RAM, and because it was a one-pass compiler, that was written in assembler. Compilation was very quick compared to that for other languages (even Borland's own later compilers for C), and programmer time was also saved since the program could be compiled and run from the IDE. Writing the program to disk was a menu option.

When the first version of Turbo Pascal appeared on November 20, 1983, the type of IDE it used was relatively new. On its debut in the United States market, Turbo Pascal retailed for USD$49.99. The integrated Pascal compiler also was of very good quality compared to other Pascal products of the time and above all was affordable. The Turbo name alluded to its compilation speed as well as the speed of the executables it produced. The speed of these com executable files was a revelation for developers whose only previous experience programming microcomputers was with interpreted BASIC or UCSD Pascal, which compiled to p-code.

The IDE was very advanced for its day, when computing resources were very limited. The IBM PC and other machines were often sold with 64 kB of RAM; the IBM PC could be expanded to a maximum 640 kB. Many machines were equipped with only one or two floppy disc drives of 180 or 360 kilobytes capacity (depending on if the drive was single-sided or double-sided); and perhaps as a luxury a 5 or 10 MB hard disk. The IDE was simple and intuitive, and had a well-organized system of menus. Early versions of the editor used WordStar key functions, which was the de facto standard at the time. Later versions of the IDE, designed for PCs with more disk space and memory, could display the definitions of the keywords of the language by putting the cursor over a keyword and pressing the F1 key. The definitions also frequently included examples code. This let inexperienced programmers learn Pascal simply by using the IDE, without needing help from a book.

Versions 2 and 3 were improved versions of the same, basic all-in-one system, working in memory and producing .COM files for MS-DOS and CP/m, and.CMD files for CP/M-86.

The .COM format let programmers write Terminate and Stay Resident programs, small utilities that stayed in memory and let the computer do other tasks, something very popular in the days before multitasking systems such as Microsoft Windows. Borland itself produced a small application suite called SideKick that was a TSR letting the user keep a diary, notes, and so forth.

Later versions

Version 4, released in 1987, was a major rewrite of the whole system. The compiler generated executables in EXE format under MS-DOS, rather than the simpler but more restricted .COM executables. Support for the by-then obsolete CP/M and CP/M-86 operating systems was dropped. This version also introduced a full-screen user interface with pull-down menus; earlier versions had a text-based menu screen and a separate full-screen editor. (Microsoft Windows did not exist when the first version was released, and even mice were a rarity.)

Version 5.x introduced the familiar Borland blue screen, which would be the trademark of the company's MS-DOS compiler tools until the end of this product line in the middle 1990s.

Assembly language

While all versions of Turbo Pascal could include inline machine code, later versions had the ability to easily integrate assembly language within Pascal. In the earliest version, the hexadecimal machine code had to be written into the program. Later versions let assembly code be written. Assembly provides the lowest human-readable interface to the machine, and allows faster execution than can be generated by a compiler, with access to the machine at a very detailed level. Overall program execution could be improved by coding much-executed inner-loop code this way. Inline assembly also enabled the programmer to access hardware features that were otherwise not directly available.

Support for the 8086 memory model was provided by inline assembly, compiler options, and language extensions such as the "absolute" keyword.

Debugging

The IDE allowed single stepping through a program for debugging, and now assembly-language blocks could be stepped through. The user could add watches on variables and registers in an IDE window. Programs using IBM PC graphics mode could flip between graphics and text mode automatically or manually.

The IDE also included a code profiler that could report on which parts of the program were using the most time. The books included with Borland Pascal had detailed descriptions of the Intel assembler language, going so far as to provide the clock cycles required by

Turbo Pascal object based programs

00index.txt 2823 Oct 5 12:47 Descriptions of the files in the turboobj directory 3d_amr.zip 82273 Mar 7 1995 3D Modeling and Animation Graphics program, A.Awadallah

...

Turbo Pascal (jskl)

Turbo Pascal is not the first choice of system programmers, because in C and C++ you can write generally faster and shorter programs. Nevertheless the difference is not big ...

...

Turbo Pascal 7.0 Program and Windown 2000 Environment : pascal, turbo

I have a program written in Turbo Pascal for a 16 bit system, DOS 6.0, version 7.0. I'd like to convert it into a 32 bit for Windows 2000 OS. I don't know if there's a package out ...

...

Turbo Pascal: Examining Your First Program

Examining a Simple Working Program. We will begin by looking at a program that already works, and seeing how Turbo Pascal handles various aspects of it.

...

Embarcadero Discussion Forums: How do I compile an older Pascal (or ...

Thread: How do I compile an older Pascal (or Turbo Pascal) program in Turbo Delphi?

...

Turbo Pascal: Compiling a Program

Now that we have "welcome.pas" saved, we can proceed to actually compiling a program. Compiling is where a Turbo Pascal compiler takes the code you have written ...

...

Turbo Pascal TVision oriented programs

00index.txt 2338 Oct 5 12:47 Descriptions of the files in the turbovis directory clckhp16.zip 11895 Jan 22 1995 Clock, heap and scrsav object for TVision (TP), G.Rossi

...

Turbo Pascal — Blogs, Pictures, and more on WordPress

Program paripurna; program paripurna; uses wincrt; var ls,ll,alas,tinggi,jari:real; pilihan: integer; lagi: char; nokom,nama,alamat,a:string; masuk,keluar,lama_rental,biaya_rental ...

...

A (Turbo)-Pascal Program

A real (Turbo)-Pascal Program. This program cleans the screen, and outputs a prompt "Input string -->" inviting a user to enter a series of characters from the keyboard.

...

Amazon.com: Turbo Pascal: Problem Solving and Program Design/Book and ...

Amazon.com: Turbo Pascal: Problem Solving and Program Design/Book and Disk (9780201524420): Elliot B. Koffman, Bruce R. Maxim: Books

...