Introduction to DOS: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
(Intro and History)
 
No edit summary
Line 11: Line 11:


The original DOS was designed to look and act much like the competing CP/M operating system, and was even compatible with CP/M programs to some extent, but was much less expensive and soon overtook CP/M as the primary operating system of the personal computer.
The original DOS was designed to look and act much like the competing CP/M operating system, and was even compatible with CP/M programs to some extent, but was much less expensive and soon overtook CP/M as the primary operating system of the personal computer.
== Storage Structure ==
DOS uses a ''drive'' and ''directory'' based file storage system. One of the easiest ways to envision this storage system is to think of drives as file drawers in an office and directories as file folders in those drawers. Directories can be ''nested'', that is put inside of each other, creating a sort of family tree style storage system. The main directory on each drive is called the ''root directory'' or ''root'' and is identified in DOS by a single backslash ''\''. This directory can contain both files and other directories, referred to as ''sub-directories''.
Each disk drive in the system is identified by a ''drive letter''. By DOS convention the primary floppy disk drive is identified as ''A'' and the secondary as ''B'' ''Fixed disks'' (more commonly referred to today as ''hard disks'' or ''hard drives'' are identified by drive letters starting with ''C''.
DOS uses the ''file allocation table'' (''FAT'') ''filesystem'' or the newer ''FAT32'' filesystem for storing data on disks. Each file stored in this filesystem has a ''filename'' of eight characters or less without spaces (though FAT32 allows for longer filenames and spaces) and a ''file extension'' of three characters which identifies the type of file. Because some characters are used by DOS for other purposes such as identifying drives, directories, file extensions, etc. they cannot be used in filenames. The list of invalid characters includes:
. " / \ [ ] : * | < > + = ; , ?
You can pick almost any three character file extension when naming a file except three which are reserved for programs which run on your computer: <code>COM</code>, <code>EXE</code> and <code>BAT</code>. Although there are many possible file extensions there are some which are frequently encountered and are useful to know:
{| class="wikitable"
! Extension || File Type
|-
| <code>BAK</code>  || A backup copy of a data file
|-
| <code>BAT</code>  || A batch script program file
|-
| <code>COM</code>  || A command program file
|-
| <code>DOC</code>  || A word processor document file
|-
| <code>EXE</code>  || An executable program file
|-
| <code>SYS</code>  || A system file
|-
| <code>TXT</code>  || A text file
|}
== The DOS Prompt and Running Programs ==
The ''DOS prompt'', sometimes referred to more generically as a ''command prompt'', is the main method of interaction with DOS. It is used to execute programs, change drives, change directories, move files, list directory contents and just about everything else. The default prompt shows the currently active drive followed by a greater than sign looking something like this:
C>
One of the simplest, and most frequently done things from the command prompt is executing a program. As mentioned earlier programs which run on your computer end with one of three file extensions: <code>COM</code>, <code>EXE</code> or <code>BAT</code>. If you are in the directory containing the program all you need to do is enter the program's filename at the prompt and press the Enter or Return key. Programs can be run without entering the extension on the filename, DOS will automatically try to run the program you entered regardless of whether you have entered a file extension. For example, if you are in a directory which contains the Microsoft Word program you could run it by entering the command:
C> MSWORD
and pressing the Enter or Return key. This would ''execute'', or run, the <code>MSWORD.EXE</code> program.
== Navigating Drives and Directories ==

Revision as of 19:18, 20 September 2009

DOS, short for "Disk Operating System", is a family of similarly designed computer operating systems originally popularized by Microsoft in the early 1980s which remained in popular use through about the year 2000 as the technology underlying some versions of the Windows graphical user interface. From nearly the beginning there were competing versions of DOS available, the most popular being MS-DOS (by Microsoft) and IBM PC DOS (also originally by Microsoft). Other versions of DOS include DR-DOS, FreeDOS, PTS-DOS, ROM-DOS, JM-OS, and several others. The most popular version of DOS still under active development and maintenance is FreeDOS, an open source, MS-DOS compatible version of DOS. Despite the variety of DOS vendors the systems are generally compatible in that a program written on one version of DOS (usually MS-DOS) will usually run on any other vendor's version. One notable exception to this rule is ProDOS written for Apple II based computers which was incompatible because of underlying differences in the hardware, such as the CPU architecture.

Although DOS has largely fallen out of favor as a mainstream operating system in favor of Windows NT based operating systems it remains a useful tool for any PC technician and at least a basic understanding of DOS is still useful. In addition Windows NT based operating systems still retain a "command line interface" (CLI) which uses familiar DOS commands and conventions to accomplish many system maintenance and repair functions.

History

Early hobbyist personal computers of the late 1970s and early 1980s ran a variety of, often incompatible, operating systems. One of the most popular at the time IBM was developing their original PC was the CP/M operating system by Digital Research which, at the time, ran on the 8-bit Intel 8080 and Zilog Z80 processors. During the development of the IBM PC an operating systems was needed for the Intel 8088 processor around which the system was based. IBM initially approached then Microsoft CEO Bill Gates about developing an 8088 version of CP/M but was directed to Digital Reseach, the owner of CP/M.

For obvious cost reasons IBM was looking for a blanket license to relabel and sell CP/M as IBM PC-DOS with their new computer. Digital Research founder and owner Gary Kildall refused, holding out for a royalty based deal at which time IBM withdrew their offer and returned to Microsoft looking for an alternative operating system. This time Gates approached Seattle Computer Products about a new CP/M like operating system code named "QDOS" which stood for "Quick and Dirty Operating System" developed by Tim Paterson to test Intel 8086 hardware made by Seattle Computer Products. Gates was able to secure a nonexclusive license to QDOS in December of 1980 for $25,000 and soon after hired designer Tim Paterson to port the operating system to the IBM PC which used the less expensive Intel 8088 CPU.

Shortly before the launch of the IBM PC, in the summer of 1981, Microsoft purchased all rights for QDOS (now known as the commercial product 86-DOS) from Seattle Computer Products for $50,000. Microsoft, in-turn, licensed the IBM PC version of 86-DOS to IBM to be sold as IBM PC DOS 1.0. In a stroke of genius the license agreement between Microsoft and IBM was non-exclusive, allowing Microsoft to license the operating system to other PC manufacturers when they arrived some time later.

The original DOS was designed to look and act much like the competing CP/M operating system, and was even compatible with CP/M programs to some extent, but was much less expensive and soon overtook CP/M as the primary operating system of the personal computer.

Storage Structure

DOS uses a drive and directory based file storage system. One of the easiest ways to envision this storage system is to think of drives as file drawers in an office and directories as file folders in those drawers. Directories can be nested, that is put inside of each other, creating a sort of family tree style storage system. The main directory on each drive is called the root directory or root and is identified in DOS by a single backslash \. This directory can contain both files and other directories, referred to as sub-directories.

Each disk drive in the system is identified by a drive letter. By DOS convention the primary floppy disk drive is identified as A and the secondary as B Fixed disks (more commonly referred to today as hard disks or hard drives are identified by drive letters starting with C.

DOS uses the file allocation table (FAT) filesystem or the newer FAT32 filesystem for storing data on disks. Each file stored in this filesystem has a filename of eight characters or less without spaces (though FAT32 allows for longer filenames and spaces) and a file extension of three characters which identifies the type of file. Because some characters are used by DOS for other purposes such as identifying drives, directories, file extensions, etc. they cannot be used in filenames. The list of invalid characters includes:

. " / \ [ ] : * | < > + = ; , ?

You can pick almost any three character file extension when naming a file except three which are reserved for programs which run on your computer: COM, EXE and BAT. Although there are many possible file extensions there are some which are frequently encountered and are useful to know:

Extension File Type
BAK A backup copy of a data file
BAT A batch script program file
COM A command program file
DOC A word processor document file
EXE An executable program file
SYS A system file
TXT A text file


The DOS Prompt and Running Programs

The DOS prompt, sometimes referred to more generically as a command prompt, is the main method of interaction with DOS. It is used to execute programs, change drives, change directories, move files, list directory contents and just about everything else. The default prompt shows the currently active drive followed by a greater than sign looking something like this:

C>

One of the simplest, and most frequently done things from the command prompt is executing a program. As mentioned earlier programs which run on your computer end with one of three file extensions: COM, EXE or BAT. If you are in the directory containing the program all you need to do is enter the program's filename at the prompt and press the Enter or Return key. Programs can be run without entering the extension on the filename, DOS will automatically try to run the program you entered regardless of whether you have entered a file extension. For example, if you are in a directory which contains the Microsoft Word program you could run it by entering the command:

C> MSWORD

and pressing the Enter or Return key. This would execute, or run, the MSWORD.EXE program.

Navigating Drives and Directories