You are on page 1of 13


From Wikipedia, the free encyclopedia

Jump to: navigation, search This article is about the family of operating systems for IBM PC-compatible computers. For other uses, see DOS (disambiguation). 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 95, 98, and Millenium Edition. 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, nonx86 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). While providing many of the same operating system functions for their respective computer systems, programs running under any one of these operating systems would not run under others.


1 Design o 1.1 API o 1.2 Scripting o 1.3 Reserved device names o 1.4 Drive naming scheme o 1.5 Boot sequence 2 Origins 3 Decline 4 Continued use o 4.1 Embedding o 4.2 Emulation o 4.3 With Microsoft Windows 5 Versions

6 Software 7 Ease of use o 7.1 User interface o 7.2 Multitasking 8 Limitations 9 See also 10 References 11 External links

[edit] Design
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 x86based machines.[2] In particular, DOS-C's predecessor DOS/NT ran on Motorola 68000 CPU's. DOS is a single-user, single-task operating system with basic kernel functions that are nonreentrant: 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.

[edit] API
Main article: MS-DOS API

[edit] Scripting
Main article: Batch file 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 MSDOS 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. The operating system offers a hardware abstraction layer that allows development of characterbased 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]

[edit] Reserved device names

Main article: Device file system 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]

[edit] Drive naming scheme

Main article: Drive letter assignment 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 assigns both letters to the drive, prompting the user to swap disks as programs alternate access between them. This facilitates copying from floppy to floppy or having a program run from one floppy while accessing 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 first assigning a drive letter to each drive's active primary partition, then making a second pass over the drives to allocate letters to logical drives in the extended partition, then a third pass to give any other non-active primary partitions their names (where such additional partitions existed and contained a DOS-supported file system.) Lastly, DOS allocates letters for optical disc drives, RAM disks, and other hardware. Letter assignments usually occur in the order the drivers are loaded, but the drivers can instruct DOS to assign a different letter; drivers for network drives, for example, typically assign letters nearer the end of the alphabet.[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 having a primary partition where a pre-existing hard drive contains logical drives in extended partitions; the new drive will be assigned a letter that was previously assigned to one of the extended partition logical drives. Moreover, even adding a new hard drive having 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 them.[8]

[edit] Boot sequence

The boot sector on PC-compatible computers (MBR) is located at track zero. The boot sector on all disc devices are then in turn loaded into memory segment 0000:7C00, and if the sector contains the values "0x55 0xAA" at position 0x1FE, it's considered to be valid and is executed. On harddiscs each of the four partitions are searched for an active partition (bit-7=1 at pos 0x1BE+0x10*n). The boot sector code loads the DOS-BIOS into segment 0000:0600; which is located in the file IO.SYS on MS-DOS systems.[9] In some cases the boot sector instead relocates itself into 0000:0600 and loads the partition boot code into 0000:7C00 and executes it.[10] The DOS-BIOS will then load the DOS kernel, located in MSDOS.SYS on MS-DOS systems. In the DOS-kernel Windows 9x, the DOS-BIOS and kernel are combined in IO.SYS, and MSDOS.SYS is used as a text configuration file. The kernel then loads the \CONFIG.SYS file to parse configuration parameters. The SHELL 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.[11][12] DR-DOS allows specification of the startup batch file through a parameter in the SHELL statement.[13][14]:392

The BIOS and kernel files loaded by the boot sector must be contiguous and be the first two directory entries.[15] As such, removing and adding this file is likely to render the media unbootable. It is, however, possible to replace the shell at will, a method that can be used to start the execution of dedicated applications faster. In DR-DOS and PC-DOS IBMBIO.COM is used in place of IO.SYS and IBMDOS.COM in place of MSDOS.SYS. On systems designed for PC-DOS v1.10 the signature 0x55 0xAA at position 0x1FE is not checked.[16]

[edit] Origins
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). When IBM introduced their first microcomputer in 1980, built with the Intel 8088 microprocessor, they 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[17]). IBM was sent to Digital Research, and a meeting was set up. However, the initial negotiations for the use of CP/M broke downDigital 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.[17][18] 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 86DOS. Microsoft purchased 86-DOS, allegedly for $50,000. This became Microsoft Disk Operating System, MS-DOS, introduced in 1981.[19] 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 MSDOS name, with the exception of the IBM variant. IBM continued to develop their version, PC DOS, for the IBM PC.[19] 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.[17] 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 (under the names 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.[20] They split development of their DOS systems as a result.[21] 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 prerelease 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.[22][23]

[edit] Decline
Main article: History of Microsoft Windows Early versions of Microsoft Windows were an application that ran on top of a separate version of DOS.[24] By the early 1990s, Windows saw heavy use on new DOS systems. With MS-Windows for Workgroups 3.11, DOS was almost reduced to the role of a boot loader for the Windows kernel; in 1995, MS-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.[25] With DOS no longer required to use Windows, the majority of PC users abandoned DOS in favor of Windows.

[edit] 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) [26] , and others. Some computer manufacturers, including Dell and HP, sell computers with FreeDOS as the OEM operating system.[27][28] NX-DOS, is currently under development. It is 16bit, 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.[29]

[edit] Embedding
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.[30] ROM-DOS was used as the embedded system on the Canon PowerShot Pro 70.[31]

[edit] Emulation
DOSBox running on Windows Vista 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.[32][33] DOS emulators are gaining popularity among MS-Windows XP and MS-Windows 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][32] 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.[34]

[edit] With Microsoft Windows

cmd.exe, the DOS-styled command prompt used in Microsoft-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, MS-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).

[edit] Versions

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

[edit] Software
Arachne web browser See also:DOS software, CUA (an aim to harmonise DOS applications user interfaces) DOS was the dominant PC-Compatible platform and many notable programs were written for it. These included:

Lotus 1-2-3; a protected mode spreadsheet program that saw heavy use in corporate markets and has been credited with the success of the IBM PC[35] WordPerfect; a word processor that is currently produced for the Windows platform dBase; one of the earliest database programs Telix; a modem communication program Arachne; a 16-bit graphical DOS web browser DJGPP, the 32-bit DPMI DOS port of gcc 4DOS, a much improved replacement shell Borland's integrated development environment, which included Turbo Pascal, Turbo BASIC, Turbo C, and Turbo Assembler BBS hosting software PCBoard, RemoteAccess, Spitfire, Maximus, McBBS, and TAG BASIC-language utilities BASICA and GW-BASIC Numerous first-person shooter games: Wolfenstein 3D, a joint venture between id Software and Apogee Software (later 3D Realms); id Software's Doom and Quake; and 3D Realms' Duke Nukem 3D, Shadow Warrior, and Rise of the Triad. The first two 3D Realms' titles were built with the DOS-based Build engine, written by Ken Silverman and used for numerous DOS FPS games. R.O.T.T. (among others) was based upon a heavily-modified Wolfenstein 3D.

[edit] Ease of use

[edit] User interface
See also: List of DOS commands Screenshot of a Windows command shell listing the files in a directory 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).[36] 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 resulting in Microsoft windows 9x becoming a self-contained program loader, and replacing DOS as the most-used PC-compatible program loader. 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;[37] DR-DOS 5, released the next year, included ViewMAX, based upon GEM.[38]

[edit] Multitasking
By its original design, DOS was a single task operating system. MS and PC DOS would introduce task switching with DOSShell,[39] and DR-DOS would include it with DR-DOS 6, via the TaskMAX command.[14]:320324 MS and PC DOS never had a multitasking capability;[40] DR-DOS had the capability with DR-DOS 7 (assuming DR-DOS was running with DPMI enabled).[41] Programs such as VMIX (shareware) or DesqView (commercial) could multitask even on an 8088, which did not have hardware support for multitasking due to its lack of protected mode.

[edit] Limitations
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. [42][43] 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.[44] 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.[45] 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

Run command
From Wikipedia, the free encyclopedia

Jump to: navigation, search The Run... dialog box in GNOME.

The command 'Winver' results in showing which version of Windows the user is running on their machine. On the Microsoft Windows operating system, the Run command is used to directly open an application or document whose path is known. It functions more or less like a single-line command line interface.


1 Accessing the Run command 2 Uses 3 BASIC programming language 4 External links

[edit] Accessing the Run command

Starting with Windows 95, the Run command is accessible through the Start menu and also through the shortcut key. (Windows key + R). The input field in the dialog will show roughly 4042 characters (when using Regional Language setting of "English (United States)" and running Windows XP); although more characters than this can be entered, you will not see the characters that were first entered, for they scroll out of view to the left. If the size of your command is longer than this (e.g, if a path is included), the dialog cannot be resized so you can see all of your input. Although the Run command is still present in Windows Vista, it no longer appears directly on the Start menu by default, in favor of the new search box and a shortcut to the Run command in the Accessories sub-menu.

[edit] Uses
Uses include bringing up webpages; for example if a user was to bring up Run Command and type in, their default Web Browser would show that page.

[edit] BASIC programming language

Run is also the command in the BASIC programming language that is used to start the execution of a program.


From Wikipedia, the free encyclopedia

Jump to: navigation, search CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special file that contains setup or configuration instructions for the computer system.


1 Usage 2 Examples o 2.1 MS-DOS o 2.2 FreeDOS 3 Issues 4 Dual Booting DOS and Win 9X 5 OS/2 / NT 6 See also 7 References 8 External links

[edit] Usage
The commands in this file configure DOS for use with devices and applications in the system. The commands also set up the memory managers in the system. After processing the CONFIG.SYS file, DOS proceeds to load and execute the command shell specified in the shell= line of CONFIG.SYS, or COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file. CONFIG.SYS is composed mostly of name=value statements which look like variable assignments. In fact these will either define some tunable parameters often resulting in reservation of memory, or load files, mostly TSRs and device drivers, into memory. In DOS, CONFIG.SYS is located in the root directory of the drive from which DOS was booted. In some versions of DOS it may have an alternate filename, e.g. FDCONFIG.SYS in FreeDOS, or DCONFIG.SYS in some versions of DR-DOS. Both CONFIG.SYS and AUTOEXEC.BAT can be found included in the root folder of Windows 95, and Windows 98 boot drives, as they are based on DOS. Typically these files are left empty, with no content, as they are not strictly required to run Windows programs from these versions.

Windows ME does not even parse the CONFIG.SYS file during the Windows boot process,[1], loading those settings from the Windows Registry instead: HKLM\System\CurrentControlSet\Control\SessionManager\Environment

[edit] Examples
[edit] MS-DOS
Example CONFIG.SYS for MS-DOS with Windows 3.xx:
device=c:\dos\himem.sys device=c:\dos\emm386.exe ram dos=high,umb devicehigh=c:\windows\mouse.sys devicehigh=c:\dos\setver.exe country=044,437,c:\dos\country.sys shell=c:\dos\ c:\dos /e:512 /p

The first line loads the himem.sys driver that enables DOS to use the high memory area. The second line loads the EMM386 memory manager, which emulates expanded memory. The command line argument ram allows the use of the upper memory area. Another argument that can be given to emm386.exe is noems, which allows use of the upper memory area without emulating expanded memory. The noems switch also frees up more umb blocks. The third line causes DOS to use high memory and upper memory when possible, freeing up more conventional memory for applications to use. Lines four to five load device drivers into the upper memory area: the first is a mouse driver from Microsoft; the second is a compatibility program. Line six sets localisation settings such as setting the country to the UK (code 044) and setting code page 437. The final line sets the shell to the default shell,, and starts it with c:\dos as the working directory, with an environment size of 512 bytes, and the /p indicates that it is the parent process and therefore cannot be shut down by using the exit command.

As of MS-DOS version 6, an optional DOS boot menu was configurable. With this, the user could configure any number of boot configurations and choose one on start-up. This was of great use because various DOS applications preferred different settings for optimal functionality. In particular, with Windows 9x, it was best to load as few 16-bit DOS drivers and utilities as possible. Example CONFIG.SYS with MS-DOS 6+ boot menu:
[menu] menuitem=WIN, Windows menuitem=XMS, DOS with only Extended Memory menudefault=WIN, 10 [common] device=c:\dos\himem.sys

dos=high,umb shell=c:\dos\ c:\dos /e:512 /p country=044,437,c:\dos\country.sys [WIN] device=c:\dos\emm386.exe ram devicehigh=c:\windows\mouse.sys devicehigh=c:\dos\setver.exe [XMS] device=c:\dos\emm386.exe noems

The layout of the DOS boot menu is fairly self-explanatory. The "[menu]" section defines menu entries. The option, "menudefault", allows a default choice with a countdown timer before it starts up (10 seconds here). The "[common]" area holds lines that will start for every menu choice, while the later "[WIN]" and "[XMS]" areas are specific to each configuration. The later boot file, AUTOEXEC.BAT, would receive the profile names and they could be separately configured there as well.

[edit] FreeDOS
screen=0x12 device=c:\dos\himem.exe device=c:\dos\emm386.exe dos=high,umb country=044,437,c:\dos\country.sys shell=c:\dos\ c:\dos /e:512 /p

In general .sys files are called in config.sys, as above, and .exe programs such as the version of the caching software SMARTDRIVE provided by Microsoft with MS-DOS 6.x, or LBACACHE of FreeDOS, are loaded in the autoexec.bat file. However, there are ways to load .SYS like files later from commandline as well as .EXE files from config file.

[edit] Issues
The system can still boot if these files are missing or corrupted. However, these two files are essential for the complete bootup process to occur with the DOS operating system. They contain information that is used to change the operating system for personal use. They also contain the requirements of different software application packages. A DOS system would require troubleshooting if either of these files became damaged or corrupted. If config.sys does not contain a "shell" statement (or the file is corrupt or missing), DOS typically searches for COMMAND.COM in the root directory. If this is not found, the system will not start up.

[edit] Dual Booting DOS and Win 9X

When installing Windows 95 over a preexisting DOS/WINDOWS install, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9X and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Win95 versions are made as .W40 files. When Caldera DR DOS 7 is installed on a system already containing Windows 95, Windows' CONFIG.SYS and AUTOEXEC.BAT retain those names. DR DOS' startup files are installed as DCONFIG.SYS (a name already used in earlier versions of DR DOS) and AUTODOS7.BAT.

[edit] OS/2 / NT
OS/2 uses the CONFIG.SYS file extensively for setting up its configuration, drivers and environment before the graphical part of the system loads. In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs was actually stored in the registry. There are many undocumented or poorly documented CONFIG.SYS statements used by OS/2.[2]

[edit] See also