What is Disk Operating System (DOS)?

DOS stands for Disk Operating System. In general terms, DOS is a command line interface (CLI) OS to manage data in disks. This means that any OS that allows the user to access and manage data in disks is a DOS whether that DOS is compatible with others or not.

The most important versions of DOS because of sales and use have been PC DOS (IBM), MS-DOS (Microsoft), DR-DOS (Digital Research) and FreeDOS (developed by Jim Hall).

What we have been accustomed to as the first is DOS as the CLI OS for the IBM Personal Computer and clones written by Tim Paterson (86-DOS) and then sold by Microsoft, on which Windows was later built on.

Although IBM originally used the same acronym in the early 1970s for their disk operating system for IBM System/360, the 1970s version of DOS (later replaced by VSE) is not the same as what we commonly know as DOS for IBM PC and clones.

In computer science, many terms are confusing and DOS is one of them. If it is spelled DoS (lower case `o`), we refer to denial of service. In this page, I am covering DOS (all upper case).

To make matters ever more confusing, one of the biggest misconceptions nowadays is that many think that DOS is MS-DOS (Microsoft).

MS-DOS (Microsoft)

In the early 1980s 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 (SCP). 86-DOS contained about 4,000 lines of assembly. QDOS later became PC DOS for the IBM Personal Computer system on 08/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.

By User:Retron — Taken by myself via MESS, Public Domain, https://commons.wikimedia.org/w/index.php?curid=46219473

Nowadays, what is left of MS-DOS is reduced to a handful of files buried 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). I would like to see DOS included back in Windows as a stand-alone OS (similar to what macOS did with Unix). Worse of all, Windows NT 4 and up use an emulation of MS-DOS 5.0 (1991) — not 6.0 (1993) or 6.21/6.22 (1994) — 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 to C:\WINDOWS\COMMAND.

DOS Shell (230 KB) was last included in MS-DOS 6.2. Amazingly DOS Shell (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 MS-DOS. The latter 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 and use FreeDOS.

Installing MS-DOS on i386 & i486 Systems:

This technique is different from what most nowadays books indicate, using FAT16. The only drawback of installing FAT16 DOS is that the HDD has to 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, I 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. RAM is improved. By using this technique, a DOS and Windows set-up would work almost as well as /swap in 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 FAT16 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 05/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 I 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. 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 manufacturer.

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 interface 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:

I have put together a batch file (set of organized commands), 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 Windows.

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 (defrags) 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 distributions 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 a tilde (~).

        
        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, FOO.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., including the period after ECHO) after the log has been generated for cosmetic purposes. As such, these blank lines can be excluded.

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

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

        
        ECHO OFF
        ECHO %DATE% %TIME% > FOO.TXT
        DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A > FOO.TXT
        DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A > FOO.TXT
        ECHO. > FOO.TXT
        DEFRAG /F/U/SE/SKIPHIGH C: > FOO.TXT
        SCANDISK /ALL/AUTOFIX/NOSAVE/NOSUMMARY/SURFACE > FOO.TXT
        ECHO. > FOO.TXT
        ECHO. > FOO.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% > FOO.TXT
        
        DEL C:\~*.* /F/S/Q/A:R/A:H/A:S/A:A > FOO.TXT
        DEL C:\TEMP\*.* /F/S/Q/A:R/A:H/A:S/A:A > FOO.TXT
        
        ECHO. > FOO.TXT
        
        DEFRAG /F/U/SE/SKIPHIGH C: > FOO.TXT
        SCANDISK /ALL/AUTOFIX/NOSAVE/NOSUMMARY/SURFACE > FOO.TXT
        
        ECHO. > FOO.TXT
        ECHO. > FOO.TXT
      

Of course, follow this instructions at your own risk. Although these commands will not normally hurt your system, do NOT blame me as I take no responsibility if something goes wrong and/or if you delete important data by mistake. Refer to the disclaimer.

As I mentioned at the beginning of this section, these instructions are for MS-DOS. Other versions of DOS are slightly different. For example, FreeDOS has a more organized directory structure and comes with C:\FDOS\TEMP where FDOS is the DOS subdirectory. I do not know if FreeDOS has a built-in facility for garbage management. If you were to adapt the previous code, make sure you understand the directory structure of the version of DOS as well as which commands and executables are available.

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 1980s. It has changed owners in the past two decades from Digital Research (DR) to Novel as Novel 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 (Jim Hall)

FreeDOS by Jim Hall is an x86 16/32-bit open source MS-DOS clone based on DOS-C (1994) by Pat Villani that can "reproduce the functionality of MS-DOS.".

The directory structure of FreeDOS is based on Linux and all content of the OS is located in C:\FDOS including the TEMP subdirectory (C:\FDOS\TEMP, which is different from the path that I have used since I learned to work with MS-DOS.

Within modern DOS clones, FreeDOS seems to be the most popular, robust and most user-friendly choice. As a matter of fact, it is my DOS of choice especially since Jim Hall is very accessible for questions and continuously makes video tutorials on his OS.

To install software, you can use FDIMPLES to access its repository. To establishing network connections, FDNET.BAT handles a vanilla packet driver.

The previous is quoted from http://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 (Winternals) allowed users see NTFS partitions (NT 4/5 encrypted partitions) as regular DOS FAT16 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 an x32 16-bit/32-bit MS-DOS clone that uses RX-DOS memory management.

NX-DOS installation screen, courtesy of the NX-DOS Project as SourceForge; http://nxdos.sourceforge.net/

PC DOS (International Business Machines)

PC DOS is made by IBM. 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. Also refer to the batch to maintain your HDD running on MS-DOS or PC DOS.

PTS-DOS (PhystechSoft)

PTS-DOS "is a powerful and fastest DOS with a simple graphical file manager and FAT32 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 FAT32.

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 for 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 for the MOS 6502 family of chipsets — from PET (1977) to C128 (1985). The most commonly used version was 2.0 that came in the C64.

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 FAT16/FAT32 nor NTFS, not Linux compatible" (thanks Pete).

RX-DOS

RX-DOS (with only eight files) supports FAT12, FAT16 and FAT32. RX-DOS does not support Windows and 05/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, macOS, 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 by Microsoft) 05/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 installation

In order to access any files 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 (X:\GAMES) as normally done in most DOS versions.

          
          X:
        

Just as with a real AUTOEXEC.BAT, the [autoexec] section in the DOSBox.CONF file, you can call commands turning ECHO off.

          
          [autoexec]
          ECHO OFF
          MOUNT X X:\GAMES
        

The latter was quoted from the output of the HELP command.

DOSEMU

DOSEMU is a command prompt emulator "and is a Linux application that enables Linux to run many DOS programs — including some DPMI [DOS Protected Mode Interface applications]" as per the project developers.

DOSEMU 1.4.0 after boot (Ubuntu GNOME Linux)

DOSEMU "uses FreeDOS as the default DOS". 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 acting as the OS including programs you install like OpenGEM in my 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.

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 1980s.

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), 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 the path where you want to mount 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 image guess that would take the fun out of running DOSBox.

DOSBox074(VOSC).png" height="256" width="320" border="0" class="boxes" alt= "OpenGEM 6 on DOSBox 0.74, PortableApps installation" title= "OpenGEM 6 on DOSBox 0.74, PortableApps installation">

There was a SourceForge project named BlueGEM on SourceForge that combined FreeDOS with FreeGEM in one package for DOS gamers. It was a great idea to revive many old i386 and i486 PCs. The installations was be done from a floppy so you had to mount the 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 and OpenGEM) are .APP files — not DOS or Windows .EXE or .COM files.

Using the example above, on Linux, I installed DOSBox running OpenGEM, various applications from the OpenGEM SDK and ZSNES for DOS. I do not think there is anything practical doing this, but it is sure fun to see old technology originally written several decades ago running on new hardware. 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.