Friday 22 June 2012

Turbo C Compiler in 64-bit Windows 7

One of my friends was asking me how to run Turbo C in Windows 7 - 64 bit systems. In my old PC, I had 32 bit Windows 7 and it was working fine for me. The age-old Borland's Turbo-C compiler will not work with the 64 bit edition because of lack of 64 bit compatibility.


Even now, I don't recommend you using Turbo C. Reason: Its old. Anything old, its not very stable for serious development. For windows, you could use Eclipse IDE with gcc plugin for C and C++ development.

 Anyways, coming back to installing Turbo C in 64-bit Window 7. We'll be doing this using an OpenSource software called DOSBox. DOSBox is an emulator which is available for both Windows and Linux which emulates DOS system in the host PC.


Step 1: Downloading necessary packages:

First, download the necessary packages below either from the official link or the Mirror link. Try the mirror only if you have problem with the official link

  • DOSbox Emulator - Download
    • Size : 1.4 MB
    • Version: 0.74
  • Borland's Turbo C installer- Download
    • Size : 3.26 MB
    • Version: 3.0

Step 2 : Installing and configuring DOSBox

   Install DOSBox in your system in any preferred location and launch it. You'll get the DOS prompt somewhat similar to the pic below




  • Create a folder in your C: drive as TurboCInstaller and move the extracted files from tc3.zip into that folder
  • We'll mount the virtual A: as the Turbo C Installer Disc
  • In DOSBox, type the following command
mount a c:\TurboCInstaller\
  • Now, create a new folder in C:\ as Turbo and we'll mount virtual C: for installing Turbo C. In DOSBox type the following command,
mount c c:\Turbo
  • Now, move to A:\ and install Turbo C 
A:

install.exe
While installing, just change the location to C:\ and complete the installation

Step 3 : Some Tweaks

      By default, in DOSBox Ctrl+F9 quits it. So, whenever we try to run something in our TurboC DOSBox will quit which makes us use the mouse everytime to navigate to the menu and run our program. We can prevent this by editing the keymapper

     In DOSBox, Press Ctrl+F1 to invoke the keymapper. The keymapper will be like this

With your mouse, click on the ShutDown box (circled above) and click on Del The entry is now deleted. Click in Save button to save the keymapper settings and exit.


Step 3 : Using Turbo C


         Close DOSBox now and follow the steps below, whenever you want to use Turbo C
  • Launch DOSBox
  • Execute the below command to mount the Turbo C directory
mount c c:\Turbo
  • Then, execute the below commands one by one to navigate to C: and launch Turbo C
C:
cd TC\BIN
TC




You can also use Alt+Enter to enter Full Screen mode.

If you run into any problems or have any other difficulties or suggestions, feel free to comment below. :)

No comments:

Post a Comment