HOME

TheInfoList



OR:

Turbo Pascal is a software development system that includes a
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
and an
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE) for the programming language Pascal running on the
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s
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/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
,
CP/M-86 CP/M-86 is a discontinued 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 Re ...
, and
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
. It was originally developed by
Anders Hejlsberg Anders Hejlsberg (; ; born 2 December 1960) is a Denmark, 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 (programming lang ...
at
Borland Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
, and was notable for its very fast compiling. 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, com ...
, made Borland a leader in PC-based development tools. For versions 6 and 7 (the last two versions), both a lower-priced Turbo Pascal and more expensive Borland Pascal were produced; Borland Pascal was oriented more toward professional software development, with more
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
and standard library
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
. The name Borland Pascal is also used more generically for Borland's dialect of the language Pascal, 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, while Borland's French office released version 7.01 on its FTP.


History

Philippe Kahn Philippe Kahn (born March 16, 1952) is a French engineer, entrepreneur, and founder of four technology companies: Borland, Starfish Software, LightSurf Technologies, and Fullpower Technologies. Kahn is credited with creating the first camera ...
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 or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
using a
text editor A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
; the source code was then compiled into
object code In computing, object code or object module is the product of an assembler or compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' ...
(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 is used to develop another computer program, usually by helping the developer manage computer files. For example, a programmer may use a tool called a source code editor ...
vendors all made compilers that 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, even though 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 Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(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 utilization than the usual professional development tools, and charge a low price for a package integrating a custom text editor, compiler, and all functionality needed 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 casset ...
microcomputer in 1981 by
Anders Hejlsberg Anders Hejlsberg (; ; born 2 December 1960) is a Denmark, 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 (programming lang ...
. 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 (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
. 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/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
, and then released on 20 November 1983 as Turbo Pascal for CP/M (including the
Apple II Apple II ("apple Roman numerals, two", stylized as Apple ][) is a series of microcomputers manufactured by Apple Computer, Inc. from 1977 to 1993. The Apple II (original), original Apple II model, which gave the series its name, was designed ...
fitted with a Z-80 SoftCard, effectively converting the MOS Technology 6502, 6502-based Apple into a CP/M machine, the Commodore 64 with CP/M cartridge, and the later DEC Rainbow), CP/M-86, and DOS machines. On its launch in the
United States The United States of America (USA), also known as the United States (U.S.) or America, is a country primarily located in North America. It is a federal republic of 50 U.S. state, states and a federal capital district, Washington, D.C. The 48 ...
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 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 processes each compilation unit only once, sequentially translating each source statement or declaration into something close to its final machine code. This is in contrast to a mul ...
written in
assembly language In computing, assembly language (alternatively 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 bet ...
. 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-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 (UC ...
, 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. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normal ...
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, is any measure to enforce copyright by preventing the reproduction of software, films, music, and other media. Copy protection is most commonly found on vid ...
. 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

Borland sold about 250,000 copies of Turbo Pascal in two years, which Bruce F. Webster of ''
Byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
'' 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".
Jerry Pournelle Jerry Eugene Pournelle (; August 7, 1933 – September 8, 2017) was an American scientist in the area of operations research and ergonomics, human factors research, a science fiction writer, essayist, journalist, and one of the first bloggers. ...
wrote in the magazine 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". He 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 " atop 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". Pournelle reported in July that Turbo 2.0's overlays " llowyou to write big programs". 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 reviewer said that because of dialect differences "Turbo is not really Pascal. But it's very useful". While cautioning that it was not suitable for developing very large applications, he concluded that Turbo Pascal "is well written, fun to use at times, and fast enough to make up for its few shortcomings ... it is a bargain that shouldn't be passed up". A second called the DOS version "without doubt, the best software value I have ever purchased", while a third said that Borland "deserves praise for" the "high-value" CP/M version. Also in July 1984, ''
Creative Computing ''Creative Computing'' was one of the earliest magazines covering the microcomputer revolution. Published from October 1974 until December 1985, the magazine covered the spectrum of hobbyist/home/personal computing in a more accessible format t ...
'' favorably compared Turbo Pascal to what the reviewer described as mediocre and expensive Pascals from UCSD, IBM, and Microsoft. He reported converting code written in IBM Pascal in less than 30 minutes, and that "under IBM Pascal, the average program took two weeks to write. With Turbo Pascal, the average is now two days". While noting the .COM and 64 KB limitations, the reviewer approved of Turbo's close adherence to the Jensen and Wirth language standard. The documentation was, he wrote, of "above average readability" and superior to IBM Pascal's. "My only fear", the review concluded, was that "it is grossly underpriced, and I worry that people might fail to take it seriously". "Turbo Pascal is the Pascal to acquire", ''Computer Language'' in September said of version 2.0. Praising its speed, extensions including PC graphics and sound, documentation, ease of using overlays, and "highly standard syntax", the magazine recommended Turbo to both new and experienced programmers. ''
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 continues . Overview ''PC Mag ...
'' was similarly complimentary in November, stating that "nothing like Turbo Pascal has ever existed for PC-DOS before". It praised 2.0's low price, speed, stability, ease of implementing overlays, and unusually good documentation for a compiler, and noted the existence of many utilities for Turbo Pascal from other companies. The review stated that the IDE that simplified the edit-compile-run-debug loop made Turbo Pascal accessible, like BASIC, to new programmers. Pournelle in August 1985 called version 3.0 "a distinct improvement on the already impressive version 2" and said that the new book license "seems quite fair to me". He said that "Turbo Pascal has got to be the best value in languages on the market today", and that Borland led the industry in "delivering excellent products at reasonable costs". Webster also praised 3.0, 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 was especially surprising after the " JRT Pascal fiasco", and stated that even at the new higher price, it was "probably still the best software deal on the market". Despite finding what the magazine called "a serious bug" in 3.0, and decreased compatibility with
PC clone An IBM PC compatible is any personal computer that is hardware- and software-compatible with the IBM Personal Computer (IBM PC) and its subsequent models. Like the original IBM PC, an IBM PC–compatible computer uses an x86-based central pro ...
s, ''Byte'' 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, the magazine described Turbo Pascal 3.0 as "practical and attractive to programmers at all levels of expertise". Besides allowing applications larger than 64 KB, ''Byte'' in 1988 reported substantially faster compiling and executing for version 4.0, and that although it did not maintain previous versions' "almost total" backward compatibility, conversion was fast and easy. The reviewer concluded, "I highly recommend Turbo Pascal 4.0 as an addition to any programmer's software repertoire". ''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 ( BC) was an Ancient 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 ancient Ionic dialect. Like all early ...
'' as "a good example of how complex a program you can write in Pascal", and the many libraries from Borland and other developers, he wrote "I think it may well be the language for the rest of us". Scott MacGregor of Microsoft said that
Bill Gates William Henry Gates III (born October 28, 1955) is an American businessman and philanthropist. A pioneer of the microcomputer revolution of the 1970s and 1980s, he co-founded the software company Microsoft in 1975 with his childhood friend ...
"couldn't understand why our stuff was so slow" compared to Turbo Pascal. "He would bring in poor Greg Whitten rogramming director of Microsoft languagesand yell at him for half an hour" because their company was unable to defeat Kahn's small startup, MacGregor recalled.


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 Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
, based on Object Pascal. The 32- and
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, a ...
Delphi versions still support the more portable Pascal enhancements of the earlier products (i.e., those not specific to
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two ...
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 ...
and
Virtual Pascal Virtual Pascal is a freeware 32-bit Pascal programming language compiler, integrated development environment (IDE), and debugger for OS/2 and Microsoft Windows, with some limited Linux support. Virtual Pascal was developed by Vitaly Miryanov an ...
.


Syntax

* Pascal is not
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 ...
. * 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 A "Hello, World!" program is usually a simple computer program that emits (or displays) to the screen (often the Console application, console) a message similar to "Hello, World!". A small piece of code in most general-purpose programming languag ...
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 computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
, starting with version 6 it was possible to integrate
assembly language In computing, assembly language (alternatively 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 bet ...
within Pascal source code. Support for the various
x86 memory models In computing, the x86 memory models are a set of six different memory models of the x86 CPU operating in real mode which control how the segment registers are used and the default size of pointers. Memory segmentation Four registers are us ...
was provided by inline assembly, compiler options, and language extensions such as the "absolute" keyword. The
Turbo Assembler Turbo Assembler (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 compatibles for Microsoft Windows. It can be used with Borland's other language produc ...
, TASM, a standard x86 assembler independent of TP, and source-compatible with the widely used Microsoft Macro Assembler 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 computer program, program, put in place for debugging purposes. It is also sometimes simply referred to as a pause. More generally, a breakpoint is a means o ...
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 List of IBM Personal Computer models, IBM PC model line and the basis for the IBM PC compatible ''de facto'' standard. Released on ...
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 ...
(TD), which also allowed some hardware intervention on computers equipped with the new
80386 The Intel 386, originally released as the 80386 and later renamed i386, is the third-generation x86 architecture microprocessor from Intel. It was the first 32-bit processor in the line, making it a significant evolution in the x86 architect ...
processor. TD was usually supplied in conjunction with the Turbo Assembler and the Turbo Profiler, a code profiler that reported on the time spent in each part of the program to assist program optimisation 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, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
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 In engineering, debugging is the process of finding the root cause, workarounds, and possible fixes for bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, log file analysis, monitoring at the app ...
via an
RS-232 In telecommunications, RS-232 or Recommended Standard 232 is a standard introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such as a compu ...
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 compiling units. From version 4, Turbo Pascal adopted the concept of ''
units Unit may refer to: General measurement * Unit of measurement, a definite magnitude of a physical quantity, defined and adopted by convention or by law **International System of Units (SI), modern form of the metric system **English units, histo ...
'' 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 (UC ...
. 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 compiling 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++ and
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. 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 compiling 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, 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 compiling in their established Pascal product. Separate compiling 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 (UC ...
, 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 compiling and linking 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''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
features were introduced: classes,
inheritance Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
, 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. T ...
'', which was greatly extended to become the language underlying
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
(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 corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Computer Co ...
to program its
Lisa Lisa or LISA may refer to: People People with the mononym * Lisa (Japanese musician, born 1974), stylized "LISA" * Lisa, stagename of Japanese singer Lisa Komine (born 1978) * Lisa (South Korean singer) (born 1980) * Lisa (Japanese musician, b ...
and
Macintosh Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
computers. Pascal originator
Niklaus Wirth Niklaus Emil Wirth ( IPA: ) (15 February 1934 – 1 January 2024) was a Swiss computer scientist. He designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Tu ...
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 last version 7, include a unit named CRT, which was used by many fullscreen text-mode applications on a
CRT CRT or Crt most commonly refers to: * Cathode-ray tube, a display * Critical race theory, an academic framework of analysis CRT may also refer to: Law * Charitable remainder trust, United States * Civil Resolution Tribunal, Canada * Columbia ...
. 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 ...
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), often described as being equivalent to one event (or cycle) per second. The hertz is an SI derived unit whose formal expression in terms of SI base u ...
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, server (computing), servers and embedded ...
. 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 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 compiled with a corrected CRT unit) or, if source code is unavailable, executables can be patched by a tool named TPPATCH or equivalent, or by loading a
terminate-and-stay-resident program 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 techni ...
before running the faulty program. There are also patches to the TP7 compiler, thus if the Pascal source is available, a new compiling's code will work without the compiled code needing a patch. If the source code is available, porting to libraries without CPU clock speed dependency is a solution too.


Floating-point arithmetic

There were several
floating point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a signed sequence of a fixed number of digits in some base) multiplied by an integer power of that base. Numbers of this form ...
types, including single (the 4-byte EEE 754representation) 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 or ...
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 or ...
so all floating-point arithmetic had to be done in software. Borland's own floating-point algorithms on Real were quicker than using the other types, though its library also
emulated In computing, an emulator is 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 software or use perip ...
the other types in software.


Versions


CP/M and DOS versions


Version 1

Version 1, released on 20 November 1983, was a basic all-in-one system, working in memory and producing .COM 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 Zilog Z80 is an 8-bit microprocessor designed by Zilog that played an important role in the evolution of early personal computing. Launched in 1976, it was designed to be software-compatible with the Intel 8080, offering a compelling altern ...
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 (allo ...
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 ...
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 ''mass'' in ''mass storage'' is used to mean ''large'' in relation to contemporaneous hard disk drive ...
, 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 construction, constructi ...
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 discontinued word processor application for microcomputers. It was published by MicroPro International and originally written for the CP/M-80 operating system (OS), with later editions added for MS-DOS and other 16-bit computing, ...
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 (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 produced a small application suite called
Sidekick A sidekick is a close companion or colleague who is, or is generally regarded as, subordinate to those whom they accompany. Origins The first recorded use of the term dates from 1896. It is believed to have originated in pickpocket slang of ...
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. 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 floating-point coprocessor for the 8086 line of microprocessors. The purpose of the chip was to speed up floating-point arithmetic operations, such as addition, subtraction, multiplication, di ...
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. Version 2 for CP/M-80 only runs 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/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
machines.


Version 3

Version 3 was released on 17 September 1986. Turbo Pascal 3 supported
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. It is also a simple and didactic way of d ...
. In addition to the default software real numbers and 8087 edition of the compiler, Borland also offered a
binary-coded decimal In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used f ...
(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 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 Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
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 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. It also added debugger support for breakpoints and watches. 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''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
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 context-sensitive help with description of all built-in functions, and the ability to copy code fragments from the 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 Hierarchy#Nested hi ...
supporting up to nine edit windows.


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, 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
Object Windows Library The Object Windows Library (OWL) is a C++ object-oriented application framework designed to simplify desktop application development for Windows and (some releases) OS/2. OWL was introduced by Borland in 1991 and eventually deprecated in 1997 i ...
(OWL), similar but not identical to that for the first release of
Borland C++ Borland C++ was a C and C++ IDE (integrated development environment) released by Borland 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 mo ...
, 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 (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
; the Delphi compiler can produce console programs and
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
(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 ...
. Macintosh support was dropped soon after.


Freeware releases

Borland Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
released several versions of Turbo Pascal as
freeware Freeware is software, 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 free ...
after they became "antique software", 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 a U.S.-based 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 ...
.


See also

* Borland Graphics Interface *
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 ...


References


External links

*Borland International, Inc. Turbo Pascal page
DOS 7.0
*Inspire Corporation Turbo Pascal page

*Borland Software Corporation Turbo Pascal page

a description of the Turbo Pascal 3.0 compiler
Turbo Pascal Compiler Internals
, complete source code of a Turbo Pascal 7.0-compatible compiler

{{Authority control 1983 software Borland software CP/M software DOS software Classic Mac OS software Integrated development environments Object-oriented programming languages Pascal (programming language) compilers Assembly language software Articles with example Pascal code