Table of Contents
Installing Turbo Pascal on DOSBox-X
Let's look at installing Turbo Pascal with DOSBox-X.
Let's assume you have a folder called my-dos in your home folder. Unzip the contents of your download into this folder. If you downloaded from the Internet Archive, you only need to unzip the package and you have all the files ready to go in a directory named TP\.
In DOSBox-X, run this command to mount the C:\ drive to the folder in your home directory:
mount c ~/my-dos
Then you can navigate and browse the drive:
C: dir
If you want to automate that mounting process every time you run DOSBox-X, then go to the DOSBox-X menu → Main → Configuration tool then click AUTOEXEC.BAT. Add that line mount c ~/my-dos and it will run every time you startup.
Install from floppy disk images
NOTE: If you downloaded a copy from WinWorld and not The Internet Archive, then you have a copy of the 4 install disks and you need to run the installer yourself. This section is not necessary if you downloaded from The Internet Archive and you unzipped the contents to get the TP\ folder that is ready to go. This is only necessary if your download contains nothing but the floppy disk image files.
Copy the four floppy disk image files (Disk01.img through Disk04.img) to your ~/my-dos/ folder (you may need to restart DOSBox-X if you copy them while DOS is already running).
Then, mount those floppy disks to the A:\ drive and then run the installer with these commands:
imgmount a disk*.img A: install
Then run through the installer. When it prompts you to enter the next floppy disk, go to the DOSBox-S menu → Drive → A → Swap disk. This will act as if you took out and replaced the floppy with the next disk you had in line. Since we mounted all 4 at once earlier, it already has the next disk lined up. Keep doing that until the installer is done.
Setup PATH
If you installed Turbo Pascal to the folder, C:\TP then you can run it directly with the command:
C:\TP\BIN\TURBO
But I recommend setting up your %PATH% environment variable so you can run it from anywhere just with the TURBO command. It will also make available the other tools that come with it like MAKE, the compiler TPC, and utilities like GREP.
To setup your PATH environment variable, you can run this command to append the Turbo Pascal:
PATH=%PATH%;C:\TP\BIN\
Now it won't matter what directory you are in or what drive you are on, you can run TURBO and the IDE will launch. Same with any other program in that BIN folder.
I recommend also adding that line to your AUTOEXEC.BAT by going to the DOSBox-X main menu → Main → Configuration tool → AUTOEXEC.BAT. You can also add a line of C: so it automatically switches to your C drive for convenience. So, your AUTOEXEC.BAT should have these lines in it:
mount c ~/my-dos PATH=%PATH%;C:\TP\BIN\ C:
Running the IDE
You are now ready to rock. Try running the IDE:
turbo
Learn more
Now that you have installed Turbo Pascal, check out my Turbo Pascal Cookbook for more tutorials.
