Skip to main content

Setting up DOSBOX in Ubuntu/Linux to run Turbo C/Cpp

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.
    • mount c /home/your.user.name/dos
    • 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

Popular posts from this blog

Balloon Shooting game in cpp

Balloon Shooting Game is a simple game using c and cpp features. You can easily learn and is easy to run because this game works in TURBOC compiler. The main features are included is  GRAPHICS and DOS commands. Basic commands used in this game : initgraph : initgraph is used to initialising of graphics mode in the program.                   ex. initgraph(&gm,&gd,"akshay"); here gm uses Graphics detect mode and gd points to graphics features to be used in program ans last is a string it may be any string like c://tc/bin etc.. setbkcolor : sets the current background color.    for ex. if you want to set background color to blue, you can call   setbkcolor(BLUE); or setbkcolor(1); getimage : saves a bit image of the specified region into memory. putimage : outputs a bit image onto the screen. settextstyle : sets the current text characteristics.     Declaration : settextstyle(int font, int direction, int charsize); outtextxy : displays a string a

Make your own paint application in c and cpp

Paint application using simple turboc complier. Hello friends now make your own paint application or mini project in your simple c and cpp compiler. click to show the code for paint program

Minesweeper Game in C

Minesweeper Game in C language. This game is like a windows minesweeper game and I am giving you all the code for this game. You can easily understand the code if you are not a beginner. For beginners this code will quite hard to understand. Because in this code it contains mouse pointing function, graphics function, and so many other codes which makes it so hard to play and is a mind game. So play and enjoy it.   Click here for code Click for code