Computer Introductory Notes
Computer Introductory Notes
x
MS-DOS (Microsoft Disk Operating System)
Introduction.
DOS was the main OS for Intel-based PCs from 1980 – 1995. It is supplied by Microsoft
Corporation for use on IBM PC compatible computers or ‘Clones’.
DOS is a single-user, single-tasking OS that is disk-based & controls your computer & the
devices connected to it.
It provides the most basic instructions the computer needs to operate. It tells the computer how
to process information, how to handle Input & output, and how to manage files and directories by
use of commands.
√ DOS is a 16-bit OS (written for 16-bit Microprocessors running 16-bit applications).
√ DOS provides a Command-based interface to the user enabling him/her to execute programs.
It controls the operations of your computer when you use any programs. E.g., when you
create any files using DOS applications, the files are managed using MS-DOS.
DOS is normally supplied on a floppy disk or pre-installed on the Microcomputer.
DOS is used for starting the Microcomputer & managing the computer resources, which include:
The I/O devices, e.g. Monitor, Keyboard, Printer, Floppy disk drives, Hard disk drives, etc.
Files.
Memory.
Memory Requirements.
The older versions of DOS required very little memory. DOS 3.0 required about 30KB of the
DOS Conventional memory & less than 1MB of Hard disk space.
DOS 6.0 & above requires at least 5MB of Hard disk space & 50KB of the Conventional RAM.
BASICS OF DOS.
DOS STRUCTURE.
DOS consists of 4 basic modules: -
(i). The Boot Record.
This record begins on Track 0, Sector 1, Side 1 on every disk formatted using the DOS
FORMAT command. On a fixed disk, the Boot record is on Sector 1 of the DOS partition.
The Boot record identifies the disk & contains the initial boot program for the disk.
(ii). The BIOS.
The Basic Input Output System (BIOS) is located in ROM. It is a low-level interface to
the machine & is responsible for hiding the vagaries of the hardware from all other
software.
The BIOS provides a series of functions that programmers can use to perform operations
without having to concern themselves with the details of the underlying hardware.
(iii). The DOS Programs.
DOS is implemented by 2 programs: -
(a). The I/O System - an interface module loaded from disk that augments (enhances) the
ROM BIOS functions & usually contains a set of standard device drivers.
Input/Output activities - These are the Read or Write actions that a computer
performs.
A computer performs a “Read” when you type information on your Keyboard or you
choose items using a Mouse. When trying to open a file, the computer reads the disk
on which the file is located to find and open it.
76
MS-DOS 6.x
A computer performs a “Write” whenever it stores information on a disk, displays
information on a Screen or sends information to a Printer.
I/O addresses - locations within the I/O address space on your computer, used by a
device, such as a printer.
(b). The Disk Operating System (DOS) itself. It is a high-level interface for all programs
that run on the computer, whether or not they make use of the disk.
(iv). The Command Processor.
It is the normal interface to DOS for people working with the system. It generates the
Command Prompt (C:\>), accepts commands, and executes programs requested by users of
the system.
Types of Booting.
There are 2 types of booting, namely;
(i). Cold booting - Turn on all the computer power switches.
(ii). Warm booting - Press CTRL+ALT+DEL to restart the computer.
Note. Pressing CTRL+ALT+DEL can also be used to quit an application that has stopped
responding to the system.
1). When Power is turned on, the computer first executes a small program, POST (Power-On-
Self-Test) that is permanently stored in ROM.
POST instructs the computer to run diagnostic tests like checking the computer memory
(RAM) to make sure it is operating correctly; check the CMOS (BIOS), check the Hard disk
Controller, Floppy disk drive Controller & the Keyboard. If a problem is found, it displays
an error message on the screen indicating where the problem is located.
2). If no problem is found, the computer starts looking for a “Bootable disk” (a disk that has the
DOS “bootstrap” program on it). It starts with default drive (drive A:), followed by drive C.
3). If the bootable disk is found, a program in ROM executes 2 hidden Operating system
programs; IO.SYS & MSDOS.SYS found in DOS.
IO.SYS is a system boot file, while MSDOS.SYS gives the booting information, i.e. path,
Multi-boot, etc.
4). COMMAND.COM is then loaded into RAM.
77
MS-DOS 6.x
Command.com allows the user to execute any Internal DOS command.
5). The computer then searches for and reads the CONFIG.SYS file.
Config.sys provides information about a computer configuration to the CPU. E.g., what
devices the computer system has & how many files can be opened at once.
6). The Command.com then looks for an AUTOEXEC.BAT file. If an Autoexec.Bat file does
not exist, Command.com will ask the user for the correct date and time.
7). After the date & time prompts have appeared, a DOS Prompt (C:\> or A:\>) appears on the
Monitor. Seeing a C:\> or an A:\> means that;
DOS has successfully booted.
The default drive is the one with the letter shown.
DISK DRIVES.
A Disk drive is a unit that houses a disk.
Files can be stored either on the Fixed disk drive (usually Hard disk or Drive C:) or on Floppy
disk drive (Drive A:).
In order to store or retrieve information from a disk, the appropriate drive must be specified;
otherwise, DOS will assume the current drive.
Default drive.
This is the drive the computer checks first or returns to if no other specific instruction is given for
it to use another drive.
Most microcomputers use drive A as their default drive when starting up.
When a microcomputer is switched on, it normally looks for DOS in drive A first. If it doesn’t
find DOS in drive A, then it checks the hard disk.
To change the default drive after starting the computer, type the drive specifier and a colon.
E.g. A: {press ENTER} will change to A:\>.
DOS Prompt.
The symbol C> or C:\> with a blinking cursor after it is called the “DOS Prompt”.
When you see the DOS Prompt, it means that DOS is waiting for you to enter a DOS command
or the name of the program to run.
Descriptive Questions.
1. (a). What do the initials MS-DOS stand for?
(b). What type of operating system is DOS?
(c). What is the function of DOS?
(d). How many users can DOS handle simultaneously?
2. List the four basic modules of DOS?
3. Where is the boot record loaded on a hard disk?
4. (a). What does BIOS stand for and where is it located?
(b). What is the function of the BIOS?
5. (a). What generates the Command Prompt in DOS?
(b). What is the function of the Command Prompt?
6. Briefly explain the sequence of operation during boot-up.
7. What is the default drive in most computers and what does the word ‘default’ mean in this
context?
78
MS-DOS 6.x
FILES & FILE STRUCTURES.
What is a File?
A File is a collection of information initially created in memory and then stored with a filename
on a secondary storage device for preservation & future reference.
Creating a file means grouping related information so that it can be easily accessed.
Types of Files
There are three different types of files:
System files
The operating system needs system files to run.
Examples of system files:
a). AUTOEXEC.BAT
This is a batch file (i.e., a file which contains a list of commands), that is run whenever you
start your computer. However, it is not needed by the computer for it to be able to run.
b). COMMAND.COM
This file is very important in the startup of your computer. It contains the user interface for
Microsoft DOS (i.e., the DOS prompt, and all common commands).
c). WIN.COM
This file is essential to Windows systems as it is used to start up the GUI (Graphical User
Interface) for Windows. Without it Windows cannot start, even if the file was just
accidentally renamed or moved.
d). CONFIG.SYS
Config.sys is not needed to run the computer, but it can be used to tell Windows or DOS
specific information about the hardware that you are using, or to create a simple startup
menu.
e). IO.SYS
This is one of the most important system files, as it tells your computer how to
communicate with its hardware on the lowest level. Without it, nothing will happen on
your computer, and Windows will not start.
f). MSDOS.SYS
MS-DOS.SYS is a basic system file for DOS. It is similar to IO.SYS in its functions, and
still needs to be included for compatibility.
g). USER.DAT
USER.DAT is a data file that can be found in the Windows directory of your computer.
It is needed together with SYSTEM.DAT for the Windows registry (a large database
containing all the information about your computer’s hardware & software).
Application (program) files
They are used to run application programs & are installed onto your computer’s hard disk.
Document (user) files
These are files that contain user information and are created using application programs.
79
MS-DOS 6.x
File Management.
This is the organization & maintenance of files in a computer storage media.
File management enables the user to arrange his/her files into groups according to types; thus
speeding up storage & retrieval of information.
Naming of Files.
Filenames.
A Filename is a reference name given to a file when it is saved.
A file must be given a unique name in order to help the user differentiate it from other files
(especially if there are many files stored on one disk drive) & also it helps one to remember what
is inside the file.
A filename consists of a ‘file-name” and an “extension”.
The file-name must not exceed 8 characters & can contain any alphanumeric characters, A-Z, 0-9
except the following: -
Full stop (.), Square Brackets ([ or ]), double quote (“), colon (:), semicolon (;), slash (/),
backslash (\), less than or greater than sign (< or >), question mark (?), plus sign (+), equal sign
(=), asterisk (*), or blank space.
You can also mix numbers, letters and symbols when entering a filename.
File extension.
An extension enables the user to group files into categories or file types by giving more
information about what is in the file, such as Text (.TXT) files or Command (.COM) files.
Rules that apply to filename extensions.
(i). Use a period/dot (.) followed by a maximum of 3 characters for the extension.
(ii). Don’t use any spaces between the filename and the extension.
Note. DOS reserves certain filenames for specific devices that the computer uses, and therefore,
they cannot be used when naming files.
They include; AUX, CLOCK, COM, CON, KEYBD, $, APT, PRN, etc. These names can be
used as extensions but not as filenames.
80
MS-DOS 6.x
81
MS-DOS 6.x
It is the route MS-DOS must travel, starting at the root directory to get the files in another
directory.
Before DOS can find a file in a directory (other than the current directory), you must tell it where
to locate the file by specifying the Pathname.
E.g., a pathname can be a drive specifier, a series of directory names & a file specification. Each
of the elements is separated by a Backslash.
A:\directory1\directory2\filename.extension
A – The drive.
Directory 1, 2 – name of your directory. You can enter as many directory names as necessary.
Filename – name of the file you want to locate.
Extension – type of the file.
E.g., to specify the path of a file named README.WRI located in the WINDOWS directory,
you would type,
C:\>Windows\Readme.Wri ↵
Filespec.
This refers to the full file specification when a drive letter is included. A full file specification
usually consists of the drive letter, a colon & the filename.
The drive specifier must be placed before the filename. It tells DOS where the file is located.
E.g. A:\MOF\Sample.Txt
Descriptive Questions.
1. What is a Computer file?
2. Differentiate between a file and a directory.
3. (a). A file name consists of three parts. Name them.
(b). What characters can be used when naming a file?
(c). List at least three reserved words in DOS that should never be used as a filename.
4. Define the word ‘Filespec’ and give an example of a filespec.
5. With the help of a diagram, describe the directory structure of DOS.
6. What are the uses of sub-directories?
7. What is the purpose of the PATH command in DOS?
8. Name the command that shows the structure of a directory like the branches of a tree.
MS-DOS COMMANDS.
What is a Command?
A Command is an instruction issued by the user to the computer telling DOS what to do.
DOS commands are provided in DOS diskettes bought with each microcomputer.
Other than the DOS commands, every application program may have its own sets of commands
to perform specific tasks.
Internal commands of DOS.
These are the simplest & the most commonly used commands. They are stored in the Main
memory for fast access.
The Internal DOS commands are found in COMMAND.COM file. The commands cannot be
seen when you list the directory (using Dir), because they are part of the Command.com file.
They are executed via the Command.Com file, which is loaded automatically into RAM when
DOS is booted.
COMMAND.COM (the most important DOS command) is used to start up the machine. It
contains Internal commands such as “Dir” and “Prompt”. It is responsible for accepting user
commands & interpreting them for DOS.
82
MS-DOS 6.x
Examples;
DATE TIME CD / CHDIR MD / MKDIR RD / RMDIR
TYPE - used to have file contents displayed or printed.
DIR - used to obtain a directory listing (to view directories).
COPY - used to duplicate one or more files and save it.
CLS - used to clear the screen. On typing this command, everything on the screen gets cleared
off & the DOS Prompt appears on the top left corner of the screen.
DEL - used to delete one or more files from disk.
VER - used to find the version number of DOS that is in use.
REN / RENAME - used to rename files.
When you enter a command, DOS checks its library to see if the command exists. The sequence
of search is:
Main memory - Internal commands.
83
MS-DOS 6.x
Secondary storage - External commands.
If the command is found then it will be executed. Otherwise, an error message will be displayed,
such as “Bad command or Filename”
DOS Command Line.
The DOS Command Line is where users “type’ commands. The command line is indicated by a
DOS Prompt, i.e.,
A:\> or C:\> and a blinking cursor.
The letters ‘A’, ‘B’, and ‘C’ refer to disk drives.
Rules of typing MS-DOS commands.
Commands can be typed either in lowercase or uppercase.
Incorrect spelling or spacing will not be accepted by the DOS language.
To correct typing mistakes, press Backspace key and retype the command.
Entering of commands is done in 2 steps:
(i). Type the command & if necessary edit/change it using the command line editing keys, e.g.
BACKSPACE for erasing typed input.
(ii). Press the ENTER key.
When you press the Enter key,
- The line you typed is handed over to the DOS Command processor (Command.com)
for processing.
- The line is then saved in the command line TEMPLATE. The TEMPLATE can only
save one line, so each new line you type replaces the last line saved.
The TEMPLATE feature saves DOS users’ time in typing immediate commands that have
already been typed.
Function Editing Keys;
F1 - Copies one character at a time from the template.
F3 - Copies the entire template to the screen.
F5 - Moves the cursor down one line to allow you to edit or retype the currently displayed
line.
GETTING HELP.
To get assistance on how to use any of the DOS commands;
At the Command Prompt, type the name of the command followed by a space, the /?
switch, then press ENTER.
E.g., FORMAT/? ↵ will display the syntax of the Format command including all the
switches and their usage.
Using Wildcards.
A Wildcard acts as a substitute for a filename or extension.
There are 2 wildcards: -
Asterisk (*) – represents a whole word or a group of characters.
Question mark (?) – represents a single character.
E.g., To list all files with .COM extension in the DOS directory, type:
C:\DOS>DIR *.COM ↵
Descriptive Questions.
1. Why are a few commands loaded into computer-memory?
2. (a). What are the two classes of DOS commands?
84
MS-DOS 6.x
(b). What are the differences between Internal and External MSDOS commands?
(c). List 3 examples of Internal and 3 External commands.
(d). Name the command used to start up the computer.
3. Suppose you change the year of a microcomputer clock using the DATE command from
2001 to 2003 and then switch it off. What will be the date indicated by the microcomputer
when it is switched on again after a few minutes?
4. What is the main difference between ‘deleting’ and ‘backspacing’?
5. What is a Template? How do you recall the last command entered via the keyboard?
FILE COMMANDS.
Dir Type. More. Copy.
Move. Del or Erase. Undelete. Print.
Rename or REN.
1). LISTING (DISPLAYING) FILES IN A DIRECTORY OR DISK.
(a). To list all the files contained in the current directory, type:
DIR ↵
(b). To list the files in the root directory in your floppy disk (drive ‘A’):
At A:\>, type: DIR ↵
-Or-
At C:\>, type: DIR A:\ ↵
(c). To list the files in the directory MOF in drive C:
At C:\>, type: DIR C:\ MOF↵
The directory listing (or the DIR command) gives you 5 columns of information:
- Name of the file.
- Extension (if any).
- File size (no. of bytes).
- Date the file was created or updated.
- Time the file was created or updated.
Note. DIR has 2 options; /W and /P. These two options make file or directory listings easier to
read.
/W (WIDE) - causes the directory to be displayed horizontally across the screen.
/P - pauses the directory listing once the screen is filled.
To display the contents of drive A, pausing after every screen is full:
At A:\>, type: DIR/P ↵
-Or-
At C:\>, type: DIR A:/P ↵
To display the contents of drive A, horizontally across the screen (or using the Wide
format display):
At A:\>, type: DIR/W ↵
-Or-
At C:\>, type: DIR A:/W ↵
UNDELETE command.
The MS-DOS DELETE command does not actually erase the file from the hard drive. As
long as the Sectors containing the file pieces are not actually overwritten, the file is
retrievable.
In MS-DOS 5.0 or 6.22, you can recover files deleted accidentally using the UNDELETE
command. However, this command will only work if the space occupied by the file has not
been used by another file. Therefore, if you delete a file accidentally, make sure that you
undelete it before performing any other tasks on that particular disk.
To undelete a file,
Run the UNDELETE command (without any switches) as soon as possible after you have
deleted the file. If the sentry directory is present, undelete shows you the files available for
recovery.
To undelete the file called SAMPLE1.TXT from drive A, type:
A:\>UNDELETE Sample1.Txt↵
You will be prompted to provide the first letter of the filename again.
Examples:
87
MS-DOS 6.x
(i). To copy the file named MEMO1 on drive C to a directory named MOF on the same
drive.
COPY C:\Memo1 MOF↵
(ii). To copy a file named MEETING from a subdirectory LETTERS within the
subdirectory MOF on drive A to a subdirectory named MOF on drive C:
COPY A:\MOF\Letters\Meeting C:\MOF↵
(iii). To copy the file named MEMO2 from the current directory to the root directory on
drive A:
COPY Memo2 A:\↵
(iv). To Copy all the files from the root directory on drive A to the current drive, current
directory.
COPY A:\*.*↵
(v). To copy all files with an extension .DBF from a directory named MOF in drive A to a
directory named MOF in drive C.
COPY A:\MOF\*.DBF C:\MOF↵
-Or-
Change to A:\MOF\>, then type: COPY *.DBF C:\MOF↵
(vi). To copy the CONFIG.SYS file from drive C to drive A:
C:\>COPY Config.Sys A:↵
Tips.
/V –verifies that the new files are written correctly.
/-Y –causes prompting to confirm you want to overwrite an existing destination file.
Wildcards can be used to copy a group of files. For instance, to copy all Command files (files
with extension .COM) from the DOS directory in drive C to drive A:
C:\DOS>COPY *.COM A:↵
Note. To copy all the files in a directory, including the files in the subdirectories of that directory
and also hidden files, use the external XCOPY command.
At C:\>, type: XCOPY C: A: ↵
Descriptive Questions.
1. State four examples of File commands.
2. What is the function of the MORE command in DOS?
3. What facility does DOS provide to create ASCII text files?
4. Give the command used to:
(a). Display the name of the current directory or change from one directory to another.
(b). Copy entire directories including all the subdirectories.
(c). View the contents of the directory.
5. By giving examples, explain the functions of the ‘*’ and ‘?’ characters as used with DOS
commands.
Assume that all subdirectories are empty initially. Unless changed otherwise, for each action
below, start from the root directory and write down the commands required to perform the
following:
(a). Create two subdirectories under SYSTEM called LOTUS and WP.
(b). Create a file called Maths1.txt under MATHS subdirectory with the following contents.
1+1=2
3+3=6
(c). While in the MATHS subdirectory, copy Maths1.txt to Maths2.txt.
(d). Remove MATHS subdirectory.
(e). Remove LAB subdirectory.
DIRECTORY COMMANDS.
Dir CD / CHDIR RD / RMDIR MD / MKDIR
89
MS-DOS 6.x
(c). To move to a subdirectory called PETER which is under the directory USER; type:
CD\USER\PETER {press ENTER}
(d). To move one level of directories backwards, use
CD.. (CD followed by two periods) or CHDIR..
(e). To change to the root directory (C:\>), use
CD\ (CD followed by a backslash).
90
MS-DOS 6.x
Exercise (b).
1. For each of the following MSDOS file management tasks, state one specific command that
can perform the indicated task.
(i). Deleting files.
(ii). Changing directories.
(iii). Viewing directories.
(iv). Creating directories.
(v). Removing directories.
(vi). Renaming files.
91
MS-DOS 6.x
SCANDISK command.
SCANDISK is a full-featured disk analysis & repair program that checks a disk for errors &
repairs (corrects or fixes) any problem if found.
If you suspect that files in your hard disk or floppy disk may be corrupted or there may be any
other problems with your disk, run Scandisk (without parameters) to check for & repair errors
on the current drive.
Scandisk checks & fixes problems in the following areas:-
FAT
File system structure (lost clusters, cross-linked files). Lost clusters are the remains of
temporary files that are not cleared if the user crashes out from Windows, & are normally of
no use and take up disk space. Lost clusters are not linked to a filename, but are recorded in
the FAT as holding data.
Cross-linked files are clusters on disk that are linked to more than one file.
Directory tree structure.
Physical surface of the disk (bad clusters).
MS-DOS boot sector.
If SCANDISK finds a problem, it displays a Problem found dialog box that briefly explains the
problem and how to fix it. For the computer to fix the problem, choose the Fix button.
To check & repair a drive, use the following syntax:
SCANDISK [drive:]/All/AutoFix/NoSave/NoSummary/Surface↵
/ALL – checks & repairs all local drives.
/AUTOFIX – fixes damage without prompting.
/NOSAVE – deletes lost clusters rather than saving as files.
/NOSUMMARY - prevents Scandisk from stopping at summary screens.
/SURFACE – performs a full surface scan for your drive after other checks.
/CUSTOM – configures & runs Scandisk according to SCANDISK.INI settings. Scandisk.ini is
a disk status tool configuration file.
/MONO – configures Scandisk for use with a Monochrome display.
File System - the overall structure in which files are named, stored & organized by the OS.
E.g., MS-DOS & earlier versions of Windows use FAT16 file system. Windows 98 can use
FAT16 or FAT32 file system.
File Allocation Tables (FAT) - A method used by OS to keep track of where files are stored
on a hard disk.
93
MS-DOS 6.x
Tips.
FDISK & FORMAT are utilities necessary for installing a new hard disk in your computer or
for starting over afresh with a clean disk.
FDISK is used first to create a partition & then FORMAT is used to make the partition
available for use.
Warning: Using FDISK incorrectly can destroy all your data on your hard disk. Therefore,
don’t use FDISK if you’re not sure of how to use it.
File Allocation Table (FAT) - is a table of entries describing how each cluster on disk is
allocated. Each cluster has a specific entry and is marked as available, reserved, bad, the last
entry for a file, or used.
Note. FORMAT creates an image of the disk. The ‘image’ includes copies of the FAT and all
directory entries.
Warning:
Format destroys (erases/removes) any existing files or information on the disk being
formatted. Therefore, a disk should be formatted only if the information in it is no longer
needed.
You should never format drive C: (or hard disk).
The FORMAT command can be used to prepare an ordinary or a System disk. Ordinary diskettes
are used for backing-up files & programs, whereas System disks are used for starting (or booting)
the computer.
Preparing Ordinary Diskettes.
Syntax: FORMAT [drive:]
(a). To format a diskette in drive A for backing up data using the hard disk, type:
C:\>FORMAT A:/V↵
/V – is used to specify the volume label, which is used to identify the disk.
/B – allocates space on the formatted disk for System files.
/C – tests clusters that are currently marked “bad”.
/Q – performs a quick format.
Quick format deletes the File Allocation Table (FAT) & the Root directory of a disk, but
does not scan the disk for bad areas.
94
MS-DOS 6.x
95
MS-DOS 6.x
As the heads move toward the centre of the disk, each track is checked for integrity (reliability)
and is divided into Sectors (8 or 9 sectors, depending on the type of disk).
Formatting creates 4 parts:
1. Boot sector, which is accessed during booting.
2. The File Allocation Table (FAT).
3. The Root directory/folder.
4. The Data space for storing data.
The outer track (Track 0) is used for storing Systems information such as boot-sector
information & the File Allocation Table (FAT).
FAT contains information on the location of the files in the disk. It also holds system
information for booting up, especially in system diskettes.
UNFORMAT command.
The UNFORMAT command is used to restore a disk that was erased by the FORMAT
command to its former state if the disk was not formatted using the /U switch to specify an
“Unconditional” format. If the /U switch is used, then all the data on the disk is destroyed.
How UNFORMAT Works.
The Format command does not actually wipe out the disk sectors themselves; thus, the files are
still present just as when a file is deleted. If you do not do anything with the disk before
attempting to unformat it, you are able to retrieve all your files.
Syntax: UNFORMAT [drive:]/L
Drive: - specifies the drive to unformat.
/L - lists all the file & directory names found by UNFORMAT. If you do not specify this
switch, UNFORMAT lists only subdirectories & files that are fragmented.
To unformat a high-density diskette (3½”) in drive A, using the hard disk.
At C:\>, type: UNFORMAT A:/L↵
VOL – Displays the disk volume label and Serial number, if they exist.
Syntax: VOL [drive:]
96
MS-DOS 6.x
DEFRAG is a utility designed to address the problem of hard disk file fragmentation. It re-
organizes the files on the hard drive to optimize disk performance.
BACKUP command.
It is used to make duplicate copies of files from C to A.
At C:\>, type: BACKUP C: A:↵
Advantages.
(i). It locks your file.
(ii). Allows you to continue from where you had reached if the destination disk gets full.
Syntax for reading Backups.
At C:\>, type: RESTORE A: C:/S
Note. When restoring, you have to follow the sequence.
ATTRIB command.
An external command used to make files hidden or read-only.
Syntax:
C:\ATTRIB +H - will make files hidden.
C:\ATTRIB -H - will make files not to be seen.
MSD command.
It shows the configuration of the computer.
At C:\>, type: MSD {ENTER}
DEBUG command.
It runs Debug; a program testing and editing tool. It is used in programming to remove errors.
97
MS-DOS 6.x
A Bug is a computer error.
Syntax: DEBUG↵
After Debug starts, type ? to display a list of debugging commands.
To end the program, type letter Q, then press ENTER.
COMMON ERROR MESSAGES RELATED TO DISKS.
1. Not reading Drive A:
Abort, Retry, Fail?
Abort – terminates the command.
Retry – Retries the command.
Fail – informs the user that something is wrong.
This message appears in case: -
- No diskette is drive A:
- The diskette is not correctly inserted.
- The diskette is inserted but the shutter door is not closed properly.
In case you have a disk in disk drive A and you receive this error message, then try reading
drive B:
2. Not Ready reading Drive A:
Meaning – the diskette is not inserted properly or the door is not properly closed.
3. Error reading Drive A:
This message appears in case: -
- Drive A: is not properly connected.
- There is no power connected to the floppy disk drive, or
- The bus is not connected to the controller.
4. General failure reading Drive A:
The message appears if the diskette is faulty.
5. Insert diskette in drive A: and press any key when ready.
- This is caused by drive A: not configured in the CMOS Setup correctly. E.g., in the
CMOS, the drive might have been configured as drive B:
- It can also happen when you want to boot & the current drive doesn’t have System &
startup files.
6. Non-System disk! Replace the disk and then press any key to continue.
Meaning – The disk in Drive A: is not bootable. Remove the diskette.
7. Invalid Drive specification.
Your CMOS has been erased. Try to get a disk with Command.Com.
8. LEDs keep on lighting.
Caused by a reversed bus or power cable connection to the disk drive.
9. Floppy disk drive or Hard disk drive controller failure.
Caused by a faulty Controller card.
10. Verify whether the door is open.
Occurs if drive A: is not configured in CMOS Setup.
11. Seek Error reading drive C:
Meaning – drive C: is not well connected.
12. Bad Command or Filename.
Meaning – you have given a bad command or the file is not in the directory.
13. Bad Command interpreter.
98
MS-DOS 6.x
Your Command.Com is corrupt.
14. Packed File corrupt.
Your computer is infected by a virus.
Exercise.
1. Describe the steps a microcomputer goes through while booting up from the hard disk, once
it is switched on.
2. (a). What is an MS-DOS Command?
(b). Give the difference between External and Internal DOS commands.
(c). List and explain 4 commands used in MS-DOS.
3. Name two DOS commands that may be used for checking disk errors.
4. Define the following terms: -
(i). DOS Prompt.
(ii). Default disk drive.
5. (a). Define Root directory.
(b). Give some two examples of root directories you know.
6. Write down the appropriate DOS commands to perform the following tasks.
(i). List/display all files in the current directory.
(ii). Copy all files from a directory named MICK1 to your floppy disk.
(iii). Delete all files with an extension .BAS in the current directory.
99
MS-DOS 6.x
(iv). Display the volume Serial Number of a particular drive.
7. What information does the DIR command give?
BATCH FILES.
What are Batch Files?
Batch files are normal text files that contain a series of commands, which are executed whenever
you type the name of the batch file.
Batch files must have the extension .BAT for DOS to recognize them as batch files.
Batch program - An ASCII (text) file that contains one or more MS-DOS commands. A batch
program’s filename has a .BAT extension. When you run a batch program, the commands are
processed sequentially.
100
MS-DOS 6.x
CONFIG.SYS File.
It is a text file containing commands that can configure (organize) your computer’s hardware
components (Memory, Keyboard, Mouse, Printer) so that DOS & your applications can use
them.
The purpose of the CONFIG.SYS is to load installable device drivers & reserve space in the
system memory for information processing. It instructs DOS on how you want it to work with
the various components of your system configuration.
When MS-DOS starts, it carries out the commands in your CONFIG.SYS file first.
CONFIG.SYS File Commands.
Command Purpose
BUFFERS - Reserves storage areas equivalent to .5KB each in the Main memory area
for transferring information to & from disks.
COUNTRY - Allows you to change the national language setting for your system.
DEVICE - Loads an installable Device driver (a program that controls a hardware
component, such as a Mouse or CD-ROM drive) into Conventional
memory.
DEVICEHIGH - Loads an installable device driver into Reserved (Upper) memory.
To load DOS into Extended memory;
Device=C:\DOS\HIMEM.SYS↵ (Himem.sys is the XMM memory manager).
DOS=HIGH
DEVICE=C:\DOS\EMM386.EXE 2048 - Simulates extended memory as Expanded memory.
FASTOPEN.EXE - Speeds up file access time by opening frequently used files & tracking
their locations in memory.
DOS - Specifies whether MS-DOS will use the High Memory Area (HMA) &
whether it will provide access to Upper Memory Blocks (UMBs).
LASTDRIVE - Sets the number of valid drive letters.
REM - Indicates that the text that follows is disabled.
STACKS - Specifies how much memory to reserve for processing hardware
interrupts.
2. At A:\>, type:
EDIT Config.Sys↵
Device=C:\DOS\Smartdrv.Sys↵ - Improves computer speed by putting information in a
Disk Cache (the space in memory where the information from a disk is stored).
Install=C:\Fastopen.Exe C:=50↵ - Speeds up file access time by opening frequently used
files & tracking their locations in memory rather than from the directory on the disk. 50 files
will be traced.
Press ALT+F, and choose EXIT.
3. At A:\>, type:
Copy CON Config.Sys C:↵ (To create & copy the Config.sys file from drive A to C).
Buffers=30{ENTER}- Sets the no. of Buffers (Memory areas used for temporary holding
file data as you read & write).
Files=40{ENTER}- Sets the no. of files that can be opened at one time.
Device=C:\DOS\Mouse.sys{ENTER}- Loads the mouse driver so that a mouse can be used
with the system.
Press F6{ENTER}
With disk in drive A, press CTRL+ALT+DEL.
4. Copy CON: C: Config.Sys↵
Device=DOS\C:\Windows\Himem.sys↵
Device=Mouse\Mouse.com↵
Device=CDROM\CDROM DRV.SYS↵
Buffers=30↵
F6 {ENTER}
Boot {Press CTRL+ALT+DEL}
Examples of CONFIG.SYS Files.
1. Device=C:\DOS\SETVER.EXE - Loads the SETVER.EXE device drivers. The
SETVER.EXE driver manages the MS-DOS version table.
Device=C:\DOS\HIMEM.SYS - Loads the HIMEM.SYS device drivers. The HIMEM.SYS
driver manages Extended memory.
Device=C:\DOS\EMM386.EXE RAM - Loads the EMM386.EXE device drivers.
The RAM switch directs the EMM386.EXE driver to provide access to Upper memory and
simulate Expanded memory.
DeviceHigh=C:\Mouse\Mouse.Sys↵ - Loads the MOUSE.SYS device drivers, which
provides access to the mouse into Upper memory.
Buffers=20 – Reserves 20 buffers for transferring information to & from disks.
Files=40 – Gives MS-DOS access to 40 files at one time.
Break=ON – Checks frequently for the CTRL-C or CTRL-BREAK key combination.
DOS=High,UMB – Runs MS-DOS in the High memory area and gives programs access to
the Upper Memory Area.
2. Files=99
Buffers=40
102
MS-DOS 6.x
Device=C:\DOS\Mouse.sys
Device=C:\DOS\Himem.sys
DOS=High
AUTOEXEC.BAT file.
It is a special batch program that runs every time the computer starts. It can be used to display
the DOS Prompt in a particular format, specify the path, display screen messages and start
programs (usually memory-resident programs such as Virus guards, device drivers, etc).
AUTOEXEC.BAT File Commands.
Command Purpose
PROMPT - Sets the appearance of the DOS Prompt.
MODE - Sets the characteristics of your Keyboard, Monitor, Printer &
Communication ports.
PATH - Specifies the directories that MS-DOS should search for Executable files
(files with .COM, .EXE & .BAT extensions) & the order in which the
directories should be checked.
Echo Off - Directs MS-DOS not to display the commands in the AUTOEXEC.BAT
file as they run.
You can also prevent a command from appearing by inserting an at sign
(@) before the command.
SET - Creates an environment variable that programs can use.
103
MS-DOS 6.x
1. @ECHO OFF - Tells DOS not to display the commands as they are being executed.
Path C:\DOS;C:\Windows - Sets the PATH to the DOS and WINDOWS directories.
Prompt=$P$G - Sets the DOS prompt to the familiar C:\> prompt.
CLS - Clears the screen.
C:\Wp51\Wp - Starts the WordPerfect program.
2. DOS\SmartDrv. Exe
DOS\DosKey.COM
Path=C:\;C:\123r24;C:\Dbase;C:\Wp51;C:\Word;C:\Graphics;C:\DOS;C:\QPro;C:\Windows
Descriptive Questions.
1. (a). What are batch files?
(b). What are the AUTOEXEC.BAT and CONFIG.SYS files used for?
Time Out - If a device is not performing a task; the amount of time the computer should wait
before detecting it as an error.
Time Slice - The amount of processor time allocated to an application, usually measured in
Milliseconds.
104
MS-DOS 6.x
10. It organizes information to facilitate easy storage & retrieval of documents. It allows the
user to see & keep track of the number of files in the disk.
Exercise.
1. Describe the functions of the Disk operating system software in the computer system.
BIBLIOGRAPHY.
1). Computer science – Fifth Edition
C.S. French - DP Publication Ltd.
5). MS-DOS, and Microsoft Windows ‘95 and ‘98 Online Help.
105