DOS
DOS is a family of disk-based operating systems for IBM PC compatible computers. It primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later, compatible systems from other manufacturers are DR-DOS, ROM-DOS, PTS-DOS, and FreeDOS. MS-DOS dominated the IBM PC compatible market between 1981 and 1995.
Although the name has come to be identified specifically with MS-DOS and compatible operating systems, DOS is a platform-independent acronym for disk operating system, whose use predates the IBM PC. Dozens of other operating systems also use the acronym, beginning with the mainframe DOS/360 from 1966. Others include Apple DOS, Apple ProDOS, Atari DOS, Commodore DOS, TRSDOS, and AmigaDOS.
History
Origins
and its predecessor, 86-DOS, ran on Intel 8086 16-bit processors. It was developed to be similar to Digital Research's CP/M—the dominant disk operating system for 8-bit Intel 8080 and Zilog Z80 microcomputers—in order to simplify porting CP/M applications to MS-DOS.When IBM introduced the IBM PC, built with the Intel 8088 microprocessor, they needed an operating system. Chairman John Opel had a conversation with fellow United Way National Board Executive Committee member Mary Maxwell Gates, who referred Opel to her son Bill Gates for help with an 8088-compatible build of CP/M. IBM was then sent to Digital Research, and a meeting was set up. However, 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". Digital Research founder Gary Kildall refused, and IBM withdrew.
File:86-DOS running assembler and HEX2BIN.png|thumb|A simulated SCP 86-DOS session
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, before being made commercially available as 86-DOS. Microsoft purchased 86-DOS, allegedly for. This became Microsoft Disk Operating System, MS-DOS, introduced in 1981.
Within a year Microsoft licensed MS-DOS to over 70 other companies, which supplied the operating system for their own hardware, sometimes under their own names such as Zenith Data Systems's Z-DOS. 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. Digital Research became aware that an operating system similar to CP/M was being sold by IBM, 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 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.
Microsoft originally sold MS-DOS only to original equipment manufacturers. The major reason for this was that not all early PCs were 100% IBM PC compatible. DOS was structured such that there was a separation between the system specific device driver code and the DOS kernel. Microsoft provided an OEM Adaptation Kit which allowed OEMs to customize the device driver code to their particular system. By the early 1990s, most PCs adhered to IBM PC standards so Microsoft began selling a retail version of MS-DOS, starting with MS-DOS 5.0.
In the mid-1980s, Microsoft developed a multitasking version of DOS. This version of DOS is generally referred to as "European MS-DOS 4" because it was developed for ICL and licensed to several European companies. This version of DOS supports preemptive multitasking, shared memory, device helper services and New Executable format executables. None of these features were used in later versions of DOS, but they were used to form the basis of the OS/2 1.0 kernel. This version of DOS is distinct from the widely released PC DOS 4.0 which was developed by IBM and based upon DOS 3.3.
Digital Research attempted to regain the market lost from CP/M-86, initially with Concurrent DOS, FlexOS and DOS Plus, later with Multiuser DOS and DR DOS. Digital Research was bought by Novell, and DR DOS became PalmDOS and Novell DOS; later, it was part of Caldera, Lineo, and DeviceLogics.
Gordon Letwin wrote in 1995 that "DOS was, when we first wrote it, a one-time throw-away product intended to keep IBM happy so that they'd buy our languages." Microsoft expected that it would be an interim solution before the introduction of Xenix. The company planned to improve MS-DOS over time, so it would be almost indistinguishable from single-user Xenix, or XEDOS, which would also run on the Motorola 68000, Zilog Z-8000, and LSI-11; they would be upwardly compatible with Xenix, which BYTE in 1983 described as "the multi-user MS-DOS of the future".
IBM, however, did not want to replace DOS. After AT&T began selling Unix, Microsoft and IBM began developing OS/2 as an alternative. The two companies later had a series of disagreements over two successor operating systems to DOS, OS/2 and Windows. They split development of their DOS systems as a result. The last retail version of MS-DOS was MS-DOS 6.22; after this, MS-DOS became part of Windows 95, 98 and Me. The last retail version of PC DOS was PC DOS 2000, though IBM did later develop PC DOS 7.10 for OEMs and internal use.
The FreeDOS project began on 26 June 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.COM command line interpreter, 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 3 September 2006. Made available under the GNU General Public License, FreeDOS does not require license fees or royalties.
Decline
Early versions of Windows ran on MS-DOS. By the early 1990s, the Windows graphical shell saw heavy use on new systems. In 1995, Windows 95 was bundled as a standalone operating system that did not require a separate DOS license. Windows 95 took over as the default OS kernel, though the MS-DOS component remained for compatibility. With Windows 95 and 98, but not ME, the MS-DOS component could be run without starting Windows. With DOS no longer required to use Windows, the majority of users stopped using it directly.Continued use
, available compatible systems are FreeDOS, ROM-DOS, PTS-DOS, RxDOS and REAL/32. Some computer manufacturers, including Dell and HP, sell computers with FreeDOS as an OEM operating system, and some developers and computer engineers still use it because it is close to the hardware.Embedded systems
DOS's structure of accessing hardware directly allows it to be used in embedded devices. The final versions of DR-DOS are still aimed at this market. ROM-DOS was used as operating system for the Canon PowerShot Pro 70.Emulation
On Linux, it is possible to run DOSEMU, a Linux-native virtual machine for running DOS programs at near native speed. There are a number of other emulators for running DOS on various versions of Unix and Microsoft Windows such as DOSBox. DOSBox is designed for legacy gaming on modern operating systems. DOSBox includes its own implementation of DOS which is strongly tied to the emulator and cannot run on real hardware, but can also boot MS-DOS, FreeDOS, or other DOS operating systems if needed.Design
MS-DOS and IBM PC DOS related operating systems are commonly associated with machines using the Intel x86 or compatible CPUs, mainly IBM PC compatibles. Machine-dependent versions of MS-DOS were produced for many non-IBM-compatible x86-based machines, with variations from relabelling of the Microsoft distribution under the manufacturer's name, to versions specifically designed to work with non-IBM-PC-compatible hardware. As long as application programs used DOS APIs instead of direct hardware access, they could run on both IBM-PC-compatible and incompatible machines. The original FreeDOS kernel, DOS-C, was derived from DOS/NT for the Motorola 68000 series of CPUs in the early 1990s. While these systems loosely resembled the DOS architecture, applications were not binary compatible due to the incompatible instruction sets of these non-x86-CPUs. However, applications written in high-level languages could be ported easily.DOS is a single-user, single-tasking operating system with basic kernel functions that are non-reentrant: only one program at a time can use them, and DOS itself has no functionality to allow more than one program to execute at a time. The DOS kernel provides various functions for programs, like character I/O, file management, memory management, program loading and termination.
DOS provides the ability for shell scripting via batch files. Each line of a batch file is interpreted as a program to run. Batch files can also make use of internal commands, such as GOTO and conditional statements.
The operating system offers an application programming interface 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.
Boot sequence
- The bootstrap loader on PC-compatible computers, the master boot record, is located beginning at the boot sector, the first sector on the first track, of the boot disk. The ROM BIOS will load this sector into memory at address :, and typically check for a signature "" at offset. If the sector is not considered to be valid, the ROM BIOS will try the next physical disk in the row, otherwise it will jump to the load address with certain registers set up.
- If the loaded boot sector happens to be a Master Boot Record, as found on partitioned media, it will relocate itself to : in memory, otherwise this step is skipped. The MBR code will scan the partition table, which is located within this sector, for an active partition, and, if found, load the first sector of the corresponding partition, which holds the Volume Boot Record of that volume, into memory at : in the similar fashion as if it had been loaded by the ROM BIOS itself. The MBR will then pass execution to the loaded portion with certain registers set up.
- The sector content loaded at : constitutes a VBR now. VBRs are operating system specific and cannot be exchanged between different DOS versions in general, as the exact behaviour differs between different DOS versions. In very old versions of DOS such as DOS 1.x, the VBR would load the whole IO.SYS/IBMBIO.COM file into memory at :. For this to work, these sectors had to be stored in consecutive order on disk by using the SYS command. In later issues, it would locate and store the contents of the first two entries in the root directory at : and if they happen to reflect the correct boot files as recorded in the VBR, the VBR would load the first 3 consecutive sectors of the IO.SYS/IBMBIO.COM file into memory at :. The VBR also has to take care to preserve the contents of the Disk Parameter Table. Finally, it passes control to the loaded portion by jumping to its entry point with certain registers set up.
- In later DOS versions, where the VBR has loaded only the first 3 sectors of the IO.SYS/IBMBIO.COM file into memory, the loaded portion contains another boot loader, which will then load the remainder of itself into memory, using the root directory information stored at :. For most versions, the file contents still need to be stored in consecutive order on disk. In older versions of DOS, which were still loaded as a whole, this step is skipped.
- The DOS system initialization code will initialize its built-in device drivers and then load the DOS kernel, located in MSDOS.SYS on MS-DOS systems, into memory as well. In Windows 9x, the DOS system initialization code and built-in device drivers and the DOS kernel are combined into a single IO.SYS file while MSDOS.SYS is used as a text configuration file.
- The CONFIG.SYS file is then read to parse configuration parameters. The variable specifies the location of the shell which defaults to COMMAND.COM.
- The shell is loaded and executed.
- The startup batch file AUTOEXEC.BAT is then run by the shell.
In PC DOS and DR DOS 5.0 and above, the DOS system files are named IBMBIO.COM instead of IO.SYS and IBMDOS.COM instead of MSDOS.SYS. Older versions of DR DOS used DRBIOS.SYS and DRBDOS.SYS instead.
Starting with MS-DOS 7.0 the binary system files IO.SYS and MSDOS.SYS were combined into a single file IO.SYS whilst MSDOS.SYS became a configuration file similar to CONFIG.SYS and AUTOEXEC.BAT. If the MSDOS.SYS BootGUI directive is set to
0, the boot process will stop with the command processor loaded, instead of executing WIN.COM automatically.