Turbo Pascal is a software development system that includes a
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
and an
integrated development environment
An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(IDE) for the
Pascal programming language
Pascal is an Imperative programming, imperative and Procedural programming, procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming an ...
running on
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
,
CP/M-86
CP/M-86 was a version of the CP/M operating system that Digital Research (DR) made for the Intel 8086 and Intel 8088. The system commands are the same as in CP/M-80. Executable files used the relocatable .CMD file format. Digital Research als ...
, and
DOS
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicat ...
. It was originally developed by
Anders Hejlsberg
Anders Hejlsberg (, born 2 December 1960) is a Danish software engineer who co-designed several programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Mic ...
at
Borland
Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment product ...
, and was notable for its extremely fast compilation. Turbo Pascal, and the later but similar
Turbo C
Turbo C is a discontinued integrated development environment (IDE) and compiler for the C programming language from Borland. First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, compr ...
, made Borland a leader in PC-based development.
For versions 6 and 7 (last), both a lower-priced Turbo Pascal and more expensive Borland Pascal were produced; Borland Pascal was more oriented toward professional software development, with more libraries and standard library source code. The name Borland Pascal is also used more generically for Borland's dialect of the Pascal programming language, significantly different from Standard Pascal.
Borland has released three old versions of Turbo Pascal free of charge because of their historical interest: the original Turbo Pascal (now known as 1.0), and versions 3.02 and 5.5 for DOS.
History
Philippe Kahn
Philippe Kahn (born March 16, 1952) is an engineer, entrepreneur and founder of four technology companies: Borland, Starfish Software, LightSurf Technologies, and Fullpower Technologies. Kahn is credited with creating the first camera phone, ...
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
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
using a
text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be us ...
; the source code was then compiled into
object code
In computing, object code or object module is the product of a compiler.
In a general sense object code is a sequence of statements or instructions in a computer language, usually a machine code language (i.e., binary) or an intermediate langua ...
(often requiring multiple passes), and a
linker
Linker or linkers may refer to:
Computing
* Linker (computing), a computer program that takes one or more object files generated by a compiler or generated by an assembler and links them with libraries, generating an executable program or shar ...
combined object code with runtime libraries to produce an executable program.
In the early IBM PC market (1981–1983) the major
programming tool
A programming tool or software development tool is a computer program that software developers use to create, debug, maintain, or otherwise support other programs and applications. The term usually refers to relatively simple programs, that can b ...
vendors all made compilers that worked in a similar fashion. For example, the
Microsoft Pascal
Microsoft Pascal is a discontinued implementation of the Pascal programming language developed by the Microsoft Corporation for compiling programs for running on its MS-DOS and Xenix operating systems and, in later versions, on OS/2 (like many oth ...
system consisted of two compiler passes and a final linking pass (which could take minutes on systems with only floppy disks for secondary storage, although programs were very much smaller than they are today). This process was less resource-intensive than the later
integrated development environment
An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
(IDE). 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 package all these functions in an integrated programming toolkit designed to have much better performance and resource utilisation than the usual professional development tools, and charge a low price for a package integrating a custom text editor, compiler, and all functionality need to produce executable programs. The program was sold by direct mail order for , without going through established sales channels (retailers or resellers).
The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the
Nascom
The Nascom 1 and 2 were single-board computer kits issued in the United Kingdom in 1977 and 1979, respectively, based on the Zilog Z80 and including a keyboard and video interface, a serial port that could be used to store data on a tape cassette ...
microcomputer in 1981 by
Anders Hejlsberg
Anders Hejlsberg (, born 2 December 1960) is a Danish software engineer who co-designed several programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Mic ...
. Borland licensed Hejlsberg's "PolyPascal" compiler core (''Poly Data'' was the name of Hejlsberg's company in Denmark), and added the user interface and editor. Anders Hejlsberg 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
Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracle ...
.
The compiler was first released as Compas Pascal for
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
, and then released on 20 November 1983 as Turbo Pascal for CP/M (including the
Apple II
The Apple II (stylized as ) is an 8-bit home computer and one of the world's first highly successful mass-produced microcomputer products. It was designed primarily by Steve Wozniak; Jerry Manock developed the design of Apple II's foam-m ...
computer when fitted with a
Z-80 SoftCard
The Z-80 SoftCard is a plug-in Apple II processor card developed by Microsoft to turn the computer into a CP/M system based upon the Zilog Z80 central processing unit (CPU). Becoming the most popular CP/M platform and Microsoft's top revenue sou ...
, effectively converting the
6502
The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small te ...
-based Apple into a CP/M machine, the Commodore 64 with CP/M cartridge, and the later
DEC Rainbow
The Rainbow 100 is a microcomputer introduced by Digital Equipment Corporation (DEC) in 1982. This desktop unit had a monitor similar to the VT220 and a dual-CPU box with both Zilog Z80 and Intel 8088 CPUs.
The Rainbow 100 was a triple-use mac ...
), CP/M-86, and DOS machines. On its launch in the
United States
The United States of America (U.S.A. or USA), commonly known as the United States (U.S. or US) or America, is a country primarily located in North America. It consists of 50 states, a federal district, five major unincorporated territorie ...
market, Turbo Pascal retailed for , a very low price for a compiler at the time. The integrated Pascal compiler was of good quality compared to other Pascal products of the time.
The
Turbo
In an internal combustion engine, a turbocharger (often called a turbo) is a forced induction device that is powered by the flow of exhaust gases. It uses this energy to compress the intake gas, forcing more air into the engine in order to pro ...
name alluded to the speed of compiling and of the executables produced. 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
In computer programming, a one-pass compiler is a compiler that passes through the parts of each compilation unit only once, immediately translating each part into its final machine code. This is in contrast to a multi-pass compiler which convert ...
written in
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
. Compiling was much faster than compilers for other languages (even Borland's own later compilers for C), and other Pascal compilers, and programmer time was also saved since the program could be compiled and run from the IDE. The execution speed of these
COM
Com or COM may refer to:
Computing
* COM (hardware interface), a serial port interface on IBM PC-compatible computers
* COM file, or .com file, short for "command", a file extension for an executable file in MS-DOS
* .com, an Internet top-level d ...
-format programs was a revelation for developers whose only prior experience programming microcomputers was with interpreted BASIC or
UCSD Pascal
UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UCS ...
, which compiled to
p-code
Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software Interpreter (computing), interpreter. Unlike Human-readable code, human-readable source code, bytecodes are compact nume ...
which was then interpreted at runtime.
Unlike some other development tools, Turbo Pascal disks had no
copy protection
Copy protection, also known as content protection, copy prevention and copy restriction, describes measures to enforce copyright by preventing the reproduction of software, films, music, and other media.
Copy protection is most commonly found on ...
. Turbo Pascal came with the "Book License": "You must treat this software ''just like a book'' ... tmay be used by any number of people ... may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another."
Reception
Jerry Pournelle
Jerry Eugene Pournelle (; August 7, 1933 – September 8, 2017) was an American scientist in the area of operations research and human factors research, a science fiction writer, essayist, journalist, and one of the first bloggers. In the 1960s ...
of ''Byte'' magazine wrote in February 1984 that Turbo Pascal "comes close to what I think the computer industry is headed for: well documented, standard, plenty of good features, and a reasonable price". Pournelle disliked the requirement to buy another license to distribute binaries, but noted that "it turns out not to be a lot more. Borland only wants another " more than the base price, and that "my first impression of Turbo is that it's probably worth . It looks to do everything MT+ ''with the Speed Programming Package'' does, and maybe even do it faster and better". He reported in July that, according to Kahn, IBM had refused to resell Turbo Pascal unless the price was at least ; Pournelle noted that "Turbo is much better than the Pascal IBM sells", and unlike the latter was compatible with the
IBM PCjr
The IBM PCjr (pronounced "PC junior") was a home computer produced and marketed by IBM from March 1984 to May 1985, intended as a lower-cost variant of the IBM PC with hardware capabilities better suited for video games, in order to compete mor ...
. Three ''Byte'' reviewers praised Turbo Pascal in the same issue. One called the DOS version "without doubt, the best software value I have ever purchased", and another called the CP/M version "an excellent product ... orlanddeserves praise for this high-value product". The third stated that it was "not a good compiler for developing massive applications", but added that it was greatly superior to
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
, the programming language usually associated with home computers at the time. He concluded that Turbo Pascal was "a bargain that shouldn't be passed up".
Despite finding what it described as "a serious bug" in version 3.0, and decreased compatibility with
PC clone
IBM PC compatible computers are similar to the original IBM PC, XT, and AT, all from computer giant IBM, that are able to use the same software and expansion cards. Such computers were referred to as PC clones, IBM clones or IBM PC clones. ...
s, the magazine in February 1986 stated that "it is hard to avoid recommending Turbo to anyone who wants to program in Pascal", citing improved speed and graphic routines. When reviewing four other Pascal compilers in December 1986, ''Byte'' described Turbo Pascal as "practical and attractive to programmers at all levels of expertise".
Bruce Webster
Bruce F. Webster is an American academic and software engineer. He is currently a principal at Bruce F. Webster & Associates and an adjunct professor in computer science at Brigham Young University.
Early life and education
Webster studied ...
also praised the language in the magazine, stating in August 1985 that Turbo Pascal "is best known for its small size, incredible compile speeds, and fast execution times". He noted that the software's quality and low price had been especially surprising after the " JRT Pascal fiasco", and stated that even at the new higher price, version 3.0 was "probably still the best software deal on the market".
''
PC Magazine
''PC Magazine'' (shortened as ''PCMag'') is an American computer magazine published by Ziff Davis. A print edition was published from 1982 to January 2009. Publication of online editions started in late 1994 and have continued to the present d ...
'' was similarly complimentary in November 1984, stating that "nothing like Turbo Pascal has ever existed for PC-DOS before". It praised the software's low price, speed, unusually good documentation for a compiler, and noted the existence of many utilities from other companies that hoped to benefit from Turbo Pascal's popularity. The review stated that the IDE that simplified the edit-compile-run-debug loop made Turbo Pascal accessible to new programmers like BASIC.
''Byte'' in 1989 listed Turbo C and Turbo Pascal as among the "Distinction" winners of the Byte Awards. Citing their user interface and continued emphasis on speed, the magazine stated that "for rapid prototyping there's not much better". In the same issue Pournelle again praised version 4.0 and 5.0 of Turbo Pascal. Citing ''
Anacreon
Anacreon (; grc-gre, Ἀνακρέων ὁ Τήϊος; BC) was a Greek lyric poet, notable for his drinking songs and erotic poems. Later Greeks included him in the canonical list of Nine Lyric Poets. Anacreon wrote all of his poetry in the ...
'' as "a good example of how complex a program you can write in Pascal", and the many libraries available from Borland and other developers, he wrote, "I am more and more convinced that Turbo Pascal is the programming language of choice for people who are more interested in ''what'' they want the machine to do than in how to make that happen. Turbo Pascal may be neither as elegant nor as portable as C, but it's sure less obscure. I think it may well be the language for the rest of us".
Borland sold about 250,000 copies of Turbo Pascal in two years, which Webster described as "an amazing figure for a computer language". He reported six months later that the figure had risen to "more than 400,000 copies in a marketplace that had been estimated as having only 30,000 potential buyers".
Bill Gates
William Henry Gates III (born October 28, 1955) is an American business magnate and philanthropist. He is a co-founder of Microsoft, along with his late childhood friend Paul Allen. During his career at Microsoft, Gates held the positions ...
saw the success of Turbo Pascal in very personal terms, and "couldn't understand why icrosoft'sstuff was so slow. He would bring in Greg Whittenrogramming director of Microsoft languagesand yell at him for half an hour". He could not understand why Kahn had been able to beat an established competitor like Microsoft."
Successors
By 1995 Borland had dropped Turbo/Borland Pascal and replaced it with the
rapid application development
Rapid application development (RAD), also called rapid application building (RAB), is both a general term for adaptive software development approaches, and the name for James Martin's method of rapid development. In general, RAD approaches to ...
(RAD) environment
Borland Delphi
Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, ...
, based on Object Pascal. The 32- and 64-
bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
Delphi versions still support the more portable Pascal enhancements of the earlier products (i.e. those that are not specific to 16-bit code) including the earlier static object model. This language backwards compatibility means much old Turbo Pascal code can still be compiled and run in a modern environment today.
Other suppliers have produced software development tools compatible with Turbo Pascal. The best-known are
Free Pascal
Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, witexception clausesthat allow static linking against it ...
case-sensitive In computers, case sensitivity defines whether uppercase and lowercase letters are treated as distinct (case-sensitive) or equivalent (case-insensitive). For instance, when users interested in learning about dogs search an e-book, "dog" and "Dog" a ...
.
* Historically, Pascal comments are enclosed , or (* left parenthesis/asterisk and asterisk/right parenthesis pairs *), and these can span any number of lines. Later versions of Borland Pascal also supported C++-style comments // preceded by two forward slashes , which finish at the end of the line.
* The syntax for the statement case is more flexible than standard Pascal.
* Sets may only have up to 256 (28) members.
* The standard Pascal String preceded by a length byte is supported, and takes a fixed amount of storage; later versions added a more flexible null-terminated type, calling the older type "short string". Older source code which handles strings in non-standard ways (e.g., directly manipulating the length byte like S =14 to truncate a string) must either have its strings declared as short strings, or be rewritten.
This is the classic
Hello world program
''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses
''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the ''Norwich C ...
in Turbo Pascal:
program HelloWorld;
begin
WriteLn('Hello World')
end.
This asks for a name and writes it back to the screen a hundred times:
program WriteName;
var
i : Integer;
Name : String;
begin
Write('Please tell me your name: ');
ReadLn(Name);
for i := 1 to 100 do
begin
WriteLn('Hello ', Name)
end;
readln;
end.
Features
Assembly language
While all versions of Turbo Pascal could include inline
machine code
In computer programming, machine code is any low-level programming language, consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). Each instruction causes the CPU to perform a very ...
, starting with version 6 it was possible to integrate
assembly language
In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
within Pascal source code.
Support for the various 8086 memory models was provided by inline assembly, compiler options, and language extensions such as the "absolute" keyword. The
Turbo Assembler
Turbo Assembler (sometimes shortened to the name of the executable, TASM) is an assembler for software development published by Borland in 1989. It runs on and produces code for 16- or 32-bit x86 MS-DOS and compatible on Microsoft Windows. It ...
, TASM, a standard x86 assembler independent of TP, and source-compatible with the widely used
Microsoft Macro Assembler
The Microsoft Macro Assembler (MASM) is an x86 assembler that uses the Intel syntax for MS-DOS and Microsoft Windows. Beginning with MASM 8.0, there are two versions of the assembler: One for 16-bit & 32-bit assembly sources, and another (ML64) fo ...
MASM, was supplied with the enhanced "Borland Pascal" versions.
Debugging and profiling
The IDE provided several debugging facilities, including single stepping, examination and changing of variables, and conditional breakpoints. In later versions assembly-language blocks could be stepped through. The user could add
breakpoint
In software development, a breakpoint is an intentional stopping or pausing place in a program, put in place for debugging purposes. It is also sometimes simply referred to as a pause.
More generally, a breakpoint is a means of acquiring knowle ...
s on variables and registers in an IDE window. Programs using
IBM PC
The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
graphics mode could flip between graphics and text mode automatically or manually, or display both on two screens. For cases where the relatively simple debugging facilities of the IDE were insufficient, Turbopower Software produced a more powerful debugger, T-Debug. The same company produced Turbo Analyst and Overlay Manager for Turbo Pascal. T-Debug was later updated for Turbo Pascal 4, but discontinued with the release of Borland's
Turbo Debugger
Turbo Debugger (TD) is a machine-level debugger for DOS executables, intended mainly for debugging Borland Turbo Pascal, and later Turbo C programs, sold by Borland. It is a full-screen debugger displaying both Turbo Pascal or Turbo C source and c ...
(TD), which also allowed some hardware intervention on computers equipped with the new
80386
The Intel 386, originally released as 80386 and later renamed i386, is a 32-bit microprocessor introduced in 1985. The first versions had 275,000 transistorsprofiler that reported on the time spent in each part of the program to assist
program optimisation
In computer science, program optimization, code optimization, or software optimization, is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be o ...
by finding bottlenecks. The books included with Borland Pascal had detailed descriptions of the
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
assembler language, including the number of clock cycles required by each instruction. Development and debugging could be carried out entirely within the IDE unless the advanced debugging facilities of Turbopower T-Debug, and later TD, were required.
Later versions also supported remote debugging via an
RS-232
In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such a ...
communication cable.
Units
Over the years, Borland enhanced not only the IDE, but also extended the programming language. A development system based on ISO standard Pascal requires implementation-specific extensions for the development of real-world applications on the platforms they target. Standard Pascal is designed to be platform-independent, so prescribes no low-level access to hardware- or operating system-dependent facilities. Standard Pascal also does not prescribe how a large program should be split into separate compilation units. From version 4, Turbo Pascal adopted the concept of ''
units
Unit may refer to:
Arts and entertainment
* UNIT, a fictional military organization in the science fiction television series ''Doctor Who''
* Unit of action, a discrete piece of action (or beat) in a theatrical presentation
Music
* Unit (album), ...
'' from
UCSD Pascal
UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UCS ...
. Units were used as external function libraries, like the object files used in other languages such as FORTRAN or C.
For example, the line uses crt; in a program included the unit called crt; the uses is the mechanism for using other compilation units. interface and implementation were the keywords used to specify, within the unit, what was (and what was not) visible outside the unit. This is similar to the public and private keywords in other languages such as
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
and
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
.
Units in Borland's Pascal were similar to
Modula-2
Modula-2 is a structured, procedural programming language developed between 1977 and 1985/8 by Niklaus Wirth at ETH Zurich. It was created as the language for the operating system and application software of the Lilith personal workstation. It w ...
's separate compilation system. In 1987, when Turbo Pascal 4 was released, Modula-2 was making inroads as an educational language which could replace Pascal. Borland, in fact, had a Turbo Modula-2 compiler, but only released it on CP/M (its user interface was almost identical to that of Turbo Pascal 1–3) with little marketing. A much improved DOS version was developed, but as Borland was unwilling to publish the results itself, the authors including Niels Jensen bought the rights and formed Jensen & Partners International to publish it as JPI TopSpeed Modula-2. Instead Borland chose to implement separate compilation in their established Pascal product.
Separate compilation was not part of the standard Pascal language, but was already available in
UCSD Pascal
UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UCS ...
, which was very popular on 8-bit machines. Turbo Pascal syntax for units appears to have been borrowed from UCSD Pascal. Earlier versions of Turbo Pascal, designed for computers with limited resources, supported a "chain and execute" system of dynamic linking for separately compiled objects, similar to the system widely used in BASIC. Also, the language had a statement to include separate source code in a program when necessary, and overlaying was supported from TP3, but, as with overlays, chained objects had to fit into the original (limited) program memory space. As computing and storage facilities advanced, the ability to generate large EXE files was added to Turbo Pascal, with the ability to statically link and collectively load separately compiled objects.
The .TPU files output by compiling a Turbo Pascal unit are tightly linked to the internal structures of the compiler, rather than standard .OBJ linkable files. This improved compilation and linkage times, but meant that .TPU files could not be linked with the output of other languages or even used with different releases of Turbo Pascal unless recompiled from source.
Object-oriented programming
From version 5.5 some
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pr ...
features were introduced: classes, inheritance, constructors and destructors. The IDE was already augmented with an object browser interface showing relations between objects and methods and allowing programmers to navigate the modules easily. Borland called its language ''
Object Pascal
Object Pascal is an extension to the programming language Pascal (programming language), Pascal that provides object-oriented programming (OOP) features such as Class (computer programming), classes and Method (computer programming), methods.
...
'', which was greatly extended to become the language underlying
Delphi
Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracle ...
(which has two separate OOP systems).
The name "Object Pascal" originated with the Pascal extensions developed by
Apple Computer
Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
to program its
Lisa Lisa or LISA may refer to:
People
People with the mononym
* Lisa Lisa (born 1967), American actress and lead singer of the Cult Jam
* Lisa (Japanese musician, born 1974), stylized "LISA", Japanese singer and producer
* Lisa Komine (born 1978), J ...
and
Macintosh
The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
computers. Pascal originator
Niklaus Wirth
Niklaus Emil Wirth (born 15 February 1934) is a Swiss computer scientist. He has designed several programming languages, including Pascal (programming language), Pascal, and pioneered several classic topics in software engineering. In 1984, he w ...
consulted in developing these extensions, which built upon the record type already present in Pascal.
Issue with CRT unit on fast processors
Several versions of Turbo Pascal, including the latest version 7, include a CRT unit used by many fullscreen text mode applications. This unit contains code in its initialization section to determine the CPU speed and
calibrate
In measurement technology and metrology, calibration is the comparison of measurement values delivered by a device under test with those of a calibration standard of known accuracy. Such a standard could be another measurement device of known a ...
delay loops. This code fails on processors with a speed greater than about 200
MHz
The hertz (symbol: Hz) is the unit of frequency in the International System of Units (SI), equivalent to one event (or cycle) per second. The hertz is an SI derived unit whose expression in terms of SI base units is s−1, meaning that one he ...
and aborts immediately with a "Runtime Error 200" message. (the error code 200 had nothing to do with the CPU speed 200 MHz). This is caused because a loop runs to count the number of times it can iterate in a fixed time, as measured by the
real-time clock
A real-time clock (RTC) is an electronic device (most often in the form of an integrated circuit) that measures the passage of time.
Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are pr ...
. When Turbo Pascal was developed it ran on machines with CPUs running at 2.5 to 8 MHz, and little thought was given to the possibility of vastly higher speeds, so from about 200 MHz enough iterations can be run to overflow the 16-bit counter. Web page discussing the cause of the error and various solutions. A
patch
Patch or Patches may refer to:
Arts, entertainment and media
* Patch Johnson, a fictional character from ''Days of Our Lives''
* Patch (''My Little Pony''), a toy
* "Patches" (Dickey Lee song), 1962
* "Patches" (Chairmen of the Board song) ...
was produced when machines became too fast for the original method, but failed as processor speeds increased yet further, and was superseded by others.
Programs subject to this error can be recompiled from source code with a compiler patched to eliminate the error (using a TURBO.TPL itself compiled with a corrected CRT unit) or, if source code is not available, executables can be patched by a tool named TPPATCH or equivalent, or by loading a
Terminate and Stay Resident
A terminate-and-stay-resident program (commonly TSR) is a computer program running under DOS that uses a system call to return control to DOS as though it has finished, but remains in computer memory so it can be reactivated later. This technique ...
program loaded before running the faulty program.
There are also patches to the TP7 compiler itself, thus if the Pascal source is available, a new compilation's code will work without the compiled code having to be patched. If the source code is available, porting to libraries without CPU clock speed dependency is a solution too.
Floating point
There were several
floating point
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be ...
types, including single (the 4-byte
EEE 754 EEE may refer to:
Business
* ''Electronic Equipment Engineering'', a defunct American trade magazine
* Embrace, extend and extinguish, an anti-competitive Microsoft business strategy
* Coca-Cola Hellenic Bottling Company (trades as EEE)
*Union of ...
representation) double (the 8-byte IEEE 754 representation), extended (a 10-byte IEEE 754 representation used mostly internally by numeric
coprocessor
A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography o ...
s) and Real (a 6-byte representation).
In the early days, Real was the most popular. Most PCs of the era did not have a floating point
coprocessor
A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography o ...
so all FP had to be done in software. Borland's own FP algorithms on Real were quicker than using the other types, though its library also
emulated
In computing, an emulator is Computer hardware, hardware or software that enables one computer system (called the ''host'') to behave like another computer system (called the ''guest''). An emulator typically enables the host system to run so ...
the other types in software.
Versions
CP/M and DOS versions
Version 1
Version 1 was a basic all-in-one system, working in memory and producing
.COM
The domain name .com is a top-level domain (TLD) in the Domain Name System (DNS) of the Internet. Added at the beginning of 1985, its name is derived from the word ''commercial'', indicating its original intended purpose for domains registere ...
executable files for DOS and CP/M, and equivalent .CMD executables for CP/M-86 (totally different from .CMD batch files later used in 32-bit Microsoft Windows). Source code files were limited to 64 KB to simplify the IDE, and DOS .COM files were limited to 64 KB each of code, stack and global (static) variables. Program source code could be extended by using the include facility if the source code exceeded the memory limit of the editor.
There were different versions of Turbo Pascal for computers running DOS, CP/M, or CP/M-86 with 64 KB of memory and at least one floppy disk drive. The CP/M version could run on the many CP/M machines of the time with
Z80
The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples were ...
processors, or an Apple II with Z80 card. The DOS and CP/M-86 versions ran on the many
8086
The 8086 (also called iAPX 86) is a 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-bit data bus (allowi ...
and
8088
The Intel 8088 ("''eighty-eighty-eight''", also called iAPX 88) microprocessor is a variant of the Intel 8086. Introduced on June 1, 1979, the 8088 has an eight-bit external data bus instead of the 16-bit bus of the 8086. The 16-bit registers and ...
machines which became available, including the IBM PC. The installer, lister, and compiler with its IDE, and the source code for a simple spreadsheet program called MicroCalc written by Philippe Kahn as a demonstration, would fit on a single floppy disc. A disc copy without MicroCalc would accommodate the source code and compiled executable of a reasonable-sized program—as it was common at the time for users to have only a single floppy drive as
mass storage
In computing, mass storage refers to the storage of large amounts of data in a persisting and machine-readable fashion. In general, the term is used as large in relation to contemporaneous hard disk drives, but it has been used large in relati ...
, it was a great convenience to be able to fit both the compiler and the program being written on a single disc, avoiding endless disc swapping.
The
architecture
Architecture is the art and technique of designing and building, as distinguished from the skills associated with construction. It is both the process and the product of sketching, conceiving, planning, designing, and constructing building ...
of the various machines running MS-DOS additionally limited the maximum user memory to under 1 MB (e.g., machines hardware-compatible with the IBM PC were limited to 640 KB).
The Turbo Pascal IDE was very advanced for its day. It was able to perform well and compile very fast with the amount of RAM on a typical home computer. The IDE was simple and intuitive to use, and had a well-organized system of menus. Early versions of the editor used
WordStar
WordStar is a word processor application for microcomputers. It was published by MicroPro International and originally written for the CP/M-80 operating system, and later written also for MS-DOS and other 16-bit PC OSes. Rob Barnaby was the sol ...
key functions, which was the
de facto
''De facto'' ( ; , "in fact") describes practices that exist in reality, whether or not they are officially recognized by laws or other formal norms. It is commonly used to refer to what happens in practice, in contrast with ''de jure'' ("by la ...
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 (conventionally used to display help). Many definitions included example code.
In addition to standard executable programs, the compiler could generate
Terminate and Stay Resident
A terminate-and-stay-resident program (commonly TSR) is a computer program running under DOS that uses a system call to return control to DOS as though it has finished, but remains in computer memory so it can be reactivated later. This technique ...
(TSR) programs, small utilities that stayed in memory and let the computer do other tasks—running several programs at the same time, multitasking, was not otherwise available. Borland itself produced a small application suite called
Sidekick
A sidekick is a slang expression for a close companion or colleague (not necessarily in fiction) who is, or is generally regarded as, subordinate to the one they accompany.
Some well-known fictional sidekicks are Don Quixote's Sancho Panza, ...
that was a TSR letting the user keep a diary, notes, and so forth.
Version 2
Version 2, released a few months later on 17 April 1984, was an incremental improvement to the original Turbo Pascal, to the point that the reference manual was at first identical to version 1's, down to having 1983 as the copyright date on some of the compiler's sample output, but had a separate "Addendum to Reference Manual: Version 2.0 and 8087 Supplement" manual with separate page numbering.Turbo Pascal version 2.0 /ref> Additions included an overlay system, where separate overlay procedures would be automatically swapped from disk into a reserved space in memory. This memory was part of the 64kB RAM used by the program's code, and was automatically the size of the largest overlay procedure. Overlay procedures could include overlay sections themselves, but unless a RAM disk was used, the resulting disk swapping could be slow. 2.0 also added the Dispose procedure to manage the heap, allowing individual dynamic variables to be freed, as an alternative to the more primitive 'Mark/Release' system and increased compatibility with WordStar commands plus use of the numeric keypad on the IBM PC and compatibles. Such PCs also had new text window and CGA graphics mode commands as well as being able to use the PC's speaker for tones. Finally, DOS and CP/M-86 machines with an
8087
The Intel 8087, announced in 1980, was the first x87 floating-point coprocessor for the 8086 line of microprocessors.
The purpose of the 8087 was to speed up computations for floating-point arithmetic, such as addition, subtraction, multi ...
maths coprocessor (or later compatible) had an alternative TURBO-87 compiler available to purchase. It supported the 8087's ''long real'' data types with a range of 1.67E-307 to 1.67E+308 to 14 significant figure precision but with a much greater processing speed. The manual notes that although source code for the Turbo Pascal's software real data types offering a range of 1E-63 to 1E+63 to 11 significant figures, these were incompatible at a binary level: as well as having a much larger range, the software reals took six bytes in memory and the 8087 ones were eight.
Like version 1, version 2 for CP/M-80 only ran on Z80-based
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
turtle graphics
In computer graphics, turtle graphics are vector graphics using a relative cursor (the "turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language.
Overview
The turtle has three attribute ...
. In addition to the default software real numbers and 8087 edition of the compiler, Borland also offered a BCD version (TURBOBCD) which offered the same numeric range as real data types but to 18 significant figures.
DOS versions
Version 4
Released on 20 November 1987, Version 4 was a total rewrite, with both
look and feel
In software design, the look and feel of a graphical user interface comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces (the "look"), as well as the behavior of dynamic elements such as buttons, boxes ...
and internal operation much changed. The compiler generated executables in
.EXE
.exe is a common filename extension denoting an executable file (the main execution point of a computer program) for Microsoft Windows, OS/2, and DOS.
File formats
There are numerous file formats which may be used by a file with a extensi ...
format under DOS, rather than the simpler but more restricted .COM executables. The by-then-obsolete CP/M and CP/M-86 operating system versions were dropped when Turbo Pascal was rewritten. Version 4 introduced units, and a full-screen text user interface with pull-down menus; earlier versions had a text-based menu screen and a separate full-screen editor. (
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
was still very experimental when the first version was released, and even
mice
A mouse ( : mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus' ...
were rare.) An add on package, the Turbo Pascal Graphix Toolbox, was available for Turbo Pascal V4.
Version 5.0
Colour displays were replacing monochrome; Turbo Pascal version 5.0, released 24 August 24, 1988, introduced blue as the editor's default background color, used by Borland's DOS compilers until the end of this product line in the mid-1990s. Later versions came in two packages with the same version number: a less expensive "Turbo" package, and a "Borland" package with enhanced capabilities and more add-ons.
Version 5.5
This version, released on 2 May 1989, introduced
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pr ...
features for the Pascal language, including concept of classes, static and dynamic objects, constructors and destructors and inheritance, which would become the basis for the Object Pascal found in Borland Delphi. The IDE uses the default blue colour scheme that would also be used on later Borland Turbo products. Other changes to IDE include the addition of a step-by-step debugger to the IDE, and context-sensitive help with description of all built-in functions, and the ability to copying code fragments from help to edit window.
Version 6.0
Version 6 was released on 23 October 1990. Changes from 5.5 include: the addition of inline assembly, the addition of the Turbo Vision library, mouse support, clipboard for text manipulations,
multiple document interface
A multiple-document interface (MDI) is a graphical user interface in which multiple windows reside under a single parent window. Such systems often allow child windows to embed other windows inside them as well, creating complex nested hierarchies ...
supporting up to nine edit windows, and debugger support for breakpoints and watches.
Version 7.0
Version 7 was released on 27 October 1992. Changes from 6.0 include support for the creation of DOS and Windows executables and Windows DLLs, and syntax highlighting.
Turbo Pascal for Windows
Two versions named "Turbo Pascal for Windows" (TPW), for
Windows 3.x Windows 3.x means either of, or all of the following versions of Microsoft Windows:
* Windows 3.0
* Windows 3.1x
Windows 3.1 is a major release of Microsoft Windows. It was released to manufacturing on April 6, 1992, as a successor to Windo ...
, were released: TPW 1.0, based on Turbo Pascal 6 but released about 2 years later, and 1.5, released after Turbo Pascal 7; they were succeeded by Borland Pascal 7, which had Windows support. The Windows compiler in Pascal 7 was titled ''Borland Pascal for Windows''.
Both versions built Windows-compatible programs, and featured a Windows-based IDE, as opposed to the DOS-based IDE in Turbo Pascal. The IDE and editor commands conformed to the Microsoft Windows user interface guidelines instead of the classic TP user interface. The support for Windows programs required the ObjectWindows library, similar but not identical to that for the first release of
Borland C++
Borland C++ is a C and C++ IDE (integrated development environment) for MS-DOS and Microsoft Windows. It was the successor to Turbo C++ and included a better debugger, the Turbo Debugger, which was written in protected mode DOS.
Libraries
O ...
, and radically different from the earlier DOS Turbo Vision environment. Turbo Pascal was superseded for the Windows platform by
Delphi
Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracle ...
; the Delphi compiler can produce console programs and
graphical user interface
The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
(GUI) applications, so that using Turbo and Borland Pascal became unnecessary.
Turbo Pascal for Macintosh
Borland released ''Turbo Pascal for Macintosh'' in 1986. Much like versions 1 to 3 for other operating systems, it was written in compact assembly language and had a very powerful IDE, but no good debugger. Borland did not support this product very well, although they issued a version 1.1, patched to run on the 32-bit
Macintosh II
The Macintosh II is a personal computer designed, manufactured, and sold by Apple Computer from March 1987 to January 1990. Based on the Motorola 68020 32-bit CPU, it is the first Macintosh supporting color graphics. When introduced, a basic sys ...
. Macintosh support was dropped soon after.
Freeware releases
Borland
Borland Software Corporation was a computer technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad and Philippe Kahn. Its main business was the development and sale of software development and software deployment product ...
released several versions of Turbo Pascal as
freeware
Freeware is software, most often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for the f ...
after they became "antique software" (
abandonware
Abandonware is a product, typically software, ignored by its owner and manufacturer, and for which no official support is available.
Within an intellectual rights contextual background, abandonware is a software (or hardware) sub-case of the g ...
), with 1.0 for DOS on 1 February 2000, 3.02 on 10 February 2000, 5.5 on 21 February 2002, Turbo Pascal 7.01 French version in year 2000. Most of the downloads are still available on the successor website of
Embarcadero Technologies
Embarcadero Technologies, Inc. is an American computer software company that develops, manufactures, licenses, and supports products and services related to software through several product divisions. It was founded in 1993, went public in 2000, ...
.
Uses
Borland Pascal is still taught in some countries at secondary, sixth form and university levels. It is taught at colleges and universities in Costa Rica, Turkey, Iraq, Germany, Russian Federation, USA and at secondary schools in Argentina, Belgium, Bulgaria, Canada, Costa Rica, Croatia, France, Hungary, Italy, Jamaica, Libya, Moldova, Romania, Serbia, Tunisia, Ukraine, Czech republic and Vietnam. It was the state-approved educational programming language for all South African secondary schools until 2002. Today it continues to be taught in some universities around the world as an introduction to computer programming, usually advancing to C or
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
or both.
Some lecturers prefer to use Borland Pascal 7 or Turbo Pascal 5.5 because of its simplicity in comparison to more modern IDEs such as
Microsoft Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such a ...
or Borland
JBuilder
JBuilder is a discontinued integrated development environment (IDE) for the programming language Java from Embarcadero Technologies. Originally developed by Borland, JBuilder was spun off with CodeGear which was eventually purchased by Embarcader ...
, so it introduces students unfamiliar with computing to common tasks such as using the keyboard and
keyboard shortcut
computing, a keyboard shortcut also known as hotkey is a series of one or several keys to quickly invoke a software program or perform a preprogrammed action. This action may be part of the standard functionality of the operating system or ...
s (TP 5.5 has no mouse support), familiarises them with DOS commands (which are largely the same as those of Microsoft Windows's command prompt), and lets them write programs without spending a lot of effort on getting the environment to work. TP 5.5 is available as a free download from Borland.
Delphi (software)
Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, ...
*
Free Pascal
Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, witexception clausesthat allow static linking against it ...