What is DOS?

DOS stands for Disk Operating System and it is a command line interface OS for IBM Personal Computer systems and clones. Although IBM originally used the acronym DOS in the early 1970's for their disk OS for IBM System/360, the 1970's version of DOS (later replaced by VSE) is not the same as what we commonly know as DOS. In computer science, many terms are confusing and DOS is one of them. To make matters ever more confusing, one of the biggest misconceptions nowadays is that we think of DOS and MS-DOS as a synonyms. In reality, MS-DOS is Microsoft's version of DOS.

MS-DOS (Microsoft)

IBM PC, 1981In the early 1980's Microsoft bought the source code for 86-DOS (commonly referred to Quick and Dirty Operating System, QDOS), which was developed by Tim Paterson for the Intel 8086 microprocessor, for Seattle Computer Products. 86-DOS contained about 4,000 lines of assembler. QDOS later became PC DOS for the IBM Personal Computer system on August 1981. DOS was not developed originally by Microsoft and Bill Gates (in his book The Road Ahead, 1995) recognizes Tim Paterson as the father of DOS. Although Microsoft's version of DOS (MS-DOS) has become obsolete, many DOS clones and OS that can interpret DOS exist and are commonly used.

What is left of MS-DOS is reduced and hidden in C:\WINDOWS\COMMAND in Windows 9x, C:\WINNT\SYSTEM32 in Windows NT 4 or C:\WINDOWS\SYSTEM32 in Windows NT 5 (XP) and up — not to be confused with PowerShell (C:\WINDOWS\SYSTEM32\WINDOW~1\V1.0). would like to see DOS included back in Windows as a stand-alone OS (similar to what Mac OS X did with Unix). Worse of all, Windows NT 4 and up use an emulation of MS-DOS 5.0 that makes our life hell when trying to work with old DOS commands and batches. Some of these commands do not work anymore or exist anymore. Microsoft forces users to use the less effective Windows 4.xx versions of programs that were reliable in DOS.

MS-DOS as a stand alone OS (less than 5 MB in MS-DOS 6.22) has not been marketed by Microsoft, since 1994. Microsoft opted to concentrate on the Windows graphical OS project in 1983 (marketed against Steve Jobs' Apple Macintosh, 1984).

DOS originally included BASIC, which later became QuickBASIC and then QBasic (QBASIC.EXE). Nowadays, Microsoft does not include any programming language by default. QBASIC.EXE has to be copied from D:\OTHER\OLDMSSDOS (download link) to C:\WINDOWS\COMMAND.

DOS Shell (230 KB) was last included in MS-DOS 6.2. Amazingly PC DOS Shell from PC DOS was dropped around the same time.

The D:\OTHER\OLDMSSDOS (Old MS-DOS) directory on the Windows 95/98 disk has 17 files. Note that D: is your CD-ROM drive and that there is no TREE, just DELTREE. See directory below.

Windows 3.1 was the last version running as a system program running on the MS-DOS OS. The MS-DOS OS is the foundation of Windows 4.x. Windows NT 4 and up are based on a different kernel and its CMD.EXE file merely emulates MS-DOS 5.0.

Maybe you can get your hands on any used copy of MS-DOS 5.0 (1991) or MS-DOS 6.22 (1994). Be careful since Microsoft might consider the latter activity illegal. You can download free of charge of charge and use FreeDOS.

Installing MS-DOS on i386 & i486 Systems:

This technique is different from what most nowadays books indicate, using FAT 16. The only drawback of installing FAT 16 DOS is that the HDD has be divided into partitions not larger than 2 GB each (seen by the system as separate disks). The first partition is primary and the rest are logical partitions.

You can also use a RAM drive (RAMDRIVE.SYS), which will increase memory performance similar to paging. Since it is not a physical disk, you should not save anything on it that you really want to save.

These instructions cover MS-DOS only although they might also apply to DOS clones. Reference to PC DOS 2000 is supplied. Unfortunately do not have experience on other versions of DOS like DR-DOS 7.03 (only 3.13 MB, 3 floppies), which is differently and not normally taught in schools.

The installation procedure, explained in this site, is different from what most books might tell you. Both CONFIG.SYS and AUTOEXEC.BAT are changed. Memory (RAM) is improved. By using this technique, a DOS and Windows set-up would work almost as well as Unix.

Run FDISK.EXE from the boot disk.

            A:\FDISK
          

View old partitions, if any, and delete them.

Delete first non-DOS partitions, then logical, then extended and finally the primary (if any).

Make primary partition. Since MS-DOS has a FAT 16 architecture, MS-DOS cannot read more than 2 GB at a time.

Make secondary partitions (less than 2 GB). On the secondary partition, make logical partitions if needed. If the logical partition is close or over 2 GB, make 1 GB partitions. Then FORMAT each partition.

            A:\FORMAT C:
            A:\FORMAT D:
            A:\FORMAT E:
          

Install MS-DOS 6.22 or PC DOS 7 or 2000 on the HDD.

Make sure CONFIG.SYS recognizes as many logical partitions as you need. The total number cannot exceed 26 logical partitions (one for each letter of the English alphabet). Each partition will be assigned a letter by MS-DOS.

            LASTDRIVE=Z
          

Create backup files (.BAK) of CONFIG.SYS and AUTOEXEC.BAT before doing changes. Should there be a problem while booting, change CONFIG.BAK and AUTOEXEC.BAK back to CONFIG.SYS and AUTOEXEC.BAT accordingly. It is better to be safe than sorry.

Open CONFIG.SYS and AUTOEXEC.BAT with EDIT on MS-DOS or E on PC DOS. Then save them with the new names.

            C:\EDIT
            C:\E
          

You may also copy them to new files with different names, of course.

            COPY AUTOEXEC.BAT AUTOEXEC.BAK
            COPY CONFIG.SYS CONFIG.BAK
          

At this point, you can create the RAM drive (or virtual disk) that mentioned before.

            DEVICEHIGH=C:\WINDOWS\RAMDRIVE.SYS 2048 /E
          

Do changes on CONFIG.SYS by adding the following lines to mount a CD-ROM in MS-DOS.

            DEVICEHIGH=PRE>C:\DOS\AOATAPI.SYS /D:IDECD000/Q
          

Then edit AUTOEXEC.BAT.

            LH=C:\DOS\MSCDEX.EXE /D:IDECD000
          

Copy AOATAPI.SYS to the HDD from MS-DOS boot disk. Both CONFIG.SYS and AUTOEXEC.BAT need this file, so copy it to your HDD.

            A:\COPY AOATAPI.SYS C:
          

Run MEMMAKER (MS-DOS 6.x) to optimize memory management in MS-DOS. PC DOS does not have MEMMAKER, but rather RAMBOOST, which does a similar job, including EMM386.EXE to simulate expanded memory.

reboot system pressing F8, which will let you confirm each step of the CONFIG.SYS and AUTOEXEC.BAT. If there is a problem, reboot system pressing F5 bypassing CONFIG.SYS and AUTOEXEC.BAT. Change CONFIG.BAK and AUTOEXEC.BAK to CONFIG.SYS and AUTOEXEC.BAT. Repeat instructions or throw these instructions away. Either way, it is still a fun learning experience.

Make sure the BIOS will read CD-ROM first. Follow instructions provided by the computer maker.

Reboot system with the Windows CD-ROM or 3.5 floppies. If you are installing Windows 3.1 on an i386 or i486 PC, check out the Calmira shell.

Depending on your needs, you might need to connect the system to a network (internet or LAN, most likely), or not. If you do, you need to load to memory the correct packet driver for the network card (NIC) on boot. Note that the packet driver is a COM file ending on PD (for packet driver). Add the following line to AUTOEXEC.BAT replacing FOOBARPD.COM with the correct packet driver file name.

            LH FOOBARPD.COM 0X60 5 0X300
          

In the example above, the first parameter (0X60) sets the interrupt. The second one (5) sets the IRQ and the last one (0X300) sets the I/O port.

Maintaining a Hard Drive Running MS-DOS & Windows:

have put together a batch file (set of organized command), which will DEFRAG and SCANDISK your HDD. The batch is compatible with i386 clones with DOS like FreeDOS. Keep in mind that you can only run the batch in MS-DOS, not from .

If you do not want to see the DOS commands while the batch file is running, edit the batch turning ECHO off.

            ECHO OFF
          

All files are randomly saved on your HDD. A practical way to manage your HDD would be having all parts that form a file together. DEFRAG organizes files fully (/F), defragments files leaving space between them (/U), sorts them by extensions (/SE) and skips using extended or upper memory (/SKIPHIGH).

            DEFRAG /F/U/SE/SKIPHIGH C:
          

SCANDISK repairs problems that your all disks may have automatically without prompting (asking), deletes errors, skips summary, and checks the surface the disk. This line of code might not work with other types of DOS.

            SCANDISK /ALL/AUTOFIX/NOSAVE/NOSUMMARY/SURFACE
          

The batch creates (if not already created) and assigns C:\TEMP as the temporary directory instead of using C:\DOS or C:\WINDOWS as a temporary directory. Some programs delete the temporary directories after installation. This would be serious trouble if the installation routine deleted the C:\DOS directory.

            IF NOT EXIST C:\TEMP MKDIR C:\TEMP
            TEMP=C:\TEMP
          

If you are running Microsoft Office 6.0 or earlier, you might want to delete all temporary files, which start with the tilde character (~).

            DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A
          

Note that using the recursive switch (/S) in DEL tells the system to delete a certain criteria (in this example, ~*.*) in all subdirectories from a specific starting point, (in this example, C:, meaning the whole drive).

To delete any temporary files created by other programs, delete by force the contents of the C:\TEMP directory and all subdirectories without being prompted to confirm deletion, regardless of their attributes.

            DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A
          

If you want to generate a log of the deletions, send the output to text file (for this example, FOOBAR.TXT). In the example below, the system will first write the date (%DATE%) and time (%TIME%) when the batch is run and two blank lines (ECHO.) after the log has been generated for cosmetic purposes. The blank lines can be excluded.

            ECHO OFF
            ECHO %DATE% %TIME% > FOOBAR.TXT
            DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT
            DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
          

Putting all the commands together, your batch file would look as the sample below.

            ECHO OFF
            ECHO %DATE% %TIME% > FOOBAR.TXT
            DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT
            DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
            DEFRAG /F/U/SE/SKIPHIGH C: > FOOBAR.TXT
            SCANDISK /ALL/AUTOFIX/NOSAVE/NOSUMMARY/SURFACE > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
          

Note that is good practice to leave blank lines between sections of a batch file to make it easier to read. These lines do not affect the functionality of the batch file (no speed increase or delay). Therefore the sample above is the same as the one below, but the one below is easier on the eyes.

            ECHO OFF

            ECHO %DATE% %TIME% > FOOBAR.TXT

            DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT
            DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A > FOOBAR.TXT

            ECHO.  > FOOBAR.TXT

            DEFRAG /F/U/SE/SKIPHIGH C: > FOOBAR.TXT
            SCANDISK /ALL/AUTOFIX/NOSAVE/NOSUMMARY/SURFACE > FOOBAR.TXT

            ECHO.  > FOOBAR.TXT
            ECHO.  > FOOBAR.TXT
          

Of course, follow this instructions at your own risk. Although these commands will not normally hurt your system, do NOT blame if something goes wrong and/or if you delete important data by mistake (disclaimer).

Versions of DOS Compatible with MS-DOS:

DR-DOS (Digital Research)

DR-DOS was an alternative to MS-DOS and PC DOS during the DOS heyday in the 1980's. It has changed owners in the past two decades from Digital Research to Novell as Novell DOS (1991), to Caldera as OpenDOS (1996), to DeviceLogics once again as DR-DOS (2002). Since its last incarnation, DR-DOS/OpenDOS Enhancement Project was started as a community initiative to keep its open source up to date with technology.

FreeDOS

FreeDOS (Free-DOS, PD-DOS) by Jim Hall is a 16-bit/32-bit open source MS-DOS clone based on DOS-C (1994) by Pat Villani that can "reproduce the functionality of MS-DOS.". Within modern DOS clones, FreeDOS seems to be the most popular choice. As such, it is my DOS of choice.

The previous is quoted from http://www.freedos.org/software/?cat=base.

Multiuser DOS

Multiuser DOS (MDOS) is a real-time OS.

MSX-DOS

MSX-DOS was a version of DOS developed by Microsoft in 1984 for MSX systems, which combined MS-DOS 1.0 and CP/M.

New-DOS

New-DOS (not to be confused with NEWDOS or NewDOS) is proprietary MS-DOS clone in German with command-line tools via built-in menus and even a built-in text-only web browser.

NewDOS

NewDOS (not to be confused with New-DOS or NEWDOS) is another MS-DOS clone.

NEWDOS

NEWDOS (NewDOS or NEWDOS+; not to be confused with New-DOS or NewDOS) was designed for TRS-80 series of computers.

NTFSDOS

NTFSDOS developed by System Internals (now Winternals) allowed users see NTFS partitions (NT 4/5 encrypted partitions) as regular DOS FAT 16 partitions. To no one's surprise, if NTFSDOS could break Microsoft's encryption in order to access a drive as plain DOS, Microsoft was bound to acquire it and remove it from the market (2006).

NX-DOS

NX-DOS is a 16-bit/32-bit MS-DOS clone for embedded x86 systems that uses RX-DOS memory management.

NX-DOS installation screen,
            courtesy of the NX-DOS Project as SourceForge

PC DOS (International Business Machines)

PC DOS is made by IBM as PC DOS 2000 (IBM's fifteenth version of the OS, including fixes, while still being FAT 16). It is more reliable than Microsoft's latest commercial version (MS-DOS 6.22). IBM indicates that PC DOS 2000 can give users an additional 40 KB of free disk space. There is further information on PC DOS 7. Read what found on PC DOS 6.3. Also refer to the batch file to maintain your HDD running on PC DOS.

PTS-DOS (PhystechSoft)

PTS-DOS, "is a powerful and fastest DOS with a simple graphical file manager and FAT 32 architecture. PhystechSoft also has distribution."

ROM-DOS

ROM-DOS includes Borland SDK and is "much more than an inexpensive replacement for MS-DOS, designed for embedded and mobile computing environments" with access to FAT 32.

Versions of DOS Incompatible with MS-DOS:

Apple DOS

Apple DOS was Apple's OS for Apple II (1977). It was replaced by ProDOS (1983), related to Sophisticated Operating System (SOS, 1980).

Atari DOS

Atari DOS was the OS Atari 8-bit home computers (1979-1982). Various versions were available in the market by third-party vendors/developers.

Commodore DOS

Commodore DOS (CBM DOS) was a beast of its own running from ROM.

DOS/VSE

DOS/VSE is "DOS then DOS/VS then DOS/VSE then VSE/SP then VSE/ESA (current) mainframe OS from 1964 till today [which] has its own half dozen file systems neither FAT 16-bit/32 nor NTFS, not Linux compatible" (thanks Pete).

RX-DOS

RX-DOS (with only eight files) supports FAT 12, 16 and 32. RX-DOS does not support Windows and may support Linux. The OS has some bugs.

MS-DOS Emulators (Command Prompt Interpreters):

4DOS

4DOS was a MS-DOS 5.0 emulator and COMMAND.COM replacement by JP Software. Nowadays the vendor markets its CMD.EXE replacement for Windows NT named Take Command (TCC).

DOSBox

DOSBox is a MS-DOS 5.0 emulator released in 2002 for BeOS (Haiku nowadays) FreeBSD, Linux, Mac OS X, OS/2, RISC OS, Solaris, and especially Windows. Since its source code is available to install DOSBox, in theory, it can be ported to any OS. Since old DOS programs (even those written (coded) by Microsoft) may not run properly or at all in new versions of Windows, DOSBox is a practical tool, not only to run DOS games (not limited to abandonware) as marketed by the developers.

Note that this emulator runs from the Z: virtual disk (virtual disk) as seen below.

DOSBox 0.74 (PortableApps)

In order to access any files anywhere in the system, DOSBox needs the directories to be mounted in order to access them (similar to Unix).

              MOUNT X X:\GAMES
            

The latter command can be added after the line [autoexec] in the DOSBOX.CONF, which serves as both CONFIG.SYS and AUTOEXEC.BAT. Whether mounting the subdirectory every time you need it or calling it from DOSBOX.CONF, at that point, go to the new virtual disk (X:) in order to access the contents of the mounted directory (GAMES) as normally done in DOS.

              X:
            

Just as with a real AUTOEXEC.BAT, in the DOSBOX.CONF, you can call commands turning ECHO off.

              [autoexec]
              ECHO OFF
              MOUNT X X:\GAMES
            
The latter was quoted from HELP.

DOSEMU

DOSEMU is a command prompt emulator, which allows you to run FreeDOS on Linux. This is more practical if you need to run DOS applications, other than just games. According to the developers, it is "for DOS Emulation, and is a Linux application that enables Linux to run many DOS programs — including some DPMI [applications]."

DOSEMU 1.4.0 after boot (Ubuntu GNOME Linux)

DOSEMU "uses FreeDOS as the default DOS" (Who uses FreeDOS). Therefore it comes with the FreeCOM shell, a replacement for COMMAND.COM.

DOSEMU 1.4.0 drive C with FreeGEM installation (Ubuntu
            GNOME Linux)

DOSEMU 1.4.0 drive Z (Ubuntu GNOME Linux)

DOSEMU mounts A: to access the floppy (B: reserved for second floppy), C: to access the DOSEMU environment including programs you install like OpenGEM in example, D: to access the Linux home directory (~\), E: to access the CD-ROM, Z: where DOSEMU and all its commands reside.

OpenGEM 6 on DOSEMU 1.4.0

The following was quoted from help (in lowercase letters).

XTM PC Emulator

XTM PC Emulator is "a software emulation of a classic PC/XT computer [PC DOS 3.0] for EPOC32." Within this standard application for your portable computer, you can run any software which would run on a low-end PC clones from the 1980's.

Graphic User Interfaces for MS-DOS Other Than Windows 3.1x:

Since nowadays most of us are used to some GUI or another, a good idea is installing OpenGEM (an modern and open source version of GEM; download link), which is based on FreeGEM, which is based on Graphical Environment Manager (GEM), on MS-DOS or any compatible clone like FreeDOS. If you decide to do this on DOSBox, keep in mind that the installation path should be on C:. You would need to mount the path where you want OpenGEM to be installed.

            MOUNT C X:\OpenGEM
          

Once installed, GEM.BAT can be ran from the C: virtual disk. As mentioned before, you can edit DOSBOX.CONF to mount the location of the GEM.BAT as C: (unsure if it could run properly if mounted using a different letter). You can even call GEM.BAT to make OpenGEM run automatically, but guess that would take the fun out of running DOSBox.

OpenGEM
          6 on DOSBox 0.74 (PortableApps)

There is a SourceForge project named BlueGEM that combines FreeDOS with FreeGEM in one package for DOS gamer. Note that FreeDOS lists OpenGEM as its GUI, in some way already doing what the BlueGEM wants to accomplish. In any case, I think it is a great idea to revive many old i386 and i486 PCs. If interested in using OpenGEM, the project offers a variety of applications as part of their SourceForge project. Note that installations must be done from a floppy so mount the path of the directory containing the installation files to A:.

            MOUNT A X:\[path]
          

Then run the INSTALL.APP, which calls INSTALL.TXT to copy the installation files accordingly.

Note that applications in GEM (FreeGEM & OpenGEM) are APP files — not DOS or Windows EXE files.

Using the example above, on Linux, I installed DOSBox running OpenGEM, various applications from the OpenGEM SDK (download link) and ZSNES for DOS. I do not think there is anything practical doing this, but it is sure fun to see old technology originally (coded) several decades ago running on up-to-date technology. It is merely an excuse to show off. After all, ZSNES is also available on Linux.

Note that, on Windows, you can run the PortableApps.com port of DOSBox making it ready from a USB flash drive with any added software and/or your personalized configuration.