Setting up DOSBOX in Ubuntu/Linux to run Turbo C/Cpp
What is DOSBOX?
DOSBOX emulates an Intel x86 PC, complete with sound, graphics, mouse, modem, etc., necessary for running many old DOS games/applications that simply cannot be run on modern PCs and operating systems, such as Microsoft Windows 10, Windows 8, Linux and other os versions. However, it is not restricted to running only games. In theory, any DOS application should run in DOSBox, but the emphasis has been on getting DOS games to run smoothly.
How to Install Dosbox
To install DOSBOX in Ubuntu version older than 16.04, Mint go to Software Center. Search for DOSBOX and click install.
To install DOSBOX in Ubuntu 16.04 LTS and above, open GNOME Software from dash and search for DOSBOX, then click install.
For other Linux distributions, go to DOSBOX download page.
Setup DOSBOX to run old DOS programs
- After installation is complete, go to Ubuntu dash/search for DOSBOX.
- Click DOSBOX icon to start.
- You should be seeing DOSBOX’s own terminal with a virtual
Z:\
Drive.
For this tutorial I have used old TURBO C dos based editor which was used to create C and C++ applications.
- Create a directory where we would be mounting the drives.
- Go to your HOME directory (
/home/your.user.name/
). - Create a directory named “dos” (You can choose any name you want)
- Copy your dos programs – for this example the entire TURBO C files into the new created directory “dos”.
- Go back to your DOSBOX terminal and run below command. This command will mount the “dos” directory contents as virtual drive C:\ in DOSBOX.
- Go to new mounted drive using C:\
- Browse to your application directory executable file (*.exe) and type the same to run. For this example, TURBO C executable resides in TC\BIN\TC.EXE
- You can see your application is running inside the DOSBOX emulator.
Comments
Post a Comment