• 2 [FAQ] mini-FAQ V1.99.3 - essential reading for those new to the newsg

    From Robert AH Prins@1:261/20.999 to All on Thu May 17 11:13:14 2012
    option is set to COMPILE TO DISK. When you compile, make or build
    your program then you will create the file XXX.EXE, where XXX is the
    name of your .PAS file.

    ----------------------------------------------------------------------
    Will Delphi V2/3/4/5/6/7/.net/D2005 do DOS programs as well as
    Windows?

    Delphi V2 and later are for Windows 9x and Windows NT/XP. They are
    not DOS products. They can create 32-bit console mode apps, but
    they will not create DOS apps.

    If you want DOS apps from a Delphi Product then Delphi V1 can do
    them with some work on the RTL. See

    http://www.pedt.demon.co.uk/usenet/

    DCC32 -cc program.pas
    is worth trying on some BP/TP programs mainly computational in
    nature.

    There is also wdosx, a winapi emulating dos-extender. Afaik this
    also works for 32-bits Delphi's. [MvdV]

    ----------------------------------------------------------------------
    Is there a Borland Pascal Mailing list?

    No, there is not.

    There is a mailing list for Virtual Pascal (see below) on Yahoo.
    Read access is here: http://tech.groups.yahoo.com/group/vpascal/
    The old Topica list is still readable at
    http://www.topica.com/lists/virtualpascal/read

    ----------------------------------------------------------------------
    Is it possible to 'decompile' Pascal EXEs or TPUs?

    No. Too much information is lost in the compiling process. For a
    more detailed explanation see Prof. Timo Salmi's FAQ.

    It is possible to get a *reasonable* disassembly to assembly
    language only

    - try http://www.hex-rays.com/idapro/

    The FLIRT technology that comes with IDA will identify most routines
    of the _original_ Borland RTLs. It will 'miss' interrupt routines,
    but due to its interactive nature, these can be added very easily.

    ----------------------------------------------------------------------
    What were the Borland Pascal Products?

    In essence, Borland Pascal was the 'professional' product, whilst
    the Turbo Pascals were 'hobbyist' products.

    Discontinued versions
    Turbo Pascal 7 (Dos)
    Turbo Pascal for Windows 1.5 (Win)
    Borland Pascal 7 (DOS, WIN 3.1, Pmode)

    Borland Pascal could do everything that both Turbo Pascals could
    do, plus:

    . Compile for 16 bit DOS Protected mode (less memory constraints)
    . Full Run Time Library Source code
    . Lots of assorted debugging and programming tools

    There was an update to TP and BP to v7.01, but this is no longer
    available. V7.01 still has VER70 defined. If you really want to
    pay big bucks for an old version, you might try here

    http://www.emsps.com/oldtools/borland.htm

    for the possibilities of obtaining a used copy of the various
    versions of the Pascal compilers produced by Borland. You may also
    find copies of BP7 for sale on Ebay at http://www.ebay.com/
    Needlessly to say, there are also other options...

    ----------------------------------------------------------------------
    Are there any freeware Pascal compilers?

    - FPC Pascal
    # Free Pascal, now (2010-11-12) at version 2.4.2, is a compiler for
    32-bit and 64-bit CPU architectures such as Intel x86, Amd64/x86_64,
    PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also
    supports the Motorola 680x0. The following operating systems are
    supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64,
    WinCE, OS/2, Netware (libc and classic) and MorphOS.

    It comes with a cross-platform Run-Time Library, many interfaces to
    existing libraries, and a large set of non-visual classes in the
    Free Component Library. Last but not least, a text-mode IDE exists
    on various platforms, and FPC comes with 1800 pages of documentation.

    The compiler is licensed under the GNU General Public License. The
    Run-Time code is licensed under a modified version of the Library
    General Public License, which allows to use it in a commercial
    application.

    Comes with full Pascal source and compiles itself.

    http://www.freepascal.org/

    - GNU Pascal

    GNU Pascal is a portable 32/64 bit compiler system. It supports the
    language of Borland Pascal V7 as well as ISO Standard Pascal, a
    large subset of ISO Extended Pascal and other extensions (see

    http://www.gnu-pascal.de/gpc/h-index.html

    GNU Pascal is part of the GNU family of compilers, runs on all
    platforms supported by GNU C, including DOS, OS/2 and MS-Windows
    9x/NT, Linux, *BSD and other Unix-compatible systems and can cross-
    compile between these platforms.

    Full C source and precompiled binaries for several platforms are
    available from:

    http://www.gnu-pascal.de/alpha/ (Sources)
    http://www.gnu-pascal.de/binary/ (Binaries)

    There is a GNU Pascal mailing list, gpc@gnu.de. To subscribe, write
    an email with the body "subscribe gpc your@email.address" to the
    list robot, gpc-request@gnu.de.

    Framework Pascal (Formerly TMT Pascal)

    Framework Pascal, now at Version 6.1, is a 32-bit compiler with Turbo
    Pascal syntax and is quite compatible with Turbo Pascal.

    Framework Pascal is available from

    http://www.frameworkpascal.com/products.htm

    - Virtual Pascal

    Virtual Pascal, now at Release V2.1 is free. It fully supports DOS
    and Delphi plus Turbo Vision has been ported to 32 bits. There is
    incomplete support for (x86 architecture only) Linux.

    http://vpascal.ning.com/

    On 22 August 2003 Allan Mertner made the modified-for-VP sources
    of TurboPower's Object Professional libraries available on the VP
    site. Legal uncertainties have led to their removal.

    On 24 August 2003 Allan Mertner announced that he is looking into
    Open Sourcing the compiler. More info and discussion about this
    can be found on the Virtual Pascal mailing list, which is archived
    on Topica, http://lists.topica.com/lists/virtualpascal/read
    A direct link to the post that kicked off the discussion is
    http://lists.topica.com/lists/virtualpascal/read?sort=d&start=2665

    On 3 April 2005, Allan Mertner announced the death of Virtual
    Pascal. He will continue to run vpascal.com for "a few more years",
    but development will cease - the main reason for doing so is the
    fact that the compiler is written in assembler and it cannot
    realistically be changed to add new features. Due to copyright
    restrictions, the source will not be made available. There is a
    small possibility that Allan might produce one more maintenance
    release.

    See Also Section 4 on Borland's release of TP compilers.

    ----------------------------------------------------------------------
    How should I unsubscribe from the INFO-PASCAL mailing list?

    Send the message "unsubscribe INFO-PASCAL" to

    mailto:info-pascal-request@brl.mil

    Please do not send such requests (or others) to info-Pascal@brl.mil

    ----------------------------------------------------------------------
    How to use run-time checks?

    The Borland compilers can be set up to trap a substantial number of
    Run-time errors. In the early stages of program development it is
    advisable to enable _ALL_ error-checking options, i.e.

    - $I+ to detect I/O errors
    - $Q+ to detect overflows (BP/TP7 only)
    - $R+ to generate range-checking code
    - $S+ to detect stack overflows
    - $T+ to enable type-checked pointers
    - $V+ to enable strict checking of Var-strings

    The $T+ option is a _compile-time_ error-check. It does not carry
    any run-time overheads!

    Using all of them will in many cases enable you to find problems
    without having to resort to the newsgroup.

    Once a program runs correctly, even with input no sensible user
    would ever enter, you might want to disable all error-checking, with
    the possible exception of I/O checking. However, the high clock
    frequencies of todays CPUs might make the resulting reduction in
    execution time minimal. As an alternative, it might be advantageous
    to put fully debugged, well tested and frequently executed code into
    a separate unit that is compiled without any error-checking.

    ----------------------------------------------------------------------
    How to use Random/Randomize?

    The Randomize procedure is used to initialize the seed of the random
    number generator (RNG) with a value derived from the system time. It
    should only be called once, at the very start of a program. Calling
    it more frequently, especially in loops on fast CPUs, may result in
    it being re-seeded with the same seed on many iterations, which in
    turn results in the Random() function producing the same 'random'
    number over and over again!

    **********************************************************************
    3.1 Pointers to info for assorted questions **********************************************************************

    This section attempts to provide pointers to help and resources for
    some of the other VFAQ's. Any assistance to compile a fuller list
    will be gratefully received.

    Cursor blink problem in Win95 after exiting BPW IDE
    http://www.filewatcher.com/_/?q=tdsvga.zip

    Standalone debugger and profiler do not work under Win95
    File above and use TDWINTH.DLL instead of TDWIN.DLL

    Can I use truetype or other BGI fonts with BP7
    http://www.freetype.org/

    http://web.archive.org/web/20030811232215/www.xs4all.nl/~remcodek/fontpage.html

    Where can I find source code for ZIP files
    http://www.foyeh.org/

    Where can I find a replacement for BGI graphics
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see GrafX

    Where can I find a unit to play through a Soundblaster Card
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see SoundLib

    How can I link C code into my Turbo Pascal Program
    http://www.pedt.demon.co.uk/usenet/c-in-tp.htm

    My computer has more than 64Mb of memory and BP7 will not work
    Add NOVCPI to the DEVICE=EMM386.EXE line in config.sys, config.dos
    and config.win files in the root directory of your boot drive.

    I'm still using Windows 3.1x and TDW has stopped working
    http://www.pedt.demon.co.uk/usenet/ctl.zip

    My mouse does not work in the IDE under Windows 2000
    Windows 2000 has cut and paste for DOS boxes and this feature is
    enabled by default. Right click the top of your DOS Box, look for
    the 'Edit Options' and uncheck 'QuickEdit Mode' and 'Insert Mode'

    My protected mode Turbo Vision programs crash with Runtime Error 216
    Windows NT4, Windows 2000 and Windows XP programs have problems
    with 16 bit far callbacks for the mouse handler. Recompile
    drivers.pas to use polling instead of being interrupt driven. Copy
    of the fixed drivers.pas
    http://www.pedt.demon.co.uk/usenet/drivers.zip

    The problem is also present in 32-bit land.

    **********************************************************************
    3.2 Request for answers **********************************************************************

    - There seems to be reliable evidence that running BP on very fast
    P4 Windows XP systems causes problems (other than RTE 200). Can
    anyone give any clues as to the source of this problem.

    **********************************************************************
    4 Compiler and unit downloads **********************************************************************
    4.1 Borland compilers for download **********************************************************************

    Borland has placed three older versions - V1.0, V3.02 and V5.5 of
    the Turbo Pascal compilers on the Internet for download at

    http://edn.embarcadero.com/museum/antiquesoftware

    As regards any licensing issues, Borland have stated
    "Since the software is old, you can do whatever you want with it.
    You can freely distribute the executable version of programs
    that you develop."

    Brief highlights of the compilers [V3.02 is bug fixed version of
    V3.0 and V7.01 is bug fixed version of V7.0]

    TP V1.0: produces .com files, 64K maximum for code, data and stack
    but you can use the heap for variables.

    TP V3.0: produces .com files, 64K each for code, data and stack.
    Heap can be used. Implements overlays but careful planning needed to
    avoid thrashing the disk. [Hint: Use a RAMdisk]

    TP V5.5: produces .exe files, 64K each for code, any unit, data and
    stack. Heap can be used. Implements decent overlay manager. First TP
    that can use OOP [Object Orientated Programming]. Users of this
    version who need the Delay procedure should read the notes about
    RTE200 in Section 3.

    TP V7.0: OOP plus Turbo Vision and inline assembly language
    available. Users of this version should read the notes about RTE200
    in Section 3.

    **********************************************************************
    4.2 Replacement units for download **********************************************************************

    Borland made the source of the Run-Time Library (RTL) of its later
    products available to the end user, either for an additional fee or,
    in the case of BP7, as a "bonus" disk.

    Using the source it was theoretically possible to write improved
    units.

    **********************************************************************
    4.2.1 Replacement SYSTEM units for download **********************************************************************

    At the moment there are FIVE of them available on Garbo. They are:

    - for TP 5.5:
    ftp://garbo.uwasa.fi/pc/turbopa45/syst55c.zip by James LeMay

    - for TP6:
    ftp://garbo.uwasa.fi/pc/turbopa6/sys60a.zip by James LeMay
    ftp://garbo.uwasa.fi/pc/turbopa6/tpl60n19.zip by Norbert Juffa

    - for TP/BP7:
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70n16.zip by Norbert Juffa
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70v20.zip by Robert AH Prins

    The units by James LeMay are just faster, Norbert Juffa's units also
    have an increased smart-link granularity because he split up most of
    the original sources into several parts. However, most notable about
    the Norbert Juffa libraries is the greatly improved 6-byte real
    arithmetic, which is now as IEEE-754 compliant as possible within
    the restrictions of the format. Needlessly to say, Norbert's SYSTEM
    units are also substantially faster than Borlands original versions.

    The unit by Robert Prins is based upon Norbert Juffa's code, but it
    has been enhanced significantly. A few of the major changes are:

    - it is based on the BP 7.01 RTL
    - it requires a 32-bit CPU and a 387 class FPU if FPU datatypes are
    used
    - the code has been made Pentium+ friendlier by replacing most of
    the slower CICS type instructions by their RISC type equivalents
    - the code is even more smart-link friendly
    - both the real (TURBO.TPL) and DPMI (TPP.TPL) libraries include a
    non-RTE200 smartlink-friendly CRT unit
    - both contain a much more smartlink-friendly DOS unit (all original
    get/set routines have been broken in two)
    - the FPU based Trunc, Int and Round functions were made re-entrant

    There is an additional very small "SYSTEM" unit available for BP7,
    but it is stripped down to such an extent that, to quote the author

    "... you can't use all the features that the standard RTL has."

    The name of the archive is BPC-TRTL.ZIP and using Google you should
    have no trouble finding a copy.

    Here's an incomplete list of removed features:

    - All System unit procedures, such as WriteLn
    - All runtime error checks (you have to use {$R-,S-,Q-,I-} mode)
    - Return codes (ignore the runtime error messages that IDE shows)
    - Floating-point data types (you have to use {$N-,E-} mode)
    - Heap manager (allocate memory using DOS calls)
    - String handling routines (including the + operation)
    + Some of the LongInt operations: *, /, shr, shl (they still work
    with Integer)
    + Large variable assignments (that involved a procedure call)

    Also, note that you can't compile programs with debug information
    for standalone debugging. However, you can use the integrated
    debugger, or you can compile your program with the standard RTL for
    debugging (and use TinyRTL after the bugs are fixed). Don't forget
    to save your program before you compile it! The compiler crashes
    with an internal error if you occasionally use some of the removed
    features.

    **********************************************************************
    4.2.2 Replacement CRT units for download **********************************************************************

    Following work on a replacement CRT unit to primarily fix the RTE200
    bug in T/BP7, two replacement CRT units are now completed. CRT units
    are included for TP V5, 5.5, 6.0 and 7.0x including protected mode
    units for BP7.0x. Pedt Scragg's ZIP file also includes precompiled
    units for Delphi 1. Robert Prins' unit contains all .OBJ files so
    that users of D1 can roll their own. This unit is included in
    BPL70V20.ZIP.

    The replacement CRT units also include code to allow use of extended
    keys such as F11 and F12 with ReadKey and, if using other than 40x25
    text mode or 80x25,43,50 text mode should not reset text screen to
    80x25.

    Be aware that the unit by Robert Prins (rpcrt100.zip) contains 386
    instructions. It will not run on 8086/88/286 systems, but does not
    test for such systems!

    Pedt Scragg's unit:

    Information at http://www.pedt.demon.co.uk/crt/ including download
    links.

    Download directly from:
    http://www.signpost-design.co.uk/crt.zip
    ftp://ftp.demon.co.uk/pub/ibmpc/dos/programming/crt.zip
    ftp://garbo.uwasa.fi/pc/turbopas/crt.zip

    Robert Prins' unit:

    ftp://garbo.uwasa.fi/pc/turbopas/rpcrt100.zip

    **********************************************************************
    4.2.3 Replacement OVERLAY unit for download **********************************************************************

    Available on Garbo is a replacement Overlay unit. The unit comes
    with the never-made-available by Borland reconstructed sources of
    the original unit. The file containing the replacement unit also
    contains an improved version of Wilbert van Leijen's OVERXMS.ASM
    source, but not the other files in WvL's original archive!
    Both units contain 386 instructions and both are included in
    BPL70V20.ZIP.

    Download from:
    ftp://garbo.uwasa.fi/pc/turbopa7/over-120.zip
    ftp://garbo.uwasa.fi/pc/turbopas/overxms.zip (WvL's original unit)

    **********************************************************************
    4.2.4 Emulator sources for download **********************************************************************

    Borland never made the sources of the hard- and software emulator
    files available. Reconstructed sources, including those of the
    improved version of the hardware emulator by Norbert Juffa, with
    instructions on how to add them to the RTL are also available on
    Garbo:

    ftp://garbo.uwasa.fi/pc/turbspec/em8x-110.zip

    Newer, further optimized and far better commented, versions can be
    found in BPL70V20.ZIP.

    **********************************************************************
    5 Using Borland compilers on modern Operating Systems **********************************************************************

    It is possible to use TP/BP and the programs they compile on 64-bit
    versions of Windows and both 32- and 64-bit versions of Linux, but
    it might be more advantageous to use either Delphi (for Windows) or
    FreePascal (for Windows and Linux) to do so.

    **********************************************************************
    5.1 Windows 64-bit **********************************************************************

    64-bit versions of Windows XP/Vista/7 no longer support running the
    16-bit programs generated by the various versions of Borland and
    Turbo Pascal. It may be possible to run BP/TP non-Windows programs
    using DOXBox http://www.dosbox.com/ currently at version 0.73, with
    version 0.74 apparently just around the corner.

    Another option, for users of W7 Ultimate is to download the XP
    emulator.

    **********************************************************************
    5.2 Linux **********************************************************************

    To run TP/BP and the programs they create on Linux you can use
    DOSEMU http://dosemu.sourceforge.net/

    **********************************************************************
    5.3 Virtual Machines **********************************************************************

    A final option, usable for both 64-bit Windows and all versions of
    Linux, it to download a virtualisation program, such as

    - Oracle's VirtualBox http://www.virtualbox.org/
    - Bochs http://bochs.sourceforge.net/

    and run DOS or Windows in a virtual machine.

    **********************************************************************
    Appendix A - ftp Mirror sites (Choose the closest to you) **********************************************************************
    Public, authorized Garbo mirror sites:

    From Timo Salmi, 2003-03-07:

    > Garbo's mirrors are hardly relevant in this day and age. The main
    > site is enough.
    > Anyway: http://lipas.uwasa.fi/~ts/garbinfo/garbmirr.html

    Simtel.Net

    Simtel.Net is a worldwide distribution network for Shareware,
    Freeware and Public Domain programs for MS-DOS, Windows 3.x and
    Windows 95/98.

    For a complete Simtel.Net list, send mail to listserv@Simtel.Net
    with body:
    get mirrors.info

    You can also get a list of mirror sites and directory descriptions
    from
    news:comp.archives.msdos.announce
    news:comp.archives.ms-windows.announce

    Look for the subjects
    List of Simtel.Net MS-DOS dirs w/descriptions
    List of Simtel.Net authorized mirror sites

    The Simtel mirrors should also be listed at
    ftp://ftp.simtel.net/pub/simtelnet/MIRRORS.TXT

    **********************************************************************
    Appendix B - Credits **********************************************************************
    Scott A. Moore - Original posting guidelines
    Dr John Stockton - WWW sites, many corrections/tips
    Prof. Timo Salmi - Garbo mirrors, corrections
    Anthon Pang - Beta testing WWW sites
    Keith Petersen - Simtel.Net information
    Marco van de Voort - Additional FPC info
    Tom Wheeley - Creator of this FAQ
    Chris Mathews - Previous maintainer of this FAQ
    Pedt Scragg - Previous maintainer of this FAQ

    Not forgetting those not mentioned whose contributions have also
    helped to keep the mFAQ up-to-date and useful. **********************************************************************
    Thank you for reading the Mini-FAQ

    Copies available from
    - ftp://garbo.uwasa.fi/pc/doc-net/faqclpb.zip
    - http://www.merlyn.demon.co.uk/clpb-faq.txt
    - ftp://ftp.demon.co.uk/pub/doc/faq/clpb/faqclpb.zip

    Old versions from http://www.merlyn.demon.co.uk/oldpfaqs/

    Comments, additions, alterations and corrections to
    <mailto:clpbfaq at prino dot net>

    Please do not be backward about coming forward if you have additions
    to the mFAQ. All suggestions, broken or amended links, suggestions
    for altering the content of the mFAQ are warmly welcomed.

    This mini-FAQ is (C) Copyright Robert AH Prins 2002-2011 on behalf
    of the newsgroup comp.lang.pascal.borland. Upon change of
    maintainer, the copyright will automatically pass over to the new
    maintainer. Except for the name of the maintainer and dates, the new
    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)
  • From Robert AH Prins@1:261/20.999 to All on Thu May 17 11:13:14 2012
    option is set to COMPILE TO DISK. When you compile, make or build
    your program then you will create the file XXX.EXE, where XXX is the
    name of your .PAS file.

    ----------------------------------------------------------------------
    Will Delphi V2/3/4/5/6/7/.net/D2005 do DOS programs as well as
    Windows?

    Delphi V2 and later are for Windows 9x and Windows NT/XP. They are
    not DOS products. They can create 32-bit console mode apps, but
    they will not create DOS apps.

    If you want DOS apps from a Delphi Product then Delphi V1 can do
    them with some work on the RTL. See

    http://www.pedt.demon.co.uk/usenet/

    DCC32 -cc program.pas
    is worth trying on some BP/TP programs mainly computational in
    nature.

    There is also wdosx, a winapi emulating dos-extender. Afaik this
    also works for 32-bits Delphi's. [MvdV]

    ----------------------------------------------------------------------
    Is there a Borland Pascal Mailing list?

    No, there is not.

    There is a mailing list for Virtual Pascal (see below) on Yahoo.
    Read access is here: http://tech.groups.yahoo.com/group/vpascal/
    The old Topica list is still readable at
    http://www.topica.com/lists/virtualpascal/read

    ----------------------------------------------------------------------
    Is it possible to 'decompile' Pascal EXEs or TPUs?

    No. Too much information is lost in the compiling process. For a
    more detailed explanation see Prof. Timo Salmi's FAQ.

    It is possible to get a *reasonable* disassembly to assembly
    language only

    - try http://www.hex-rays.com/idapro/

    The FLIRT technology that comes with IDA will identify most routines
    of the _original_ Borland RTLs. It will 'miss' interrupt routines,
    but due to its interactive nature, these can be added very easily.

    ----------------------------------------------------------------------
    What were the Borland Pascal Products?

    In essence, Borland Pascal was the 'professional' product, whilst
    the Turbo Pascals were 'hobbyist' products.

    Discontinued versions
    Turbo Pascal 7 (Dos)
    Turbo Pascal for Windows 1.5 (Win)
    Borland Pascal 7 (DOS, WIN 3.1, Pmode)

    Borland Pascal could do everything that both Turbo Pascals could
    do, plus:

    . Compile for 16 bit DOS Protected mode (less memory constraints)
    . Full Run Time Library Source code
    . Lots of assorted debugging and programming tools

    There was an update to TP and BP to v7.01, but this is no longer
    available. V7.01 still has VER70 defined. If you really want to
    pay big bucks for an old version, you might try here

    http://www.emsps.com/oldtools/borland.htm

    for the possibilities of obtaining a used copy of the various
    versions of the Pascal compilers produced by Borland. You may also
    find copies of BP7 for sale on Ebay at http://www.ebay.com/
    Needlessly to say, there are also other options...

    ----------------------------------------------------------------------
    Are there any freeware Pascal compilers?

    - FPC Pascal
    # Free Pascal, now (2010-11-12) at version 2.4.2, is a compiler for
    32-bit and 64-bit CPU architectures such as Intel x86, Amd64/x86_64,
    PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also
    supports the Motorola 680x0. The following operating systems are
    supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64,
    WinCE, OS/2, Netware (libc and classic) and MorphOS.

    It comes with a cross-platform Run-Time Library, many interfaces to
    existing libraries, and a large set of non-visual classes in the
    Free Component Library. Last but not least, a text-mode IDE exists
    on various platforms, and FPC comes with 1800 pages of documentation.

    The compiler is licensed under the GNU General Public License. The
    Run-Time code is licensed under a modified version of the Library
    General Public License, which allows to use it in a commercial
    application.

    Comes with full Pascal source and compiles itself.

    http://www.freepascal.org/

    - GNU Pascal

    GNU Pascal is a portable 32/64 bit compiler system. It supports the
    language of Borland Pascal V7 as well as ISO Standard Pascal, a
    large subset of ISO Extended Pascal and other extensions (see

    http://www.gnu-pascal.de/gpc/h-index.html

    GNU Pascal is part of the GNU family of compilers, runs on all
    platforms supported by GNU C, including DOS, OS/2 and MS-Windows
    9x/NT, Linux, *BSD and other Unix-compatible systems and can cross-
    compile between these platforms.

    Full C source and precompiled binaries for several platforms are
    available from:

    http://www.gnu-pascal.de/alpha/ (Sources)
    http://www.gnu-pascal.de/binary/ (Binaries)

    There is a GNU Pascal mailing list, gpc@gnu.de. To subscribe, write
    an email with the body "subscribe gpc your@email.address" to the
    list robot, gpc-request@gnu.de.

    Framework Pascal (Formerly TMT Pascal)

    Framework Pascal, now at Version 6.1, is a 32-bit compiler with Turbo
    Pascal syntax and is quite compatible with Turbo Pascal.

    Framework Pascal is available from

    http://www.frameworkpascal.com/products.htm

    - Virtual Pascal

    Virtual Pascal, now at Release V2.1 is free. It fully supports DOS
    and Delphi plus Turbo Vision has been ported to 32 bits. There is
    incomplete support for (x86 architecture only) Linux.

    http://vpascal.ning.com/

    On 22 August 2003 Allan Mertner made the modified-for-VP sources
    of TurboPower's Object Professional libraries available on the VP
    site. Legal uncertainties have led to their removal.

    On 24 August 2003 Allan Mertner announced that he is looking into
    Open Sourcing the compiler. More info and discussion about this
    can be found on the Virtual Pascal mailing list, which is archived
    on Topica, http://lists.topica.com/lists/virtualpascal/read
    A direct link to the post that kicked off the discussion is
    http://lists.topica.com/lists/virtualpascal/read?sort=d&start=2665

    On 3 April 2005, Allan Mertner announced the death of Virtual
    Pascal. He will continue to run vpascal.com for "a few more years",
    but development will cease - the main reason for doing so is the
    fact that the compiler is written in assembler and it cannot
    realistically be changed to add new features. Due to copyright
    restrictions, the source will not be made available. There is a
    small possibility that Allan might produce one more maintenance
    release.

    See Also Section 4 on Borland's release of TP compilers.

    ----------------------------------------------------------------------
    How should I unsubscribe from the INFO-PASCAL mailing list?

    Send the message "unsubscribe INFO-PASCAL" to

    mailto:info-pascal-request@brl.mil

    Please do not send such requests (or others) to info-Pascal@brl.mil

    ----------------------------------------------------------------------
    How to use run-time checks?

    The Borland compilers can be set up to trap a substantial number of
    Run-time errors. In the early stages of program development it is
    advisable to enable _ALL_ error-checking options, i.e.

    - $I+ to detect I/O errors
    - $Q+ to detect overflows (BP/TP7 only)
    - $R+ to generate range-checking code
    - $S+ to detect stack overflows
    - $T+ to enable type-checked pointers
    - $V+ to enable strict checking of Var-strings

    The $T+ option is a _compile-time_ error-check. It does not carry
    any run-time overheads!

    Using all of them will in many cases enable you to find problems
    without having to resort to the newsgroup.

    Once a program runs correctly, even with input no sensible user
    would ever enter, you might want to disable all error-checking, with
    the possible exception of I/O checking. However, the high clock
    frequencies of todays CPUs might make the resulting reduction in
    execution time minimal. As an alternative, it might be advantageous
    to put fully debugged, well tested and frequently executed code into
    a separate unit that is compiled without any error-checking.

    ----------------------------------------------------------------------
    How to use Random/Randomize?

    The Randomize procedure is used to initialize the seed of the random
    number generator (RNG) with a value derived from the system time. It
    should only be called once, at the very start of a program. Calling
    it more frequently, especially in loops on fast CPUs, may result in
    it being re-seeded with the same seed on many iterations, which in
    turn results in the Random() function producing the same 'random'
    number over and over again!

    **********************************************************************
    3.1 Pointers to info for assorted questions **********************************************************************

    This section attempts to provide pointers to help and resources for
    some of the other VFAQ's. Any assistance to compile a fuller list
    will be gratefully received.

    Cursor blink problem in Win95 after exiting BPW IDE
    http://www.filewatcher.com/_/?q=tdsvga.zip

    Standalone debugger and profiler do not work under Win95
    File above and use TDWINTH.DLL instead of TDWIN.DLL

    Can I use truetype or other BGI fonts with BP7
    http://www.freetype.org/

    http://web.archive.org/web/20030811232215/www.xs4all.nl/~remcodek/fontpage.html

    Where can I find source code for ZIP files
    http://www.foyeh.org/

    Where can I find a replacement for BGI graphics
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see GrafX

    Where can I find a unit to play through a Soundblaster Card
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see SoundLib

    How can I link C code into my Turbo Pascal Program
    http://www.pedt.demon.co.uk/usenet/c-in-tp.htm

    My computer has more than 64Mb of memory and BP7 will not work
    Add NOVCPI to the DEVICE=EMM386.EXE line in config.sys, config.dos
    and config.win files in the root directory of your boot drive.

    I'm still using Windows 3.1x and TDW has stopped working
    http://www.pedt.demon.co.uk/usenet/ctl.zip

    My mouse does not work in the IDE under Windows 2000
    Windows 2000 has cut and paste for DOS boxes and this feature is
    enabled by default. Right click the top of your DOS Box, look for
    the 'Edit Options' and uncheck 'QuickEdit Mode' and 'Insert Mode'

    My protected mode Turbo Vision programs crash with Runtime Error 216
    Windows NT4, Windows 2000 and Windows XP programs have problems
    with 16 bit far callbacks for the mouse handler. Recompile
    drivers.pas to use polling instead of being interrupt driven. Copy
    of the fixed drivers.pas
    http://www.pedt.demon.co.uk/usenet/drivers.zip

    The problem is also present in 32-bit land.

    **********************************************************************
    3.2 Request for answers **********************************************************************

    - There seems to be reliable evidence that running BP on very fast
    P4 Windows XP systems causes problems (other than RTE 200). Can
    anyone give any clues as to the source of this problem.

    **********************************************************************
    4 Compiler and unit downloads **********************************************************************
    4.1 Borland compilers for download **********************************************************************

    Borland has placed three older versions - V1.0, V3.02 and V5.5 of
    the Turbo Pascal compilers on the Internet for download at

    http://edn.embarcadero.com/museum/antiquesoftware

    As regards any licensing issues, Borland have stated
    "Since the software is old, you can do whatever you want with it.
    You can freely distribute the executable version of programs
    that you develop."

    Brief highlights of the compilers [V3.02 is bug fixed version of
    V3.0 and V7.01 is bug fixed version of V7.0]

    TP V1.0: produces .com files, 64K maximum for code, data and stack
    but you can use the heap for variables.

    TP V3.0: produces .com files, 64K each for code, data and stack.
    Heap can be used. Implements overlays but careful planning needed to
    avoid thrashing the disk. [Hint: Use a RAMdisk]

    TP V5.5: produces .exe files, 64K each for code, any unit, data and
    stack. Heap can be used. Implements decent overlay manager. First TP
    that can use OOP [Object Orientated Programming]. Users of this
    version who need the Delay procedure should read the notes about
    RTE200 in Section 3.

    TP V7.0: OOP plus Turbo Vision and inline assembly language
    available. Users of this version should read the notes about RTE200
    in Section 3.

    **********************************************************************
    4.2 Replacement units for download **********************************************************************

    Borland made the source of the Run-Time Library (RTL) of its later
    products available to the end user, either for an additional fee or,
    in the case of BP7, as a "bonus" disk.

    Using the source it was theoretically possible to write improved
    units.

    **********************************************************************
    4.2.1 Replacement SYSTEM units for download **********************************************************************

    At the moment there are FIVE of them available on Garbo. They are:

    - for TP 5.5:
    ftp://garbo.uwasa.fi/pc/turbopa45/syst55c.zip by James LeMay

    - for TP6:
    ftp://garbo.uwasa.fi/pc/turbopa6/sys60a.zip by James LeMay
    ftp://garbo.uwasa.fi/pc/turbopa6/tpl60n19.zip by Norbert Juffa

    - for TP/BP7:
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70n16.zip by Norbert Juffa
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70v20.zip by Robert AH Prins

    The units by James LeMay are just faster, Norbert Juffa's units also
    have an increased smart-link granularity because he split up most of
    the original sources into several parts. However, most notable about
    the Norbert Juffa libraries is the greatly improved 6-byte real
    arithmetic, which is now as IEEE-754 compliant as possible within
    the restrictions of the format. Needlessly to say, Norbert's SYSTEM
    units are also substantially faster than Borlands original versions.

    The unit by Robert Prins is based upon Norbert Juffa's code, but it
    has been enhanced significantly. A few of the major changes are:

    - it is based on the BP 7.01 RTL
    - it requires a 32-bit CPU and a 387 class FPU if FPU datatypes are
    used
    - the code has been made Pentium+ friendlier by replacing most of
    the slower CICS type instructions by their RISC type equivalents
    - the code is even more smart-link friendly
    - both the real (TURBO.TPL) and DPMI (TPP.TPL) libraries include a
    non-RTE200 smartlink-friendly CRT unit
    - both contain a much more smartlink-friendly DOS unit (all original
    get/set routines have been broken in two)
    - the FPU based Trunc, Int and Round functions were made re-entrant

    There is an additional very small "SYSTEM" unit available for BP7,
    but it is stripped down to such an extent that, to quote the author

    "... you can't use all the features that the standard RTL has."

    The name of the archive is BPC-TRTL.ZIP and using Google you should
    have no trouble finding a copy.

    Here's an incomplete list of removed features:

    - All System unit procedures, such as WriteLn
    - All runtime error checks (you have to use {$R-,S-,Q-,I-} mode)
    - Return codes (ignore the runtime error messages that IDE shows)
    - Floating-point data types (you have to use {$N-,E-} mode)
    - Heap manager (allocate memory using DOS calls)
    - String handling routines (including the + operation)
    + Some of the LongInt operations: *, /, shr, shl (they still work
    with Integer)
    + Large variable assignments (that involved a procedure call)

    Also, note that you can't compile programs with debug information
    for standalone debugging. However, you can use the integrated
    debugger, or you can compile your program with the standard RTL for
    debugging (and use TinyRTL after the bugs are fixed). Don't forget
    to save your program before you compile it! The compiler crashes
    with an internal error if you occasionally use some of the removed
    features.

    **********************************************************************
    4.2.2 Replacement CRT units for download **********************************************************************

    Following work on a replacement CRT unit to primarily fix the RTE200
    bug in T/BP7, two replacement CRT units are now completed. CRT units
    are included for TP V5, 5.5, 6.0 and 7.0x including protected mode
    units for BP7.0x. Pedt Scragg's ZIP file also includes precompiled
    units for Delphi 1. Robert Prins' unit contains all .OBJ files so
    that users of D1 can roll their own. This unit is included in
    BPL70V20.ZIP.

    The replacement CRT units also include code to allow use of extended
    keys such as F11 and F12 with ReadKey and, if using other than 40x25
    text mode or 80x25,43,50 text mode should not reset text screen to
    80x25.

    Be aware that the unit by Robert Prins (rpcrt100.zip) contains 386
    instructions. It will not run on 8086/88/286 systems, but does not
    test for such systems!

    Pedt Scragg's unit:

    Information at http://www.pedt.demon.co.uk/crt/ including download
    links.

    Download directly from:
    http://www.signpost-design.co.uk/crt.zip
    ftp://ftp.demon.co.uk/pub/ibmpc/dos/programming/crt.zip
    ftp://garbo.uwasa.fi/pc/turbopas/crt.zip

    Robert Prins' unit:

    ftp://garbo.uwasa.fi/pc/turbopas/rpcrt100.zip

    **********************************************************************
    4.2.3 Replacement OVERLAY unit for download **********************************************************************

    Available on Garbo is a replacement Overlay unit. The unit comes
    with the never-made-available by Borland reconstructed sources of
    the original unit. The file containing the replacement unit also
    contains an improved version of Wilbert van Leijen's OVERXMS.ASM
    source, but not the other files in WvL's original archive!
    Both units contain 386 instructions and both are included in
    BPL70V20.ZIP.

    Download from:
    ftp://garbo.uwasa.fi/pc/turbopa7/over-120.zip
    ftp://garbo.uwasa.fi/pc/turbopas/overxms.zip (WvL's original unit)

    **********************************************************************
    4.2.4 Emulator sources for download **********************************************************************

    Borland never made the sources of the hard- and software emulator
    files available. Reconstructed sources, including those of the
    improved version of the hardware emulator by Norbert Juffa, with
    instructions on how to add them to the RTL are also available on
    Garbo:

    ftp://garbo.uwasa.fi/pc/turbspec/em8x-110.zip

    Newer, further optimized and far better commented, versions can be
    found in BPL70V20.ZIP.

    **********************************************************************
    5 Using Borland compilers on modern Operating Systems **********************************************************************

    It is possible to use TP/BP and the programs they compile on 64-bit
    versions of Windows and both 32- and 64-bit versions of Linux, but
    it might be more advantageous to use either Delphi (for Windows) or
    FreePascal (for Windows and Linux) to do so.

    **********************************************************************
    5.1 Windows 64-bit **********************************************************************

    64-bit versions of Windows XP/Vista/7 no longer support running the
    16-bit programs generated by the various versions of Borland and
    Turbo Pascal. It may be possible to run BP/TP non-Windows programs
    using DOXBox http://www.dosbox.com/ currently at version 0.73, with
    version 0.74 apparently just around the corner.

    Another option, for users of W7 Ultimate is to download the XP
    emulator.

    **********************************************************************
    5.2 Linux **********************************************************************

    To run TP/BP and the programs they create on Linux you can use
    DOSEMU http://dosemu.sourceforge.net/

    **********************************************************************
    5.3 Virtual Machines **********************************************************************

    A final option, usable for both 64-bit Windows and all versions of
    Linux, it to download a virtualisation program, such as

    - Oracle's VirtualBox http://www.virtualbox.org/
    - Bochs http://bochs.sourceforge.net/

    and run DOS or Windows in a virtual machine.

    **********************************************************************
    Appendix A - ftp Mirror sites (Choose the closest to you) **********************************************************************
    Public, authorized Garbo mirror sites:

    From Timo Salmi, 2003-03-07:

    > Garbo's mirrors are hardly relevant in this day and age. The main
    > site is enough.
    > Anyway: http://lipas.uwasa.fi/~ts/garbinfo/garbmirr.html

    Simtel.Net

    Simtel.Net is a worldwide distribution network for Shareware,
    Freeware and Public Domain programs for MS-DOS, Windows 3.x and
    Windows 95/98.

    For a complete Simtel.Net list, send mail to listserv@Simtel.Net
    with body:
    get mirrors.info

    You can also get a list of mirror sites and directory descriptions
    from
    news:comp.archives.msdos.announce
    news:comp.archives.ms-windows.announce

    Look for the subjects
    List of Simtel.Net MS-DOS dirs w/descriptions
    List of Simtel.Net authorized mirror sites

    The Simtel mirrors should also be listed at
    ftp://ftp.simtel.net/pub/simtelnet/MIRRORS.TXT

    **********************************************************************
    Appendix B - Credits **********************************************************************
    Scott A. Moore - Original posting guidelines
    Dr John Stockton - WWW sites, many corrections/tips
    Prof. Timo Salmi - Garbo mirrors, corrections
    Anthon Pang - Beta testing WWW sites
    Keith Petersen - Simtel.Net information
    Marco van de Voort - Additional FPC info
    Tom Wheeley - Creator of this FAQ
    Chris Mathews - Previous maintainer of this FAQ
    Pedt Scragg - Previous maintainer of this FAQ

    Not forgetting those not mentioned whose contributions have also
    helped to keep the mFAQ up-to-date and useful. **********************************************************************
    Thank you for reading the Mini-FAQ

    Copies available from
    - ftp://garbo.uwasa.fi/pc/doc-net/faqclpb.zip
    - http://www.merlyn.demon.co.uk/clpb-faq.txt
    - ftp://ftp.demon.co.uk/pub/doc/faq/clpb/faqclpb.zip

    Old versions from http://www.merlyn.demon.co.uk/oldpfaqs/

    Comments, additions, alterations and corrections to
    <mailto:clpbfaq at prino dot net>

    Please do not be backward about coming forward if you have additions
    to the mFAQ. All suggestions, broken or amended links, suggestions
    for altering the content of the mFAQ are warmly welcomed.

    This mini-FAQ is (C) Copyright Robert AH Prins 2002-2011 on behalf
    of the newsgroup comp.lang.pascal.borland. Upon change of
    maintainer, the copyright will automatically pass over to the new
    maintainer. Except for the name of the maintainer and dates, the new
    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)
  • From Robert AH Prins@1:261/20.999 to All on Thu May 17 11:13:14 2012
    option is set to COMPILE TO DISK. When you compile, make or build
    your program then you will create the file XXX.EXE, where XXX is the
    name of your .PAS file.

    ----------------------------------------------------------------------
    Will Delphi V2/3/4/5/6/7/.net/D2005 do DOS programs as well as
    Windows?

    Delphi V2 and later are for Windows 9x and Windows NT/XP. They are
    not DOS products. They can create 32-bit console mode apps, but
    they will not create DOS apps.

    If you want DOS apps from a Delphi Product then Delphi V1 can do
    them with some work on the RTL. See

    http://www.pedt.demon.co.uk/usenet/

    DCC32 -cc program.pas
    is worth trying on some BP/TP programs mainly computational in
    nature.

    There is also wdosx, a winapi emulating dos-extender. Afaik this
    also works for 32-bits Delphi's. [MvdV]

    ----------------------------------------------------------------------
    Is there a Borland Pascal Mailing list?

    No, there is not.

    There is a mailing list for Virtual Pascal (see below) on Yahoo.
    Read access is here: http://tech.groups.yahoo.com/group/vpascal/
    The old Topica list is still readable at
    http://www.topica.com/lists/virtualpascal/read

    ----------------------------------------------------------------------
    Is it possible to 'decompile' Pascal EXEs or TPUs?

    No. Too much information is lost in the compiling process. For a
    more detailed explanation see Prof. Timo Salmi's FAQ.

    It is possible to get a *reasonable* disassembly to assembly
    language only

    - try http://www.hex-rays.com/idapro/

    The FLIRT technology that comes with IDA will identify most routines
    of the _original_ Borland RTLs. It will 'miss' interrupt routines,
    but due to its interactive nature, these can be added very easily.

    ----------------------------------------------------------------------
    What were the Borland Pascal Products?

    In essence, Borland Pascal was the 'professional' product, whilst
    the Turbo Pascals were 'hobbyist' products.

    Discontinued versions
    Turbo Pascal 7 (Dos)
    Turbo Pascal for Windows 1.5 (Win)
    Borland Pascal 7 (DOS, WIN 3.1, Pmode)

    Borland Pascal could do everything that both Turbo Pascals could
    do, plus:

    . Compile for 16 bit DOS Protected mode (less memory constraints)
    . Full Run Time Library Source code
    . Lots of assorted debugging and programming tools

    There was an update to TP and BP to v7.01, but this is no longer
    available. V7.01 still has VER70 defined. If you really want to
    pay big bucks for an old version, you might try here

    http://www.emsps.com/oldtools/borland.htm

    for the possibilities of obtaining a used copy of the various
    versions of the Pascal compilers produced by Borland. You may also
    find copies of BP7 for sale on Ebay at http://www.ebay.com/
    Needlessly to say, there are also other options...

    ----------------------------------------------------------------------
    Are there any freeware Pascal compilers?

    - FPC Pascal
    # Free Pascal, now (2010-11-12) at version 2.4.2, is a compiler for
    32-bit and 64-bit CPU architectures such as Intel x86, Amd64/x86_64,
    PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also
    supports the Motorola 680x0. The following operating systems are
    supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64,
    WinCE, OS/2, Netware (libc and classic) and MorphOS.

    It comes with a cross-platform Run-Time Library, many interfaces to
    existing libraries, and a large set of non-visual classes in the
    Free Component Library. Last but not least, a text-mode IDE exists
    on various platforms, and FPC comes with 1800 pages of documentation.

    The compiler is licensed under the GNU General Public License. The
    Run-Time code is licensed under a modified version of the Library
    General Public License, which allows to use it in a commercial
    application.

    Comes with full Pascal source and compiles itself.

    http://www.freepascal.org/

    - GNU Pascal

    GNU Pascal is a portable 32/64 bit compiler system. It supports the
    language of Borland Pascal V7 as well as ISO Standard Pascal, a
    large subset of ISO Extended Pascal and other extensions (see

    http://www.gnu-pascal.de/gpc/h-index.html

    GNU Pascal is part of the GNU family of compilers, runs on all
    platforms supported by GNU C, including DOS, OS/2 and MS-Windows
    9x/NT, Linux, *BSD and other Unix-compatible systems and can cross-
    compile between these platforms.

    Full C source and precompiled binaries for several platforms are
    available from:

    http://www.gnu-pascal.de/alpha/ (Sources)
    http://www.gnu-pascal.de/binary/ (Binaries)

    There is a GNU Pascal mailing list, gpc@gnu.de. To subscribe, write
    an email with the body "subscribe gpc your@email.address" to the
    list robot, gpc-request@gnu.de.

    Framework Pascal (Formerly TMT Pascal)

    Framework Pascal, now at Version 6.1, is a 32-bit compiler with Turbo
    Pascal syntax and is quite compatible with Turbo Pascal.

    Framework Pascal is available from

    http://www.frameworkpascal.com/products.htm

    - Virtual Pascal

    Virtual Pascal, now at Release V2.1 is free. It fully supports DOS
    and Delphi plus Turbo Vision has been ported to 32 bits. There is
    incomplete support for (x86 architecture only) Linux.

    http://vpascal.ning.com/

    On 22 August 2003 Allan Mertner made the modified-for-VP sources
    of TurboPower's Object Professional libraries available on the VP
    site. Legal uncertainties have led to their removal.

    On 24 August 2003 Allan Mertner announced that he is looking into
    Open Sourcing the compiler. More info and discussion about this
    can be found on the Virtual Pascal mailing list, which is archived
    on Topica, http://lists.topica.com/lists/virtualpascal/read
    A direct link to the post that kicked off the discussion is
    http://lists.topica.com/lists/virtualpascal/read?sort=d&start=2665

    On 3 April 2005, Allan Mertner announced the death of Virtual
    Pascal. He will continue to run vpascal.com for "a few more years",
    but development will cease - the main reason for doing so is the
    fact that the compiler is written in assembler and it cannot
    realistically be changed to add new features. Due to copyright
    restrictions, the source will not be made available. There is a
    small possibility that Allan might produce one more maintenance
    release.

    See Also Section 4 on Borland's release of TP compilers.

    ----------------------------------------------------------------------
    How should I unsubscribe from the INFO-PASCAL mailing list?

    Send the message "unsubscribe INFO-PASCAL" to

    mailto:info-pascal-request@brl.mil

    Please do not send such requests (or others) to info-Pascal@brl.mil

    ----------------------------------------------------------------------
    How to use run-time checks?

    The Borland compilers can be set up to trap a substantial number of
    Run-time errors. In the early stages of program development it is
    advisable to enable _ALL_ error-checking options, i.e.

    - $I+ to detect I/O errors
    - $Q+ to detect overflows (BP/TP7 only)
    - $R+ to generate range-checking code
    - $S+ to detect stack overflows
    - $T+ to enable type-checked pointers
    - $V+ to enable strict checking of Var-strings

    The $T+ option is a _compile-time_ error-check. It does not carry
    any run-time overheads!

    Using all of them will in many cases enable you to find problems
    without having to resort to the newsgroup.

    Once a program runs correctly, even with input no sensible user
    would ever enter, you might want to disable all error-checking, with
    the possible exception of I/O checking. However, the high clock
    frequencies of todays CPUs might make the resulting reduction in
    execution time minimal. As an alternative, it might be advantageous
    to put fully debugged, well tested and frequently executed code into
    a separate unit that is compiled without any error-checking.

    ----------------------------------------------------------------------
    How to use Random/Randomize?

    The Randomize procedure is used to initialize the seed of the random
    number generator (RNG) with a value derived from the system time. It
    should only be called once, at the very start of a program. Calling
    it more frequently, especially in loops on fast CPUs, may result in
    it being re-seeded with the same seed on many iterations, which in
    turn results in the Random() function producing the same 'random'
    number over and over again!

    **********************************************************************
    3.1 Pointers to info for assorted questions **********************************************************************

    This section attempts to provide pointers to help and resources for
    some of the other VFAQ's. Any assistance to compile a fuller list
    will be gratefully received.

    Cursor blink problem in Win95 after exiting BPW IDE
    http://www.filewatcher.com/_/?q=tdsvga.zip

    Standalone debugger and profiler do not work under Win95
    File above and use TDWINTH.DLL instead of TDWIN.DLL

    Can I use truetype or other BGI fonts with BP7
    http://www.freetype.org/

    http://web.archive.org/web/20030811232215/www.xs4all.nl/~remcodek/fontpage.html

    Where can I find source code for ZIP files
    http://www.foyeh.org/

    Where can I find a replacement for BGI graphics
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see GrafX

    Where can I find a unit to play through a Soundblaster Card
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see SoundLib

    How can I link C code into my Turbo Pascal Program
    http://www.pedt.demon.co.uk/usenet/c-in-tp.htm

    My computer has more than 64Mb of memory and BP7 will not work
    Add NOVCPI to the DEVICE=EMM386.EXE line in config.sys, config.dos
    and config.win files in the root directory of your boot drive.

    I'm still using Windows 3.1x and TDW has stopped working
    http://www.pedt.demon.co.uk/usenet/ctl.zip

    My mouse does not work in the IDE under Windows 2000
    Windows 2000 has cut and paste for DOS boxes and this feature is
    enabled by default. Right click the top of your DOS Box, look for
    the 'Edit Options' and uncheck 'QuickEdit Mode' and 'Insert Mode'

    My protected mode Turbo Vision programs crash with Runtime Error 216
    Windows NT4, Windows 2000 and Windows XP programs have problems
    with 16 bit far callbacks for the mouse handler. Recompile
    drivers.pas to use polling instead of being interrupt driven. Copy
    of the fixed drivers.pas
    http://www.pedt.demon.co.uk/usenet/drivers.zip

    The problem is also present in 32-bit land.

    **********************************************************************
    3.2 Request for answers **********************************************************************

    - There seems to be reliable evidence that running BP on very fast
    P4 Windows XP systems causes problems (other than RTE 200). Can
    anyone give any clues as to the source of this problem.

    **********************************************************************
    4 Compiler and unit downloads **********************************************************************
    4.1 Borland compilers for download **********************************************************************

    Borland has placed three older versions - V1.0, V3.02 and V5.5 of
    the Turbo Pascal compilers on the Internet for download at

    http://edn.embarcadero.com/museum/antiquesoftware

    As regards any licensing issues, Borland have stated
    "Since the software is old, you can do whatever you want with it.
    You can freely distribute the executable version of programs
    that you develop."

    Brief highlights of the compilers [V3.02 is bug fixed version of
    V3.0 and V7.01 is bug fixed version of V7.0]

    TP V1.0: produces .com files, 64K maximum for code, data and stack
    but you can use the heap for variables.

    TP V3.0: produces .com files, 64K each for code, data and stack.
    Heap can be used. Implements overlays but careful planning needed to
    avoid thrashing the disk. [Hint: Use a RAMdisk]

    TP V5.5: produces .exe files, 64K each for code, any unit, data and
    stack. Heap can be used. Implements decent overlay manager. First TP
    that can use OOP [Object Orientated Programming]. Users of this
    version who need the Delay procedure should read the notes about
    RTE200 in Section 3.

    TP V7.0: OOP plus Turbo Vision and inline assembly language
    available. Users of this version should read the notes about RTE200
    in Section 3.

    **********************************************************************
    4.2 Replacement units for download **********************************************************************

    Borland made the source of the Run-Time Library (RTL) of its later
    products available to the end user, either for an additional fee or,
    in the case of BP7, as a "bonus" disk.

    Using the source it was theoretically possible to write improved
    units.

    **********************************************************************
    4.2.1 Replacement SYSTEM units for download **********************************************************************

    At the moment there are FIVE of them available on Garbo. They are:

    - for TP 5.5:
    ftp://garbo.uwasa.fi/pc/turbopa45/syst55c.zip by James LeMay

    - for TP6:
    ftp://garbo.uwasa.fi/pc/turbopa6/sys60a.zip by James LeMay
    ftp://garbo.uwasa.fi/pc/turbopa6/tpl60n19.zip by Norbert Juffa

    - for TP/BP7:
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70n16.zip by Norbert Juffa
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70v20.zip by Robert AH Prins

    The units by James LeMay are just faster, Norbert Juffa's units also
    have an increased smart-link granularity because he split up most of
    the original sources into several parts. However, most notable about
    the Norbert Juffa libraries is the greatly improved 6-byte real
    arithmetic, which is now as IEEE-754 compliant as possible within
    the restrictions of the format. Needlessly to say, Norbert's SYSTEM
    units are also substantially faster than Borlands original versions.

    The unit by Robert Prins is based upon Norbert Juffa's code, but it
    has been enhanced significantly. A few of the major changes are:

    - it is based on the BP 7.01 RTL
    - it requires a 32-bit CPU and a 387 class FPU if FPU datatypes are
    used
    - the code has been made Pentium+ friendlier by replacing most of
    the slower CICS type instructions by their RISC type equivalents
    - the code is even more smart-link friendly
    - both the real (TURBO.TPL) and DPMI (TPP.TPL) libraries include a
    non-RTE200 smartlink-friendly CRT unit
    - both contain a much more smartlink-friendly DOS unit (all original
    get/set routines have been broken in two)
    - the FPU based Trunc, Int and Round functions were made re-entrant

    There is an additional very small "SYSTEM" unit available for BP7,
    but it is stripped down to such an extent that, to quote the author

    "... you can't use all the features that the standard RTL has."

    The name of the archive is BPC-TRTL.ZIP and using Google you should
    have no trouble finding a copy.

    Here's an incomplete list of removed features:

    - All System unit procedures, such as WriteLn
    - All runtime error checks (you have to use {$R-,S-,Q-,I-} mode)
    - Return codes (ignore the runtime error messages that IDE shows)
    - Floating-point data types (you have to use {$N-,E-} mode)
    - Heap manager (allocate memory using DOS calls)
    - String handling routines (including the + operation)
    + Some of the LongInt operations: *, /, shr, shl (they still work
    with Integer)
    + Large variable assignments (that involved a procedure call)

    Also, note that you can't compile programs with debug information
    for standalone debugging. However, you can use the integrated
    debugger, or you can compile your program with the standard RTL for
    debugging (and use TinyRTL after the bugs are fixed). Don't forget
    to save your program before you compile it! The compiler crashes
    with an internal error if you occasionally use some of the removed
    features.

    **********************************************************************
    4.2.2 Replacement CRT units for download **********************************************************************

    Following work on a replacement CRT unit to primarily fix the RTE200
    bug in T/BP7, two replacement CRT units are now completed. CRT units
    are included for TP V5, 5.5, 6.0 and 7.0x including protected mode
    units for BP7.0x. Pedt Scragg's ZIP file also includes precompiled
    units for Delphi 1. Robert Prins' unit contains all .OBJ files so
    that users of D1 can roll their own. This unit is included in
    BPL70V20.ZIP.

    The replacement CRT units also include code to allow use of extended
    keys such as F11 and F12 with ReadKey and, if using other than 40x25
    text mode or 80x25,43,50 text mode should not reset text screen to
    80x25.

    Be aware that the unit by Robert Prins (rpcrt100.zip) contains 386
    instructions. It will not run on 8086/88/286 systems, but does not
    test for such systems!

    Pedt Scragg's unit:

    Information at http://www.pedt.demon.co.uk/crt/ including download
    links.

    Download directly from:
    http://www.signpost-design.co.uk/crt.zip
    ftp://ftp.demon.co.uk/pub/ibmpc/dos/programming/crt.zip
    ftp://garbo.uwasa.fi/pc/turbopas/crt.zip

    Robert Prins' unit:

    ftp://garbo.uwasa.fi/pc/turbopas/rpcrt100.zip

    **********************************************************************
    4.2.3 Replacement OVERLAY unit for download **********************************************************************

    Available on Garbo is a replacement Overlay unit. The unit comes
    with the never-made-available by Borland reconstructed sources of
    the original unit. The file containing the replacement unit also
    contains an improved version of Wilbert van Leijen's OVERXMS.ASM
    source, but not the other files in WvL's original archive!
    Both units contain 386 instructions and both are included in
    BPL70V20.ZIP.

    Download from:
    ftp://garbo.uwasa.fi/pc/turbopa7/over-120.zip
    ftp://garbo.uwasa.fi/pc/turbopas/overxms.zip (WvL's original unit)

    **********************************************************************
    4.2.4 Emulator sources for download **********************************************************************

    Borland never made the sources of the hard- and software emulator
    files available. Reconstructed sources, including those of the
    improved version of the hardware emulator by Norbert Juffa, with
    instructions on how to add them to the RTL are also available on
    Garbo:

    ftp://garbo.uwasa.fi/pc/turbspec/em8x-110.zip

    Newer, further optimized and far better commented, versions can be
    found in BPL70V20.ZIP.

    **********************************************************************
    5 Using Borland compilers on modern Operating Systems **********************************************************************

    It is possible to use TP/BP and the programs they compile on 64-bit
    versions of Windows and both 32- and 64-bit versions of Linux, but
    it might be more advantageous to use either Delphi (for Windows) or
    FreePascal (for Windows and Linux) to do so.

    **********************************************************************
    5.1 Windows 64-bit **********************************************************************

    64-bit versions of Windows XP/Vista/7 no longer support running the
    16-bit programs generated by the various versions of Borland and
    Turbo Pascal. It may be possible to run BP/TP non-Windows programs
    using DOXBox http://www.dosbox.com/ currently at version 0.73, with
    version 0.74 apparently just around the corner.

    Another option, for users of W7 Ultimate is to download the XP
    emulator.

    **********************************************************************
    5.2 Linux **********************************************************************

    To run TP/BP and the programs they create on Linux you can use
    DOSEMU http://dosemu.sourceforge.net/

    **********************************************************************
    5.3 Virtual Machines **********************************************************************

    A final option, usable for both 64-bit Windows and all versions of
    Linux, it to download a virtualisation program, such as

    - Oracle's VirtualBox http://www.virtualbox.org/
    - Bochs http://bochs.sourceforge.net/

    and run DOS or Windows in a virtual machine.

    **********************************************************************
    Appendix A - ftp Mirror sites (Choose the closest to you) **********************************************************************
    Public, authorized Garbo mirror sites:

    From Timo Salmi, 2003-03-07:

    > Garbo's mirrors are hardly relevant in this day and age. The main
    > site is enough.
    > Anyway: http://lipas.uwasa.fi/~ts/garbinfo/garbmirr.html

    Simtel.Net

    Simtel.Net is a worldwide distribution network for Shareware,
    Freeware and Public Domain programs for MS-DOS, Windows 3.x and
    Windows 95/98.

    For a complete Simtel.Net list, send mail to listserv@Simtel.Net
    with body:
    get mirrors.info

    You can also get a list of mirror sites and directory descriptions
    from
    news:comp.archives.msdos.announce
    news:comp.archives.ms-windows.announce

    Look for the subjects
    List of Simtel.Net MS-DOS dirs w/descriptions
    List of Simtel.Net authorized mirror sites

    The Simtel mirrors should also be listed at
    ftp://ftp.simtel.net/pub/simtelnet/MIRRORS.TXT

    **********************************************************************
    Appendix B - Credits **********************************************************************
    Scott A. Moore - Original posting guidelines
    Dr John Stockton - WWW sites, many corrections/tips
    Prof. Timo Salmi - Garbo mirrors, corrections
    Anthon Pang - Beta testing WWW sites
    Keith Petersen - Simtel.Net information
    Marco van de Voort - Additional FPC info
    Tom Wheeley - Creator of this FAQ
    Chris Mathews - Previous maintainer of this FAQ
    Pedt Scragg - Previous maintainer of this FAQ

    Not forgetting those not mentioned whose contributions have also
    helped to keep the mFAQ up-to-date and useful. **********************************************************************
    Thank you for reading the Mini-FAQ

    Copies available from
    - ftp://garbo.uwasa.fi/pc/doc-net/faqclpb.zip
    - http://www.merlyn.demon.co.uk/clpb-faq.txt
    - ftp://ftp.demon.co.uk/pub/doc/faq/clpb/faqclpb.zip

    Old versions from http://www.merlyn.demon.co.uk/oldpfaqs/

    Comments, additions, alterations and corrections to
    <mailto:clpbfaq at prino dot net>

    Please do not be backward about coming forward if you have additions
    to the mFAQ. All suggestions, broken or amended links, suggestions
    for altering the content of the mFAQ are warmly welcomed.

    This mini-FAQ is (C) Copyright Robert AH Prins 2002-2011 on behalf
    of the newsgroup comp.lang.pascal.borland. Upon change of
    maintainer, the copyright will automatically pass over to the new
    maintainer. Except for the name of the maintainer and dates, the new
    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)
  • From Robert AH Prins@1:261/20.999 to All on Thu May 17 11:13:14 2012
    option is set to COMPILE TO DISK. When you compile, make or build
    your program then you will create the file XXX.EXE, where XXX is the
    name of your .PAS file.

    ----------------------------------------------------------------------
    Will Delphi V2/3/4/5/6/7/.net/D2005 do DOS programs as well as
    Windows?

    Delphi V2 and later are for Windows 9x and Windows NT/XP. They are
    not DOS products. They can create 32-bit console mode apps, but
    they will not create DOS apps.

    If you want DOS apps from a Delphi Product then Delphi V1 can do
    them with some work on the RTL. See

    http://www.pedt.demon.co.uk/usenet/

    DCC32 -cc program.pas
    is worth trying on some BP/TP programs mainly computational in
    nature.

    There is also wdosx, a winapi emulating dos-extender. Afaik this
    also works for 32-bits Delphi's. [MvdV]

    ----------------------------------------------------------------------
    Is there a Borland Pascal Mailing list?

    No, there is not.

    There is a mailing list for Virtual Pascal (see below) on Yahoo.
    Read access is here: http://tech.groups.yahoo.com/group/vpascal/
    The old Topica list is still readable at
    http://www.topica.com/lists/virtualpascal/read

    ----------------------------------------------------------------------
    Is it possible to 'decompile' Pascal EXEs or TPUs?

    No. Too much information is lost in the compiling process. For a
    more detailed explanation see Prof. Timo Salmi's FAQ.

    It is possible to get a *reasonable* disassembly to assembly
    language only

    - try http://www.hex-rays.com/idapro/

    The FLIRT technology that comes with IDA will identify most routines
    of the _original_ Borland RTLs. It will 'miss' interrupt routines,
    but due to its interactive nature, these can be added very easily.

    ----------------------------------------------------------------------
    What were the Borland Pascal Products?

    In essence, Borland Pascal was the 'professional' product, whilst
    the Turbo Pascals were 'hobbyist' products.

    Discontinued versions
    Turbo Pascal 7 (Dos)
    Turbo Pascal for Windows 1.5 (Win)
    Borland Pascal 7 (DOS, WIN 3.1, Pmode)

    Borland Pascal could do everything that both Turbo Pascals could
    do, plus:

    . Compile for 16 bit DOS Protected mode (less memory constraints)
    . Full Run Time Library Source code
    . Lots of assorted debugging and programming tools

    There was an update to TP and BP to v7.01, but this is no longer
    available. V7.01 still has VER70 defined. If you really want to
    pay big bucks for an old version, you might try here

    http://www.emsps.com/oldtools/borland.htm

    for the possibilities of obtaining a used copy of the various
    versions of the Pascal compilers produced by Borland. You may also
    find copies of BP7 for sale on Ebay at http://www.ebay.com/
    Needlessly to say, there are also other options...

    ----------------------------------------------------------------------
    Are there any freeware Pascal compilers?

    - FPC Pascal
    # Free Pascal, now (2010-11-12) at version 2.4.2, is a compiler for
    32-bit and 64-bit CPU architectures such as Intel x86, Amd64/x86_64,
    PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also
    supports the Motorola 680x0. The following operating systems are
    supported: Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64,
    WinCE, OS/2, Netware (libc and classic) and MorphOS.

    It comes with a cross-platform Run-Time Library, many interfaces to
    existing libraries, and a large set of non-visual classes in the
    Free Component Library. Last but not least, a text-mode IDE exists
    on various platforms, and FPC comes with 1800 pages of documentation.

    The compiler is licensed under the GNU General Public License. The
    Run-Time code is licensed under a modified version of the Library
    General Public License, which allows to use it in a commercial
    application.

    Comes with full Pascal source and compiles itself.

    http://www.freepascal.org/

    - GNU Pascal

    GNU Pascal is a portable 32/64 bit compiler system. It supports the
    language of Borland Pascal V7 as well as ISO Standard Pascal, a
    large subset of ISO Extended Pascal and other extensions (see

    http://www.gnu-pascal.de/gpc/h-index.html

    GNU Pascal is part of the GNU family of compilers, runs on all
    platforms supported by GNU C, including DOS, OS/2 and MS-Windows
    9x/NT, Linux, *BSD and other Unix-compatible systems and can cross-
    compile between these platforms.

    Full C source and precompiled binaries for several platforms are
    available from:

    http://www.gnu-pascal.de/alpha/ (Sources)
    http://www.gnu-pascal.de/binary/ (Binaries)

    There is a GNU Pascal mailing list, gpc@gnu.de. To subscribe, write
    an email with the body "subscribe gpc your@email.address" to the
    list robot, gpc-request@gnu.de.

    Framework Pascal (Formerly TMT Pascal)

    Framework Pascal, now at Version 6.1, is a 32-bit compiler with Turbo
    Pascal syntax and is quite compatible with Turbo Pascal.

    Framework Pascal is available from

    http://www.frameworkpascal.com/products.htm

    - Virtual Pascal

    Virtual Pascal, now at Release V2.1 is free. It fully supports DOS
    and Delphi plus Turbo Vision has been ported to 32 bits. There is
    incomplete support for (x86 architecture only) Linux.

    http://vpascal.ning.com/

    On 22 August 2003 Allan Mertner made the modified-for-VP sources
    of TurboPower's Object Professional libraries available on the VP
    site. Legal uncertainties have led to their removal.

    On 24 August 2003 Allan Mertner announced that he is looking into
    Open Sourcing the compiler. More info and discussion about this
    can be found on the Virtual Pascal mailing list, which is archived
    on Topica, http://lists.topica.com/lists/virtualpascal/read
    A direct link to the post that kicked off the discussion is
    http://lists.topica.com/lists/virtualpascal/read?sort=d&start=2665

    On 3 April 2005, Allan Mertner announced the death of Virtual
    Pascal. He will continue to run vpascal.com for "a few more years",
    but development will cease - the main reason for doing so is the
    fact that the compiler is written in assembler and it cannot
    realistically be changed to add new features. Due to copyright
    restrictions, the source will not be made available. There is a
    small possibility that Allan might produce one more maintenance
    release.

    See Also Section 4 on Borland's release of TP compilers.

    ----------------------------------------------------------------------
    How should I unsubscribe from the INFO-PASCAL mailing list?

    Send the message "unsubscribe INFO-PASCAL" to

    mailto:info-pascal-request@brl.mil

    Please do not send such requests (or others) to info-Pascal@brl.mil

    ----------------------------------------------------------------------
    How to use run-time checks?

    The Borland compilers can be set up to trap a substantial number of
    Run-time errors. In the early stages of program development it is
    advisable to enable _ALL_ error-checking options, i.e.

    - $I+ to detect I/O errors
    - $Q+ to detect overflows (BP/TP7 only)
    - $R+ to generate range-checking code
    - $S+ to detect stack overflows
    - $T+ to enable type-checked pointers
    - $V+ to enable strict checking of Var-strings

    The $T+ option is a _compile-time_ error-check. It does not carry
    any run-time overheads!

    Using all of them will in many cases enable you to find problems
    without having to resort to the newsgroup.

    Once a program runs correctly, even with input no sensible user
    would ever enter, you might want to disable all error-checking, with
    the possible exception of I/O checking. However, the high clock
    frequencies of todays CPUs might make the resulting reduction in
    execution time minimal. As an alternative, it might be advantageous
    to put fully debugged, well tested and frequently executed code into
    a separate unit that is compiled without any error-checking.

    ----------------------------------------------------------------------
    How to use Random/Randomize?

    The Randomize procedure is used to initialize the seed of the random
    number generator (RNG) with a value derived from the system time. It
    should only be called once, at the very start of a program. Calling
    it more frequently, especially in loops on fast CPUs, may result in
    it being re-seeded with the same seed on many iterations, which in
    turn results in the Random() function producing the same 'random'
    number over and over again!

    **********************************************************************
    3.1 Pointers to info for assorted questions **********************************************************************

    This section attempts to provide pointers to help and resources for
    some of the other VFAQ's. Any assistance to compile a fuller list
    will be gratefully received.

    Cursor blink problem in Win95 after exiting BPW IDE
    http://www.filewatcher.com/_/?q=tdsvga.zip

    Standalone debugger and profiler do not work under Win95
    File above and use TDWINTH.DLL instead of TDWIN.DLL

    Can I use truetype or other BGI fonts with BP7
    http://www.freetype.org/

    http://web.archive.org/web/20030811232215/www.xs4all.nl/~remcodek/fontpage.html

    Where can I find source code for ZIP files
    http://www.foyeh.org/

    Where can I find a replacement for BGI graphics
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see GrafX

    Where can I find a unit to play through a Soundblaster Card
    http://www.crossfire-designs.de/?lang=en&what=sourcecode
    - see SoundLib

    How can I link C code into my Turbo Pascal Program
    http://www.pedt.demon.co.uk/usenet/c-in-tp.htm

    My computer has more than 64Mb of memory and BP7 will not work
    Add NOVCPI to the DEVICE=EMM386.EXE line in config.sys, config.dos
    and config.win files in the root directory of your boot drive.

    I'm still using Windows 3.1x and TDW has stopped working
    http://www.pedt.demon.co.uk/usenet/ctl.zip

    My mouse does not work in the IDE under Windows 2000
    Windows 2000 has cut and paste for DOS boxes and this feature is
    enabled by default. Right click the top of your DOS Box, look for
    the 'Edit Options' and uncheck 'QuickEdit Mode' and 'Insert Mode'

    My protected mode Turbo Vision programs crash with Runtime Error 216
    Windows NT4, Windows 2000 and Windows XP programs have problems
    with 16 bit far callbacks for the mouse handler. Recompile
    drivers.pas to use polling instead of being interrupt driven. Copy
    of the fixed drivers.pas
    http://www.pedt.demon.co.uk/usenet/drivers.zip

    The problem is also present in 32-bit land.

    **********************************************************************
    3.2 Request for answers **********************************************************************

    - There seems to be reliable evidence that running BP on very fast
    P4 Windows XP systems causes problems (other than RTE 200). Can
    anyone give any clues as to the source of this problem.

    **********************************************************************
    4 Compiler and unit downloads **********************************************************************
    4.1 Borland compilers for download **********************************************************************

    Borland has placed three older versions - V1.0, V3.02 and V5.5 of
    the Turbo Pascal compilers on the Internet for download at

    http://edn.embarcadero.com/museum/antiquesoftware

    As regards any licensing issues, Borland have stated
    "Since the software is old, you can do whatever you want with it.
    You can freely distribute the executable version of programs
    that you develop."

    Brief highlights of the compilers [V3.02 is bug fixed version of
    V3.0 and V7.01 is bug fixed version of V7.0]

    TP V1.0: produces .com files, 64K maximum for code, data and stack
    but you can use the heap for variables.

    TP V3.0: produces .com files, 64K each for code, data and stack.
    Heap can be used. Implements overlays but careful planning needed to
    avoid thrashing the disk. [Hint: Use a RAMdisk]

    TP V5.5: produces .exe files, 64K each for code, any unit, data and
    stack. Heap can be used. Implements decent overlay manager. First TP
    that can use OOP [Object Orientated Programming]. Users of this
    version who need the Delay procedure should read the notes about
    RTE200 in Section 3.

    TP V7.0: OOP plus Turbo Vision and inline assembly language
    available. Users of this version should read the notes about RTE200
    in Section 3.

    **********************************************************************
    4.2 Replacement units for download **********************************************************************

    Borland made the source of the Run-Time Library (RTL) of its later
    products available to the end user, either for an additional fee or,
    in the case of BP7, as a "bonus" disk.

    Using the source it was theoretically possible to write improved
    units.

    **********************************************************************
    4.2.1 Replacement SYSTEM units for download **********************************************************************

    At the moment there are FIVE of them available on Garbo. They are:

    - for TP 5.5:
    ftp://garbo.uwasa.fi/pc/turbopa45/syst55c.zip by James LeMay

    - for TP6:
    ftp://garbo.uwasa.fi/pc/turbopa6/sys60a.zip by James LeMay
    ftp://garbo.uwasa.fi/pc/turbopa6/tpl60n19.zip by Norbert Juffa

    - for TP/BP7:
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70n16.zip by Norbert Juffa
    ftp://garbo.uwasa.fi/pc/turbopa7/bpl70v20.zip by Robert AH Prins

    The units by James LeMay are just faster, Norbert Juffa's units also
    have an increased smart-link granularity because he split up most of
    the original sources into several parts. However, most notable about
    the Norbert Juffa libraries is the greatly improved 6-byte real
    arithmetic, which is now as IEEE-754 compliant as possible within
    the restrictions of the format. Needlessly to say, Norbert's SYSTEM
    units are also substantially faster than Borlands original versions.

    The unit by Robert Prins is based upon Norbert Juffa's code, but it
    has been enhanced significantly. A few of the major changes are:

    - it is based on the BP 7.01 RTL
    - it requires a 32-bit CPU and a 387 class FPU if FPU datatypes are
    used
    - the code has been made Pentium+ friendlier by replacing most of
    the slower CICS type instructions by their RISC type equivalents
    - the code is even more smart-link friendly
    - both the real (TURBO.TPL) and DPMI (TPP.TPL) libraries include a
    non-RTE200 smartlink-friendly CRT unit
    - both contain a much more smartlink-friendly DOS unit (all original
    get/set routines have been broken in two)
    - the FPU based Trunc, Int and Round functions were made re-entrant

    There is an additional very small "SYSTEM" unit available for BP7,
    but it is stripped down to such an extent that, to quote the author

    "... you can't use all the features that the standard RTL has."

    The name of the archive is BPC-TRTL.ZIP and using Google you should
    have no trouble finding a copy.

    Here's an incomplete list of removed features:

    - All System unit procedures, such as WriteLn
    - All runtime error checks (you have to use {$R-,S-,Q-,I-} mode)
    - Return codes (ignore the runtime error messages that IDE shows)
    - Floating-point data types (you have to use {$N-,E-} mode)
    - Heap manager (allocate memory using DOS calls)
    - String handling routines (including the + operation)
    + Some of the LongInt operations: *, /, shr, shl (they still work
    with Integer)
    + Large variable assignments (that involved a procedure call)

    Also, note that you can't compile programs with debug information
    for standalone debugging. However, you can use the integrated
    debugger, or you can compile your program with the standard RTL for
    debugging (and use TinyRTL after the bugs are fixed). Don't forget
    to save your program before you compile it! The compiler crashes
    with an internal error if you occasionally use some of the removed
    features.

    **********************************************************************
    4.2.2 Replacement CRT units for download **********************************************************************

    Following work on a replacement CRT unit to primarily fix the RTE200
    bug in T/BP7, two replacement CRT units are now completed. CRT units
    are included for TP V5, 5.5, 6.0 and 7.0x including protected mode
    units for BP7.0x. Pedt Scragg's ZIP file also includes precompiled
    units for Delphi 1. Robert Prins' unit contains all .OBJ files so
    that users of D1 can roll their own. This unit is included in
    BPL70V20.ZIP.

    The replacement CRT units also include code to allow use of extended
    keys such as F11 and F12 with ReadKey and, if using other than 40x25
    text mode or 80x25,43,50 text mode should not reset text screen to
    80x25.

    Be aware that the unit by Robert Prins (rpcrt100.zip) contains 386
    instructions. It will not run on 8086/88/286 systems, but does not
    test for such systems!

    Pedt Scragg's unit:

    Information at http://www.pedt.demon.co.uk/crt/ including download
    links.

    Download directly from:
    http://www.signpost-design.co.uk/crt.zip
    ftp://ftp.demon.co.uk/pub/ibmpc/dos/programming/crt.zip
    ftp://garbo.uwasa.fi/pc/turbopas/crt.zip

    Robert Prins' unit:

    ftp://garbo.uwasa.fi/pc/turbopas/rpcrt100.zip

    **********************************************************************
    4.2.3 Replacement OVERLAY unit for download **********************************************************************

    Available on Garbo is a replacement Overlay unit. The unit comes
    with the never-made-available by Borland reconstructed sources of
    the original unit. The file containing the replacement unit also
    contains an improved version of Wilbert van Leijen's OVERXMS.ASM
    source, but not the other files in WvL's original archive!
    Both units contain 386 instructions and both are included in
    BPL70V20.ZIP.

    Download from:
    ftp://garbo.uwasa.fi/pc/turbopa7/over-120.zip
    ftp://garbo.uwasa.fi/pc/turbopas/overxms.zip (WvL's original unit)

    **********************************************************************
    4.2.4 Emulator sources for download **********************************************************************

    Borland never made the sources of the hard- and software emulator
    files available. Reconstructed sources, including those of the
    improved version of the hardware emulator by Norbert Juffa, with
    instructions on how to add them to the RTL are also available on
    Garbo:

    ftp://garbo.uwasa.fi/pc/turbspec/em8x-110.zip

    Newer, further optimized and far better commented, versions can be
    found in BPL70V20.ZIP.

    **********************************************************************
    5 Using Borland compilers on modern Operating Systems **********************************************************************

    It is possible to use TP/BP and the programs they compile on 64-bit
    versions of Windows and both 32- and 64-bit versions of Linux, but
    it might be more advantageous to use either Delphi (for Windows) or
    FreePascal (for Windows and Linux) to do so.

    **********************************************************************
    5.1 Windows 64-bit **********************************************************************

    64-bit versions of Windows XP/Vista/7 no longer support running the
    16-bit programs generated by the various versions of Borland and
    Turbo Pascal. It may be possible to run BP/TP non-Windows programs
    using DOXBox http://www.dosbox.com/ currently at version 0.73, with
    version 0.74 apparently just around the corner.

    Another option, for users of W7 Ultimate is to download the XP
    emulator.

    **********************************************************************
    5.2 Linux **********************************************************************

    To run TP/BP and the programs they create on Linux you can use
    DOSEMU http://dosemu.sourceforge.net/

    **********************************************************************
    5.3 Virtual Machines **********************************************************************

    A final option, usable for both 64-bit Windows and all versions of
    Linux, it to download a virtualisation program, such as

    - Oracle's VirtualBox http://www.virtualbox.org/
    - Bochs http://bochs.sourceforge.net/

    and run DOS or Windows in a virtual machine.

    **********************************************************************
    Appendix A - ftp Mirror sites (Choose the closest to you) **********************************************************************
    Public, authorized Garbo mirror sites:

    From Timo Salmi, 2003-03-07:

    > Garbo's mirrors are hardly relevant in this day and age. The main
    > site is enough.
    > Anyway: http://lipas.uwasa.fi/~ts/garbinfo/garbmirr.html

    Simtel.Net

    Simtel.Net is a worldwide distribution network for Shareware,
    Freeware and Public Domain programs for MS-DOS, Windows 3.x and
    Windows 95/98.

    For a complete Simtel.Net list, send mail to listserv@Simtel.Net
    with body:
    get mirrors.info

    You can also get a list of mirror sites and directory descriptions
    from
    news:comp.archives.msdos.announce
    news:comp.archives.ms-windows.announce

    Look for the subjects
    List of Simtel.Net MS-DOS dirs w/descriptions
    List of Simtel.Net authorized mirror sites

    The Simtel mirrors should also be listed at
    ftp://ftp.simtel.net/pub/simtelnet/MIRRORS.TXT

    **********************************************************************
    Appendix B - Credits **********************************************************************
    Scott A. Moore - Original posting guidelines
    Dr John Stockton - WWW sites, many corrections/tips
    Prof. Timo Salmi - Garbo mirrors, corrections
    Anthon Pang - Beta testing WWW sites
    Keith Petersen - Simtel.Net information
    Marco van de Voort - Additional FPC info
    Tom Wheeley - Creator of this FAQ
    Chris Mathews - Previous maintainer of this FAQ
    Pedt Scragg - Previous maintainer of this FAQ

    Not forgetting those not mentioned whose contributions have also
    helped to keep the mFAQ up-to-date and useful. **********************************************************************
    Thank you for reading the Mini-FAQ

    Copies available from
    - ftp://garbo.uwasa.fi/pc/doc-net/faqclpb.zip
    - http://www.merlyn.demon.co.uk/clpb-faq.txt
    - ftp://ftp.demon.co.uk/pub/doc/faq/clpb/faqclpb.zip

    Old versions from http://www.merlyn.demon.co.uk/oldpfaqs/

    Comments, additions, alterations and corrections to
    <mailto:clpbfaq at prino dot net>

    Please do not be backward about coming forward if you have additions
    to the mFAQ. All suggestions, broken or amended links, suggestions
    for altering the content of the mFAQ are warmly welcomed.

    This mini-FAQ is (C) Copyright Robert AH Prins 2002-2011 on behalf
    of the newsgroup comp.lang.pascal.borland. Upon change of
    maintainer, the copyright will automatically pass over to the new
    maintainer. Except for the name of the maintainer and dates, the new
    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)