Skip to content

johangardhage/dos-tpdemos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dos-tpdemos

Retro programming in Borland Turbo Pascal 7

Screenshot

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

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

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

    $ 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

    $ mv tpsetup ~/DOSBox/
    
  6. Configure DOSBox

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

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

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

    In the installation program, select the following options

    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

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

Build demos from DOS terminal

  1. Execute build script

    C:\TPDEMOS> buildall.bat
    

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

  2. Run demo

    C:\TPDEMOS> build\demo01.exe
    

Build demos from Borland Turbo Pascal IDE

  1. Start Borland Turbo Pascal IDE

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

    Press ALT+O for options

    Select Directories and type in the following directories

    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

    [X] 286 instructions
    

    Select Environment, Preferences and the following options

    [ ] Auto save
    [ ] Change dir on open
    

    Select Environment, Editor and the following options

    [ ] 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

Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot

Releases

No releases published

Packages

No packages published