Recently I needed to analyze one of my ancient C programs that was running under MS DOS. I had some problems converting it to gcc or Visual C++, because this program was written in Borland Turbo C 2.0, which uses quite non-standard procedures. So, I’ve decided to build a DOS VM and install Turbo C 2.0 which is a free download from here. In addition, I’ve decided to connect this VM box to the network. In order to do that, I needed:
- VMware Workstation (VirtualBox might also work)
- MS DOS 6.22 install files (you have to find these somehow)
- MS Network Client 3.0 for DOS (free download from here and here)
- MS DOS driver for AMDPCNet network card (attached as AMD.zip)
- WinImage (shareware version, you can use it for 30 days for free, download here)
- DOS CD driver (attached as DOSCDDRV.ZIP)
Finally, click “Next” and “Finish“.
NOTE: If you have your MS-DOS files on a physical floppy, you can tell VMware Workstation to use them directly. If not, make sure that these virtual floppy files are in IMG format. Use this link to see how to make an IMG file, but pretty much, just use WinImage.
Click on “Edit virtual machine settings”, select the Floppy drive, make sure that “Connect at power on” is checked, and then select one of the two options: Use physical drive or use floppy image file. Click “OK” and click “Power on this virtual machine”, just above “Edit virtual machine settings”. You can ignore this message; you can even remove the CD/DVD and Sound Card from the list of devices so you don’t get this error.
Do the same when you are prompted for the 3rddisk. When finished, MS-DOS will tell you to remove the floppy from the drive. As you did before, right-click the floppy icon in the lower-right corner and choose Disconnect. Hit Enter twice and once the OS reboots, you’ll be greeted with plain old MS-DOS 6-22.
In the menu, click Image | Inject, select the dsk3-1.exe file, and click Yes when prompted. Then, click File | Save As, and from the drop-down menu select Virtual Floppy Image, type DISK1.FLP for the file name and click Save.
You should see that DSK3-1.EXE is there.
A:\>mkdir c:\temp\d1 A:\>dsk3-1 c:\temp\d1
Go back to WinImage and create a virtual floppy for the second file DSK3-2.EXE. Mount the DISK2.FLP in VMware Workstation and again:
A:\>mkdir c:\temp\d2 A:\>dsk3-2 c:\temp\d2
Now, extract AMD.zip somewhere on your desktop, open the archive and create another virtual floppy. This time instead of injecting three files, just choose the option to inject the NICdrv folder. Finally, mount the virtual floppy under DOS. In DOS start typing:
A:\>cd c:\temp\d1 A:\>C: C:\temp\d1\>setup
When prompted hit Enter, choose the default directory C:\NET and after 10-15 seconds, select *Network adapter not shown on list below.
The installer will prompt you for the path to the drivers, so just delete the default C:\temp\d1 and replace it with A:\
Hit enter twice until you are prompted to enter the username. Put whatever you want. DOS will use your username and make it also the computer name. When you reach to this screen…
… scroll up to “Change Names” and change the computer name to something else if you want. The most important thing is to change the network configuration. By default, TCP/IP is not installed, so go to “Change Network Configuration”, select “Add Protocol”…
If it works you are all set. If there are any problems, you may refer to this link for troubleshooting.
If you want to add a CD-ROM to your DOS install, download the DOSCDDRV.ZIP. The link is all the way up.
Unzip it and you’ll have an IMG file. Mount the IMG file as you did with the DOS IMG floppies, copy the oakcdrom.sys file to C:\DOS folder and then add the highlighted lines to config.sys and autoexec.bat.