Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

dos-tpdemos

Retro programming in Borland Turbo Pascal 7

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

dos-tpdemos

Retro programming in Borland Turbo Pascal 7

Prerequisites

To build and run the Borland Turbo Pascal demos, you must first install the following tools:

Install DOSBox

openSUSE

$ sudo zypper install dosbox mtools p7zip-full

Ubuntu

$ sudo apt install dosbox mtools p7zip-full

Configuration

When starting dosbox the first time, the configuration file ~/.dosbox/dosbox-0.74-2.conf will be generated

Install Borland Turbo Pascal

  1. Download Borland Turbo Pascal 7.1 (3.5).7z

  2. Create a directory which will contain the DOS C: drive

    pascal
    $ mkdir ~/DOSBox
  3. Extract the downloaded Turbo Pascal archive

    pascal
    $ 7z x "Borland Turbo Pascal 7.1 (3.5).7z"
  4. Extract the Borland Turbo Pascal disk images

    pascal
    $ cd "Borland Turbo Pascal 7.1 (3.5)"/
    $ mkdir tpsetup
    $ for i in *.img; do echo $i; mcopy -m -i $i :: tpsetup; done
  5. Move the extracted files to the DOS C: drive

    pascal
    $ mv tpsetup ~/DOSBox/
  6. Configure DOSBox

    Edit ~/.dosbox/dosbox-0.74-2.conf and add the following autoexec options

    pascal
    [autoexec]
    mount c ~/DOSBox
    path %PATH%;C:\TP\BIN
    c:
  7. Start dosboxand execute the Borland Turbo Pascal installation program

    pascal
    $ dosbox
    C:\> cd tpsetup
    C:\TPSETUP> install.exe

    In the installation program, select the following options

    pascal
    Enter the SOURCE drive to use: C
    Enter the SOURCE Path: \TPSETUP
    Install Turbo Pascal on a Hard Drive
    Start Installation

Build demos

Link the dos-tpdemos git repository to the DOS C: drive

pascal
$ ln -s ~/git/github/dos-tpdemos ~/DOSBox/tpdemos

Build demos from DOS terminal

  1. Execute build script

    pascal
    C:\TPDEMOS> buildall.bat

    The demos will be located in the C:\TPDEMOS\BUILD directory

  2. Run demo

    pascal
    C:\TPDEMOS> build\demo01.exe

Build demos from Borland Turbo Pascal IDE

  1. Start Borland Turbo Pascal IDE

    pascal
    C:\TPDEMOS> turbo
  2. Configure Borland Turbo Pascal

    Press ALT+O for options

    Select Directories and type in the following directories

    pascal
    EXE & TPU directory: C:\TPDEMOS\BUILD
    Include directories: C:\TPDEMOS\ASSETS
    Unit directories: C:\TP\UNITS;C:\TPDEMOS\SRC\LIB

    Select Compiler and the following options

    pascal
    [X] 286 instructions

    Select Environment, Preferences and the following options

    pascal
    [ ] Auto save
    [ ] Change dir on open

    Select Environment, Editor and the following options

    pascal
    [ ] Create backup files

    Select Save

  3. Open demo source file

    Press F3 to open file

  4. Build demo source file

    Press F9 to build file

  5. Run demo

    Press ALT+R and R to run demo

License

Licensed under MIT license. See LICENSE for more information.

Authors

  • Johan Gardhage

Screenshots