From Wikipedia, the free encyclopedia

Jump to: navigation, search
The FreeDOS startup sequence.

DOS, short for "Disk Operating System",[1] is a shorthand term for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions Windows 95, 98, and Me.

Related systems include MS-DOS, PC DOS, DR-DOS, FreeDOS, PTS-DOS, ROM-DOS, JM-OS, and several others.

In spite of the common usage, none of these systems were named simply "DOS" (a name given only to an unrelated IBM mainframe operating system in the 1960s). A number of unrelated, non-x86 microcomputer disk operating systems had "DOS" in their name, and are often referred to simply as "DOS" when discussing machines that use them (e.g. AmigaDOS, AMSDOS, ANDOS, Apple DOS, Atari DOS, Commodore DOS, CSI-DOS, ProDOS, and TRS-DOS). These were incompatible with DOS executables and the MS-DOS API.



All DOS-type operating systems run on machines with the Intel x86 or compatible CPUs, mainly the IBM PC and compatibles. Initially, DOS was not restricted to these, and machine-dependent versions of DOS and similar operating systems were produced for many non-IBM-compatible x86-based machines.[2] In particular, DOS-C's predecessor DOS/NT ran on Motorola 68000 processors.

DOS is a single-user, single-task operating system with basic kernel functions that are non-reentrant: only one program at a time can use them. There is an exception with Terminate and Stay Resident (TSR) programs, and some TSRs can allow multitasking. However, there is still a problem with the non-reentrant kernel: once a process calls a service inside of operating system kernel (system call), it must not be interrupted with another process calling system call, until the first call is finished.[3]

The DOS kernel provides various functions for programs, like displaying characters on-screen, reading a character from the keyboard, accessing disk files and more.


DOS by default provides a primitive ability for shell scripting, via batch files (with the filename extension .BAT). These are text files that can be created in any DOS text editor, such as the MS-DOS Editor. They are executed in the same fashion as compiled programs, and run each line of the batch file as a command. Batch files can also make use of several internal commands, such as goto and conditional statements.[4] gosub and simple arithmetic is supported in some third-party shells but can also be faked via strange workarounds; however, no real form of programming is usually enabled.

Hardware access

The operating system offers a hardware abstraction layer that allows development of character-based applications, but not for accessing most of the hardware, such as graphics cards, printers, or mice. This required programmers to access the hardware directly, usually resulting in each application having its own set of device drivers for each hardware peripheral. Hardware manufacturers would release specifications to ensure device drivers for popular applications were available.[5]

Reserved device names

There are reserved device names in DOS that cannot be used as filenames regardless of extension; these are used to send application output to hardware peripherals. These restrictions also affect several Windows versions, in some cases causing crashes and security vulnerabilities.[6]

A partial list of these reserved names is: NUL:, COM1: or AUX:, COM2:, COM3:, COM4:, CON:, LPT1: or PRN:, LPT2:, LPT3:, and CLOCK$.[7]

Drive naming scheme

In DOS, drives are referred to by identifying letters. Standard practice is to reserve "A" and "B" for floppy drives. On systems with only one floppy drive DOS permits the use of both letters for one drive, and DOS will ask to swap disks. This permits copying from floppy to floppy or having a program run from one floppy while having its data on another. Hard drives were originally assigned the letters "C" and "D". DOS could only support one active partition per drive. As support for more hard drives became available, this developed into assigning the active primary partition on each drive letters first, then making a second pass over the drives to allocate letters to logical drives in the extended partition, then making a third, which gives the other non-active primary partitions their names. (Always assumed, they exist and contain a DOS-readable file system.) Lastly, DOS allocate letters for optical disc drives, RAM disks, and other hardware. Letter assignments usually occur in the order of the drivers loaded, but the drivers can instruct DOS to assign a different letter. An example is network drives, for which the driver will assign letters nearer the end of the alphabets.[8]

Because DOS applications use these drive letters directly (unlike the /dev directory in Unix-like systems), they can be disrupted by adding new hardware that needs a drive letter. An example is the addition of a new hard drive with a primary partition to an original hard drive that contains logical drives in extended partitions. As primary partitions have higher priority than the logical drives, it will change drive letters in the configuration. Moreover, attempts to add a new hard drive with only logical drives in an extended partition would still disrupt the letters of RAM disks and optical drives. This problem persisted through the 9x versions of Windows until NT, which preserves the letters of existing drives until the user changes it.[8]

Boot sequence

The boot sector for PC-compatible computers is located at track zero. In DOS, this code will read the DOS BIOS into memory and execute it. The BIOS is located in IBMBIO.COM on DR DOS and PC DOS, and IO.SYS on MS DOS. The BIOS will then load the DOS kernel, located in IBMDOS.COM (PC DOS or DR DOS) or MSDOS.SYS (MS DOS). In the Windows DOS versions (MS DOS 7 and 8), the BIOS and kernel are combined in IO.SYS, and MSDOS.SYS is a text configuration file. The kernel then executes the CONFIG.SYS file. In CONFIG.SYS, the SHELL command specifies the location of the shell (typically COMMAND.COM). The shell will then launch, and open a startup batch file (typically AUTOEXEC.BAT).[9]


IBM PC-DOS (and the separately sold MS-DOS, which was licensed therefrom), and its predecessor, 86-DOS, were loosely inspired by CP/M (Control Program / (for) Microcomputers) from Digital Research, which was the dominant disk operating system for 8-bit Intel 8080 and Zilog Z80 based microcomputers. However, PC-DOS never ran on less than an 8088 (16-bit).

In 1980, IBM was introducing their first microcomputer, built with the Intel 8088 microprocessor, and needed an operating system. Seeking an 8088-compatible build of CP/M, IBM initially approached Microsoft CEO Bill Gates (possibly believing that Microsoft owned CP/M due to the Microsoft Z-80 SoftCard, which allowed CP/M to run on an Apple II[10]). IBM was sent to Digital Research, and a meeting was set up. However, the initial negotiations for the use of CP/M broke down—Digital Research wished to sell CP/M on a royalty basis, while IBM sought a single license, and to change the name to "PC DOS". DR founder Gary Kildall refused, and IBM withdrew.[10][11]

IBM again approached Bill Gates. Gates in turn approached Seattle Computer Products. There, programmer Tim Paterson had developed a variant of CP/M-80, intended as an internal product for testing SCP's new 16-bit Intel 8086 CPU card for the S-100 bus. The system was initially named "QDOS" (Quick and Dirty Operating System), before being made commercially available as 86-DOS. Microsoft purchased 86-DOS, allegedly for $50,000. This became Microsoft Disk Operating System, MS-DOS, introduced in 1981.[12]

Microsoft also licensed their system to multiple computer companies, who supplied MS-DOS for their own hardware, sometimes under their own names. Microsoft later required the use of the MS-DOS name, with the exception of the IBM variant. IBM continued to develop their version, PC DOS, for the IBM PC.[12] Digital Research became aware that an operating system similar to CP/M was being sold by IBM (under the same name that IBM insisted upon for CP/M), and threatened legal action. IBM responded by offering an agreement: they would give PC consumers a choice of PC DOS or CP/M-86, Kildall's 8086 version. Side-by-side, CP/M cost almost $200 more than PC DOS, and sales were low. CP/M faded, with MS-DOS and PC DOS becoming the marketed operating system for PCs and PC compatibles.[10]

Digital Research attempted to regain the market lost from CP/M-86; initially with DOS Plus, and later with DR-DOS (both compatible with both MS-DOS and CP/M-86 software). Digital Research was bought by Novell, and DR DOS became Novell DOS 7; later, it was part of Caldera Systems (as OpenDOS and DR DOS 7), Lineo, and DeviceLogics.

Microsoft and IBM later had a series of disagreements over two successor operating systems to DOS- Microsoft's Windows and IBM's OS/2.[13] They split development of their DOS systems as a result.[14] MS-DOS was partially transformed into Windows; the last version of PC DOS was PC DOS 2000, released in 1998.

The FreeDOS project began June 26, 1994, when Microsoft announced it would no longer sell or support MS-DOS. Jim Hall then posted a manifesto proposing the development of an open-source replacement. Within a few weeks, other programmers including Pat Villani and Tim Norman joined the project. A kernel, the command line interpreter (shell) and core utilities were created by pooling code they had written or found available. There were several official pre-release distributions of FreeDOS before the FreeDOS 1.0 distribution was released on September 3, 2006. Thanks to the GPL, FreeDOS does not require license fees or royalties.[15][16]


Early versions of Microsoft Windows were an application that ran on top of a separate version of DOS.[17] By the early 1990s, Windows saw heavy use on new DOS systems. With Windows for Workgroups 3.11, DOS was almost reduced to the role of a boot loader for the Windows kernel; in 1995, Windows 95 was bundled as a standalone operating system that did not require a separate DOS license. With Windows 95 (and Windows 98 and Me, that followed it), the MS-DOS kernel remains, but with Windows as the system's graphical shell. With Windows 95 and 98, but not ME, the MS-DOS component could be run without starting Windows.[18] With Windows now separated and DOS compatibility getting worse with each upgrade, DOS fell into disuse as the majority of computer users migrated to the more popular programming platform.

Continued use

Currently available DOS systems are FreeDOS, DR-DOS (and Enhanced DR-DOS), ROM-DOS, the Russian PTS-DOS, NX-DOS, Multiuser DOS (based on Digital Research's Concurrent DOS), and others. Some computer manufacturers, including Dell and HP, sell computers with FreeDOS as the OEM operating system.[19][20] NX-DOS, is currently under development. It is 16-bit, real-time, networkable, bootable from a floppy, and has an incomplete USB driver. It dates back to 1992 as a personal project, and was released as GPL in 2005.[21]


DOS' structure of accessing hardware directly makes it ideal for use in embedded devices. The final versions of DR-DOS are still aimed at this market.[22] ROM-DOS was used as the embedded system on the Canon PowerShot Pro 70.[23]


DOSBox running in Linux

Under Linux it is also possible to run copies of DOS and many of its clones under DOSEMU, a Linux-native virtual machine for running DOS programs at near native speed. There are a number of other emulators for running DOS under various versions of UNIX, even on non-x86 platforms, such as DOSBox.[24][25]

DOS emulators are gaining popularity among Windows XP and Vista users, due to these systems being very incompatible with pure DOS. They can be used to run games or other DOS software. One of the most well-known is DOSBox, designed for legacy gaming (e.g. King's Quest, Doom) on modern operating systems.[24][17]

It is possible to run DOS applications under Microsoft Virtual PC, allowing better compatibility than DOS emulators. A legitimate version of MS-DOS can be installed which should allow all but the most stubborn applications to run.[26]

With Microsoft Windows

cmd.exe, the DOS-styled command prompt used in NT-based Windows.

True 32-bit versions of Windows, starting with NT and including 2000, XP, and Vista, are not based upon DOS. These include the NT Virtual DOS Machine (NTVDM), which runs a modified version of MS-DOS 5 in a virtual machine. While DOS-based versions used the traditional COMMAND.COM for a command line interface, Windows NT and its derivatives use cmd.exe, which utilizes many DOS commands (although COMMAND.COM is still called and used upon each DOS .EXE run).


See Comparison of x86 DOS operating systems and Timeline of x86 DOS operating systems.


Arachne web browser
See also:DOS software

While DOS was the primary PC-compatible platform, several notable programs were written for it. These included:

Ease of use

User interface

DOS systems utilize a command line interface. Programs are started by entering their filename at the command prompt. DOS systems include several programs as system utilities, and provides additional commands that don't correspond to programs (internal commands).[28]

In an attempt to provide a more user-friendly environment, numerous software manufacturers wrote file management programs that provided users with menu- and/or icon-based interfaces. Microsoft Windows is a notable example, eventually becoming a self-contained operating system, and replacing DOS as the most-used PC-compatible operating system. Text user interface programs included Norton Commander, Dos Navigator, Volkov Commander, Quarterdesk DESQview, and SideKick. Graphical user interface programs included Digital Research's Graphical Environment Manager (originally written for CP/M) and GEOS.

Eventually, the manufacturers of major DOS systems began to include their own environment managers. MS-DOS/IBM DOS 4 included DOS Shell;[29] DR-DOS 5, released the next year, included ViewMAX, based upon GEM.[30]


By its original design, DOS was a single task operating system. MS and PC DOS would introduce task switching with DOSShell,[31] and DR-DOS would include it with DR-DOS 6, via the TaskMAX command.[32] MS and PC DOS never had a multitasking capability;[33] DR-DOS had the capability with DR-DOS 7 (assuming DR-DOS was running with DPMI enabled).[34] Others such as VMIX (shareware) or DesqView (commercial) could multitask even on an 8088.


Several limitations plague the DOS architecture. The original 8088 microprocessor could only address 1 megabyte of physical RAM. With additional hardware devices being mapped into this range, the highest amount of available memory was 640 kilobytes, known as conventional memory. Due to DOS' structure, this was assumed to be the maximum, and DOS could not address more than this. An early workaround was expanded memory; later, extended memory was developed with the 80286. While these provided usable memory to applications, they still had to start in conventional memory, thereby using part of the existing 640 KB. With the 80386 microprocessor's redesigned protected mode, DOS extenders and the DOS Protected Mode Interface were able to provide additional memory to applications, as well as multitasking. [35][36]

DOS also has an upper limit to the size of hard disk partitions. This has two causes. First, many DOS-type systems never had support for any file system newer than FAT16, which, by design, does not allow partitions larger than 2.1 gigabytes.[37] Additionally, DOS accesses the hard disk by calling Interrupt 13, which utilizes the cylinder-head-sector system of mapping the disk. Under this system, only 8 gigabytes are visible to the operating system.[38] Newer operating systems accomplished disk access via software means, e.g. 32-bit disk access.

Using FAT16 (and FAT12 for floppy disks) required use of the 8.3 filename. Filenames in DOS can not be longer than eight characters, and the filename extension cannot be longer than three. Win95's patented VFAT hack worked around this in a unique way.

See also


  1. ^ Murdock, Everett (1988). DOS the Easy Way. EasyWay Downloadable Books. ISBN 0923178007. 
  2. ^ See MS-DOS
  3. ^ Hyde, Randall (1996-09-30). "CHAPTER EIGHTEEN: RESIDENT PROGRAMS (Part 3)". The Art of Assembly Language Programming. Retrieved on 2008-09-02. 
  4. ^ "Batch File Help". Retrieved on 2008-09-10. 
  5. ^ Matczynski, Michael. "ZINGTECH - Guide to the New Game Programmer". Retrieved on 2008-09-02. 
  6. ^ "Microsoft Windows MS DOS Device Name DoS Vulnerability". Retrieved on 2008-09-02. 
  7. ^ "DOS device names definition". PC Magazine.,2542,t=DOS+device+names&i=41766,00.asp. Retrieved on 2008-09-02. 
  8. ^ a b "Drive Letter Assignment and Choosing Primary vs. Logical Partitions". The PC Guide. 2007-05-17. Retrieved on 2008-09-02. 
  9. ^ Kozierok, Charles (2001). "The DOS Boot Process". The PC Guide. Retrieved on 2008-09-02. 
  10. ^ a b c Rolander, Tom. Interview. The rest of the story: How Bill Gates beat Gary Kildall in OS war, Part 1.
  11. ^ Bove, Tony (2005). Just Say No to Microsoft. No Starch Press. p. 9-11. ISBN 159327064X.,M1. 
  12. ^ a b Bellis, Mary. "The Unusual History of MS-DOS The Microsoft Operating System". Retrieved on 2008-09-02. 
  13. ^ Pollack, Andrew (1991-07-27). "Microsoft Widens Its Split With I.B.M. Over Software". New York Times. Retrieved on 2008-09-02. 
  14. ^ Brinkley, Joel (1999-05-28). "I.B.M. Executive Describes Price Pressure by Microsoft". New York Times. Retrieved on 2008-09-02. 
  15. ^ Jim Hall (2002-03-25). "The past, present, and future of the FreeDOS Project". Retrieved on 2008-06-14. 
  16. ^ Hall, Jim (September 23, 2006). "History of FreeDOS". Retrieved on 2007-05-28. 
  17. ^ a b James Bannan (2006-10-13). "HOW TO: Coax retro DOS games to play on Vista". Retrieved on 2008-07-03. 
  18. ^ "Finding The DOS In Windows 95". Smart Computing. March 1996. Retrieved on 2008-07-12. 
  19. ^ Hall, Jim (2007-07-13). "Jim Hall". Retrieved on 2008-06-12. 
  20. ^ "Dell PCs Featuring FreeDOS". Retrieved on 2008-06-14. 
  21. ^ "GPL'd DOS workalike adds features". 2007-04-01. Retrieved on 2008-06-01. 
  22. ^ "DR DOS Embedded DOS". Retrieved on 2008-09-26. 
  23. ^ "Datalight DOS Selected for Canon's New Line of Digital Still Cameras". Business Wire. 1999-08-24. Retrieved on 2008-09-26. 
  24. ^ a b "DOSBox Information". Retrieved on 2008-05-18. 
  25. ^ "DOSEMU Home". 2007-05-05. Retrieved on 2008-07-03. 
  26. ^ "DOS Games on Vista". 2008-03-11. Retrieved on 2008-09-02. 
  27. ^ Darrow, Barbara (1 February, 2002). "Whatever Happened To Lotus 1-2-3?". Retrieved on 2008-07-12. 
  28. ^ Murdock, Everett. DOS the Easy Way. EasyWay Downloadable Books. pp. 7–12. ISBN 0923178023. 
  29. ^ Murdock, Everett. DOS the Easy Way. EasyWay Downloadable Books. pp. 71. ISBN 0923178023. 
  30. ^ Dvorak, John; Nick Anis (1991). Dvorak's Guide to DOS and PC Performance. Osborne McGraw-Hill. pp. 442–444. 
  31. ^ Murdock, Everett. DOS the Easy Way. EasyWay Downloadable Books. pp. 83. ISBN 0923178023. 
  32. ^ DR DOS 6.0 User Guide. Digital Research. 1991. pp. 320–324. 
  33. ^ Perry, Greg; Jill Freeze (2003). Sams Teach Yourself Windows XP Computer Basics All in One. Sams Publishing. pp. 445. ISBN 0672325357. 
  34. ^ "Chapter 13 Multitasking and Task Switching". Caldera DR-DOS 7.02 User Guide. Caldera Systems. 1998. Retrieved on 2008-09-12. 
  35. ^ "DOS: still thriving after all these years". Software Magazine. May 1990. Retrieved on 2008-07-10. 
  36. ^ Duncan, Ray (1991). Extending DOS: A Programmer's Guide to Protected-Mode DOS (2 ed.). Addison-Wesley. ISBN 0201567989. 
  37. ^ Mueller, Scott (2003). Upgrading and Repairing PCs. Que Publishing. p. 812. ISBN 0789729741. 
  38. ^ "The Int 13 Interface". The PC Guide. Retrieved on 2008-07-10. 

External links

Personal tools