MS-DOS: A Brief Introduction

MS-DOS (Microsoft Disk Operating System) is a single-user, single-tasking computer operating system that uses a command line interface. In spite of its very small size and relative simplicity, it is one of the most successful operating systems that has been developed to date.

A Quick and Dirty History

When IBM launched its revolutionary personal computer, the IBM PC, in August 1981, it came complete with a 16-bit operating system from Microsoft, MS-DOS 1.0. This was Microsoft's first operating system, and it also became the first widely used operating system for the IBM PC and its clones.

MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty Operating System), which Microsoft bought from a Seattle company, appropriately named Seattle Computer Products, in July 1981. QDOS had been developed as a clone of the CP/M eight-bit operating system in order to provide compatibility with the popular business applications of the day such as WordStar and dBase. CP/M (Control Program for Microcomputers) was written by Gary Kildall of Digital Research several years earlier and had become the first operating system for microcomputers in general use.

QDOS was written by Tim Paterson, a Seattle Computer Products employee, for the new Intel 16-bit 8086 CPU (central processing unit), and the first version was shipped in August, 1980. Although it was completed in a mere six weeks, QDOS was sufficiently different from CP/M to be considered legal. Paterson was later hired by Microsoft.

Microsoft initially kept the IBM deal a secret from Seattle Computer Products. And in what was to become another extremely fortuitous move, Bill Gates, the not uncontroversial co-founder of Microsoft, persuaded IBM to let his company retain marketing rights for the operating system separately from the IBM PC project. Microsoft renamed it PC-DOS (the IBM version) and MS-DOS (the Microsoft version). The two versions were initially nearly identical, but they eventually diverged.

The acronym DOS was not new even then. It had originally been used by IBM in the 1960s in the name of an operating system (i.e., DOS/360) for its System/360 computer. At that time the use of disks for storing the operating system and data was considered cutting edge technology.

Until its acquisition of QDOS, Microsoft had been mainly a vendor of computer programming languages. Gates and co-founder Paul Allen had written Microsoft BASIC and were selling it on disks and tape mostly to PC hobbyists.

MS-DOS soared in popularity with the surge in the PC market. Revenue from its sales fueled Microsoft's phenomenal growth, and MS-DOS was the key to company's rapid emergence as the dominant firm in the software industry. This product continued to be the largest single contributor to Microsoft's income well after it had become more famous for Windows.

Subsequent versions of MS-DOS featured improved performance and additional functions, not a few of which were copied from other operating systems. For example, version 1.25, released in 1982, added support for double-sided disks, thereby eliminating the need to manually turn the disks over to access the reverse side.

Version 2.0, released the next year, added support for directories, for IBM's then huge 10MB hard disk drive (HDD) and for 360KB, 5.25-inch floppy disks. This was followed by version 2.11 later in the same year, which added support for foreign and extended characters.

Version 3.0, launched in 1984, added support for 1.2MB floppy disks and 32MB HDDs. This was soon followed by version 3.1, which added support for networks.

Additions and improvements in subsequent versions included support for multiple HDD partitions, for disk compression and for larger partitions as well as an improved disk-checking utility, enhanced memory management, a disk defragmenter and an improved text editor.

The final major version was 7.0, which was released in 1995 as part of Microsoft Windows 95. It featured close integration with that operating system, including support for long filenames and the removal of numerous utilities, some of which were on the Windows 95 CDROM. It was revised in 1997 with version 7.1, which added support for the FAT32 filesystem on HDDs.

Although many of the features were copied from UNIX, MS-DOS was never able to come anywhere close to UNIX in terms of performance or features. For example, MS-DOS never became a serious multi-user or multitasking operating system (both of which were core features of UNIX right from the start) in spite of attempts to retrofit these capabilities. Multitasking is the ability for a computer to run two or more programs simultaneously.

The Rise of the GUI

The introduction of the Apple Macintosh in 1984 brought about a surge of interest in GUIs (graphical user interfaces), and it soon became apparent that they would eventually replace command line interfaces such as that used by MS-DOS. Although many MS-DOS application programs created their own primitive GUIs, this approach required duplication of programming effort, and the lack of a consistent GUI among programs made it more difficult for users to learn new programs.

It took Microsoft years until it was able to offer a fairly high quality GUI of its own, with the introduction of Windows 95 in 1995 (or arguably with Windows 3.0 in 1990). Microsoft had also begun work on a joint project with IBM called OS/2, which was originally a protected-mode version of MS-DOS with a GUI, but Microsoft soon abandoned the project in order to devote more resources to the development of Windows NT, a completely new operating system that was independent of MS-DOS.

Protected mode and real mode are the two modes of operation supported by the Intel x86 architecture. The former enables 32-bit memory addressing, thereby permitting use of the extended memory that cannot be easily accessed from real mode. This makes it possible to assign separate memory areas to the operating system kernel (i.e., the core of the operating system) and to each process (i.e., program or task), thus resulting in much more stable multitasking than can be attained with real mode.

Early versions of Microsoft Windows ran under MS-DOS, whereas later versions were launched under MS-DOS but were then extended by going into protected mode. Windows NT and its successors, Windows 2000 and XP, do not use MS-DOS; however, they contain an emulation layer on which MS-DOS programs can be operated, mainly for backward compatibility with legacy (i.e., old) software.

DOS Commands

MS-DOS has a relatively small number of commands, and an even smaller number of commonly used ones. Moreover, these commands are generally inflexible because, in contrast to Linux and other Unix-like operating systems, they are designed to accommodate few options or arguments (i.e., values that can be passed to the commands).

Some of the most common commands are as follows (corresponding commands on Unix-like operating systems are shown in parenthesis):

CD - changes the current directory (cd)
COPY - copies a file (cp)
DEL - deletes a file (rm)
DIR - lists directory contents (ls)
EDIT - starts an editor to create or edit plain text files (vi, vim, ed, joe)
FORMAT - formats a disk to accept DOS files (mformat)
HELP - displays information about a command (man, info)
MKDIR - creates a new directory (mkdir)
RD - removes a directory (rmdir)
REN - renames a file (mv)
TYPE - displays contents of a file on the screen (more, cat)

Comparison between MS-DOS and Linux

MS-DOS and Linux have much in common, primarily because MS-DOS copied many ideas from UNIX. However, there are some very fundamental differences, including:

(1) Linux is a full-fledged multiuser, multitasking operating system, whereas MS-DOS is a single-user, single-tasking operating system.

(2) MS-DOS does not have built-in security concepts such as file-ownership and permissions, which are fundamental to Linux.

(3) Linux has an inverted tree-like filesystem in which all directories and files branch from a single directory, i.e., the root directory, and its subdirectories. MS-DOS can have multiple, independent root directories, such as A:, C:, D:, etc.

(4) Linux uses forward slashes "/" to separate directories, whereas MS-DOS uses backslashes "\" for the same purpose.

(5) Linux filenames can contain up to 255 characters. MS-DOS filenames are limited to an eight characters plus a three-character extension and have restrictions on allowable characters. Also, filenames are case-sensitive in Linux, whereas they are not in MS-DOS.

(6) Linux has a vastly richer command set than does MS-DOS, with a much greater number of commands and individual commands having greater power, flexibility and ease of use. Commands are case-sensitive in Linux, but they are not in MS-DOS.

(7) Although Linux and MS-DOS both have pipes and input/output redirection, the MS-DOS pipes use a completely different -- and inferior -- implementation.

(8) MS-DOS is not sufficiently flexible and efficient to serve as a base for a high quality, general-purpose GUI (and thus it had to be abandoned by Microsoft). In sharp contrast, Linux is an excellent base for a GUI (and it is used as a base for the X Window System, which is extremely configurable and whose already excellent performance continues to improve).

MS-DOS Clones and Emulators

The great success of MS-DOS led to the development of several similar operating systems, including DR-DOS, FreeDOS, OpenDOS and PC-DOS. The most promising of these clones is FreeDOS, which is claimed to be the only free operating system that is fully compatible with MS-DOS.

Development of FreeDOS was begun in 1994 by Jim Hall, then a physics student at the University of Wisconsin-River Falls. His motivation was Microsoft's announcement that it would stop supporting MS-DOS because of its impending replacement by Windows 95.

Like MS-DOS, FreeDOS is lean and robust, and it can run on old hardware and in embedded systems. A major improvement as compared with MS-DOS is the addition of options to the commands. Moreover, FreeDOS is released under the GPL (although some software in the distribution is covered by other licenses), thus making it ideal for bundling a version of DOS into products without having to pay royalties.

Because Linux was originally developed on PCs and at a time when MS-DOS was the dominant PC operating system, a variety of tools were developed to help developers and users bridge the gap between the two operating systems. Among them is dosemu, a DOS emulator which is included with Red Hat and other distributions and on which it is possible to run DOS programs. Emulators are also available for running DOS on other Unix-like operating systems, even on non-x86 processors.

mtools is a collection of utilities that make it easy to access an MS-DOS floppy disk from Linux by merely inserting it into the floppy disk drive and without having to use any mounting commands (which can be tricky for inexperienced users). Included in mtools are more than 20 commands, all of which are identical to their MS-DOS counterparts except that the letter m is added to the start of each of their names and forward slashes are used instead of backslashes. For example, the MS-DOS command type a:\file1.txt to display the contents of a file named file1.txt that is located on a floppy disk would become mtype a:/file1.txt.

Outlook For the Future

Although it is widely believed that MS-DOS is an antiquated and useless operating system with few features and capabilities, this is far from correct. In fact, although not generally publicized, MS-DOS is still used today by numerous businesses and individuals around the world. A good analogy is the ancient programming language COBOL (introduced in 1960!), which is still in widespread use and, amazingly, accounts for roughly half of all the computer code still in existence. Both MS-DOS and COBOL have survived for so long because they are robust, relatively simple and continue to get the job done with a minimum of maintenance.

In many cases, it was not MS-DOS itself that was the limiting factor in system performance; rather, it was the hardware, including small memories, slow CPUs and slow video cards. The capabilities of MS-DOS have, in fact, continued to increase even after Microsoft Windows became widespread. This is a result of continuing advances in the hardware and the introduction of new or improved utilities and applications. DOS as a whole is also being strengthened by the improvements that are being made to the MS-DOS clones, particularly FreeDOS.

DOS will be around for many years into the future not only because of the continued existence of legacy applications but also because of the development of new applications. The main area of growth will most likely be simple embedded applications, for which DOS is eminently well suited because of its extremely small size, very reliable operation and zero cost (in the case of FreeDOS).

DOS is so tiny, in fact, that it can fit on a single floppy disk and still leave sufficient room on the same disk for an embedded program and data files. Although there are many alternatives for embedded systems, including embedded Linux and Microsoft Windows CE, DOS can be the best choice if space is severely limited. Moreover, in contrast to FreeDOS, Windows CE has the disadvantages of not being free and having various licensing issues with which to contend.

Created April 25, 2004. Updated September 30, 2006.
Copyright © 2004 - 2006. The Linux Information Project. All Rights Reserved.