Retro programming in Borland C++ 3.1
To build and run the Borland C++ demos, you must first install the following tools:
$ sudo zypper install dosbox mtools p7zip-full
$ sudo apt install dosbox mtools p7zip-full
When starting dosbox the first time, the configuration file ~/.dosbox/dosbox-0.74-2.conf will be generated
-
Download
Borland C++ 3.1 & Application Frameworks (3.5).7z -
Create a directory which will contain the DOS C: drive
$ mkdir ~/DOSBox -
Extract the downloaded Borland C++ archive
$ 7z x "Borland C++ 3.1 & Application Frameworks (3.5).7z" -
Extract the Borland C++ disk images
$ cd "Borland C++ 3.1 & Application Frameworks (3.5)"/ $ mkdir bcsetup $ for i in *.img; do echo $i; mcopy -m -i $i :: bcsetup; done -
Move the extracted files to the DOS C: drive
$ mv bcsetup ~/DOSBox/ -
Configure DOSBox
Edit
~/.dosbox/dosbox-0.74-2.confand add the following autoexec options[autoexec] mount c ~/DOSBox path %PATH%;C:\BORLANDC\BIN c: -
Start
dosboxand execute the Borland C++ installation program$ dosbox C:\> cd bcsetup C:\BCSETUP> install.exeIn the installation program, select the following options
Enter the SOURCE drive to use: C Enter the SOURCE Path: \BCSETUP Windows Options... WINDOWS Capability: No Start Installation
Link the dos-bcdemos git repository to the DOS C: drive
$ ln -s ~/git/github/dos-bcdemos ~/DOSBox/bcdemos
-
Execute build script
C:\BCDEMOS> buildall.batThe demos will be located in the
C:\BCDEMOS\BUILDdirectory -
Run demo
C:\BCDEMOS> build\demo01.exe
-
Start Borland C++ IDE
C:\BCDEMOS> bc -
Configure Borland C++
Press
ALT+Ofor optionsSelect
Directoriesand type in the following directoriesInclude Directories: C:\BORLANDC\INCLUDE;C:\BCDEMOS\SRC Library Directories: C:\BORLANDC\LIB Output Directory: C:\BCDEMOS\BUILDSelect
Debuggerand the following optionsProgram Heap Size: 512 K BytesSelect
Environment,Preferencesand the following options[ ] Auto-SaveSelect
Environment,Editorand the following options[ ] Create backup filesSelect
Save -
Open demo source file
Press
F3to open file -
Build demo source file
Press
F9to build file -
Run demo
Press
ALT+RandRto run demo
Licensed under MIT license. See LICENSE for more information.
- Johan Gardhage
- Original code written by Ben Houston










