Скачать 184.36 Kb.
These course notes are intended to be used as an introduction to MS-DOS version 5.0 although much of the material is also relevant to version 6 and its revisions.
They are not intended to be a sole source of reference for anyone learning or using DOS; reference will need to be made to the on-line Help utility and/or appropriate manuals as necessary.
After a number of introductory pages and background material the rest of the course is largely ‘hands-on’.
DOS is an operating system used on PCs (Personal Computers).
The Operating System is software which controls the hardware of the machine (the disks, keyboard, mouse, monitor, etc.) and allows the user's programs and packages to be run on the machine. It is the interface between your word processor or spreadsheet or other program and the electrical signals which the CPU (the Central Processing Unit or Processor), the heart of the computer, understands.
Sometimes DOS is stored on a Diskette, but normally it is stored on the Hard Disk, and it is easier to use when it is.
As with all programs (or software), different parts of DOS are brought into RAM and executed as they are needed.
It might be helpful to discuss some of the above terms before further discussing DOS.
Tapes, Disks and Main Memory
To actually perform or execute the instructions that make up computer programs they have to be brought into the Main Memory or RAM (Random Access Memory) of the computer. This an electronic medium and so when the machine is switched off and the power is lost the contents of memory are lost. Hence RAM is often characterised as Temporary Storage.
In order to preserve the instructions in a computer program (as well as computer data in general) a Permanent Storage medium is needed. This is provided by Disks and Tapes (Magnetic Media). Programs and data stored on disk or tape are not lost when the computer is switched off.
Once the computer has been switched on or ‘powered up’, programs and data are moved from permanent storage (usually the Hard or Fixed disk inside the computer but possibly a floppy disk or a tape) to Main Memory / RAM as required. When they need to be saved permanently they are written from Memory / RAM back to disk (or tape).
The capacity of any computer storage medium is usually measured in Bytes, Kilobytes or Megabytes.
A Byte can store 1 character.
1 Kilobyte (KB) is equivalent to 1,024 bytes and so stores 1,024 characters.
1 Megabyte (MB) is equivalent to c.1,000,000 (1,024 x 1,024) bytes/characters.
How do Disks and Tapes compare -
Cost - based on the same storage capacity, a Tape/Cassette is much cheaper than a Hard Disk. e.g. 520 MB storage - tape c. £12-13, Disk c. £170.
Speed of Accessing (Retrieving) stored information - a Disk is much faster than a Tape.
Therefore, because of its speed compared to tape, disk is the permanent storage medium which forms part of the computer system; whereas because of its cheapness and portability tape may be used for large scale backup/archiving (e.g. Hard Disk backup).
How does RAM compare -
Speed - much faster than disk (or tape).
Cost - more expensive than disk or tape (e.g. £25 - £30 for 1MB).
Storage Capacity - less than hard disk or tape.
More about Disks -
There are two types: the Hard Disk (referenced above) which is fixed inside the computer (hence it is also known as the Fixed disk) and has a large capacity, and the Diskette or Floppy Disk (discussed in more detail below) which has a smaller capacity but is portable.
Introduction to DOS - Disk Operating System
The Disk Operating System (DOS) is a computer program which is loaded from disk into the main memory of an IBM compatible PC, when the machine starts up, to control its operations. 'IBM compatible PC’ is a generic term used to refer to the majority of PCs, made by a number of manufacturers, e.g., Viglen, DEC, Compaq, Dell, IBM etc., which all run DOS. This term has come to mean, in effect, all PCs other than Apple Macintosh personal computers, (commonly referred to as Macs, rather than PCs) and Mac clones.
Over recent years three companies have produced DOS (or a brand of it); Microsoft, IBM and Novell. The latter has now dropped out of the market and IBM’s share is marginal. Microsoft DOS i.e. MS-DOS is now the de facto standard.
Here is a summary of the development of Microsoft DOS (MS-DOS)
Version Year Features
1.0 1981 Original Disk Operating System
1.1 1982 Support for double-sided disks
2.0 1983 Support for sub directories
2.01 1983 Support for international symbols
2.25 1983 Bug fixes
3.0 1984 Extended character set, large hard disks
3.1 1984 Support for PC networks, bug fixes
3.2 1986 Support for 3.5-inch disks
3.3 1987 Support for PS/2 computers
4.0 1988 Support for large partitions
4.01 1989 Bug fixes
5.0 1990 New shell, new editor, smaller kernel, memory management
6.0 1993 Disk Compression, better Memory Management, and Anti Virus software now included in the operating software. Previously they had to be bought separately, as Utilities. 6.0 Contained a number of bugs.
6.2 1993 Microsoft claims it was not a bug fix for 6.0, but most observers saw it as that.
Essential Components of DOS
DOS is composed of a number of files. You can choose to keep all of its components available on disk so that you can use all the facilities it offers (this is the norm if space is not a constraint). Alternatively you may choose to have a minimal setup in which case not all of its features will be available. However at a minimum there are three system files which you must have.
These are IO.SYS, MSDOS.SYS and COMMAND.COM.
The disk which your computer uses to load and run DOS must contain these files and is called the System, or Startup, or Boot, disk.
COMMAND.COM, the command processor (or shell) is the part of DOS that executes (or processes) the commands we will be looking at. These commands are either internal to the command processor (i.e. part of it), or external to it.
You must not create a file with the same name as an Internal Command. Examples of such commands are DIR, DEL and COPY, which are part of the COMMAND.COM program. You will find that the names of these commands cannot be seen when you list the files on your disk.
Each External Command is a separate executable program. When the user enters the name of an external command DOS reads the appropriate program file into memory and control of the computer system is passed to it; when the command terminates the command processor regains control of the system. External Commands e.g. XCOPY, can be seen when you list your files.
All IBM compatible PCs have a program which is not part of DOS but interacts with it to provide peripheral device support. This software is called the BIOS (Basic Input/Output System) and it contains the basic instructions for controlling such things as the disk drives (see below), keyboard and serial/parallel ports while the machine is running. It also contains instructions for testing various parts of the computer (e.g. memory, floppy disk drives and the various interfaces) which are executed when the computer is starting or ‘powering’ up. This POST (Power On Self-Test) routine will display a message if there are any problems.
Once the tests are all passed the operating system is loaded from disk and the machine is ready for use. This BIOS program is classed as firmware and stored in ROM (Read Only Memory). It is supplied by a number of companies, for example Phoenix, AMI, Quadtel.
Disk Drives and Floppy Disks (Diskettes)
Disk drives are those parts of the computer hardware which hold the disks and perform the writing and reading of data to and from disk. Within a DOS command line they are referenced by a letter plus a colon. The hard disk drive, containing the large capacity, fast access, fixed disk, is normally referred to as C: (i.e. the C drive), the floppy drive is A: and if there is a second floppy drive it is B:
When your PC is running a Prompt appears at the left of the screen indicating that the computer is ready for you to type in commands. This System, or DOS, or Command, Prompt includes a letter to indicate the current or default drive. That is the disk drive DOS will use when executing the command if no other is specified in the command line. For example A> and C> are both common prompts indicating the floppy and hard drives respectively.
When the floppy disk drive writes data to a floppy disk it places it in concentric circles called tracks. A floppy disk contains either 40 or 80 tracks each of which is divided into small sections called sectors, each sector containing 512 bytes. The disk drive contains a read/write head which moves from one track to the next as the disk rotates either finding data to be read, or locating free space to which it can write (depending on whether DOS has requested a read or write operation).
The following table shows the types of disk drives (for floppy disks / diskettes) a personal computer can have
5.25 ” Single-sided Double-Density 160KB/180KB 40 Tracks 8/9 Sectors
5.25 ” Double-sided Double-Density 320KB/360KB 40 Tracks 8/9 Sectors
5.25 ” Double-sided High-Density 1.2MB 80 Tracks 15 Sectors
3.5 ” Double-sided Double-Density 720KB 80 Tracks 9 Sectors *
3.5 ” Double-sided High-Density 1.44MB 80 Tracks 18 Sectors *
3.5 ” Double-sided High-Capacity 2.88MB 80 Tracks 36 Sectors
* indicates the 2 most common types of floppy.
Write Protecting Floppy Disks
On a floppy disk it is possible to physically enable or disable writing to the disk. This allows you to prevent accidental writing to the disk or unintentional formatting of the disk.
To disable writing to a 5.25" floppy disk a notch called the write protect notch should be covered by non transparent tape on both side of the disk.
If you look at the back of a 3.5" disk you will see there is a write protect window with a plastic sliding tab in the lower right corner. Sliding the tab down to open the window Write Protects the disk.
Inserting a Floppy Disk
Always ensure that you insert your diskette in the correct way, namely - the label side should be up, and the edge containing the silver slider should go into the machine first.
Never force the disk into the disk drive. If it does not slide in easily then there is something wrong.
New Floppy Disks and Disk Formatting
A new floppy disk must be formatted before DOS can read from and write to it. DOS provides the FORMAT command to allow the user to format disks. Information on how to use the FORMAT command will be given later. When you format a disk DOS reserves a small part of it for its tracking system. This consists of the File Allocation Table and Root Directory which allow DOS to store and locate files on the disk (see next section). When formatting a disk DOS also marks defective sectors so that it will not store information there.
Formatting a disk creates the following data structures on it -
The Root Directory - This contains the name, attributes (see later), time and date of last modification and size of each file on the disk. It also identifies the disk location of the first cluster of each file.
A Cluster, or Allocation Unit, is a group of consecutive sectors (in the case of a floppy disk 2 sectors). It is the smallest unit of disk space that can be allocated to a file.
Files are divided into clusters because there is not always a single piece of free disk space big enough to accommodate a particular file. Therefore it has to be broken up and distributed over different parts of the disk where there is free space i.e. where there are free clusters. As a result of this files, and disks themselves, are often referred to as being fragmented, a characteristic which slows down the processes of writing to and reading from the disk.
The File Allocation Table (FAT 1) - After the first cluster of a file has been located the FAT is used to locate subsequent clusters. It contains the address of each subsequent cluster in the allocation chain.
FAT 2 - A copy of FAT 1 which DOS uses to verify the integrity of the filing system.
The Boot Sector - When a disk is formatted as a boot (or system) disk a small program called the Bootstrap Loader is placed in the Boot Sector, the first sector on the disk. This program loads the operating system from disk into memory after the BIOS has successfully completed its POST.
It is possible to store hundreds of files on a disk and it can a tedious task trying to find a particular one you are looking for if they are not categorised in any way. Therefore DOS allows you to group related files together in directories. The main directory on a disk is called the ROOT directory, which is represented by \ (a back slash) and it is created by DOS when formatting the disk. You can create directories in the ROOT directory and within each other and they can each contain a number of files. The directory structure is often thought of as an inverted tree structure with the root at the top branching down into lower layer directories and subdirectories. For example -
\ (root directory)
DOS (subdirectory) WINDOWS (subdirectory)
EDIT.EXE (file) COPY.EXE (file) PROGMAN.INI (file) SYSTEM
Files and Filename
Data and programs are stored on disks in files. DOS itself consists of a number of files working together to provide the operating system. Other computer programs such as word processors and spreadsheets are also constructed from a number of files. When you save work produced with one of these packages (e.g. a document from a word processor) you save it to a file. When naming a file it is always a good idea to use a name which indicates the contents of the file. Likewise when naming a directory, which is a special type of file, you should use a name which helps to identify the files it contains.
DOS has certain rules governing the naming of files -
Filenames are not case sensitive.
Maximum length allowed for a filename is 8 characters.
Maximum length allowed for the extension to a file name is 3 characters.
The file name and extension are separated by a . (period).
Characters not permitted in naming files are
|Version 2 for php 4 and 5 (including 5)||Work in progress. Draft version. Please do not quote|
|Supplementary information form (sif): standard version||Diagnostic Exam for English 1A (Wait List Version) Name|
|New version of Kaspersky Mobile Security 9 Adds Support for Android and BlackBerry||Note: to use the tem data capture worksheet ms excel version 0a or later must be installed on your workstation|
|Iii feria nacional, I internacional infantil y juvenil de ciencia, tecnologia e innovación y I versión del premio ecopetrol a la innovacióN||The compiled programs work properly in Windows xp (32 bit version) and with ms-access 2000. They have not been adapted or tested to work with more recent versions of Windows or ms-access|
|Tема №1 операционная система dos вопросы : Начальные сведения о dos|
Операционная система dos. Программа norton commander. Специализированное программное обеспечение
|Основные и дополнительные команды ms-dos. Автор этой мини-книги Наумов Иван Здесь указано почти всё, что есть в нашей книге по dos +кое-что еще…|
Дополнительные команды ms-dos – стр. 6-8 (этого раздела в нашем практикуме нет, но этот раздел достаточно полезный)