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.  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: –

  • 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.

  • 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.

  • The DOS Programs.

DOS is implemented by 2 programs: –

  • 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.

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.

  • 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.
  • 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.

STARTING DOS (BOOTING).

Booting is a term used to describe the startup procedure in Microcomputers.

There are 2 ways of booting a computer loaded with DOS.

  • From a DOS diskette.
  • From the Hard disk.

Starting the computer from the Hard disk.

Computers can be booted up from the hard disk if DOS has already been installed on it.

  • Simply switch on the computer to start it up after making sure there is no diskette in drive A.

Note.  Today, computers start or boot from Windows loaded onto your hard disk.

To start DOS, use the MS-DOS Prompt.

Starting the computer from a DOS Diskette.

When a computer has no hard disk, you must load DOS on diskettes.

A DOS diskette contains the DOS commands needed to start & use the computer.

  • Insert the DOS diskette in drive A: (default drive) & then turn on the power switches on your computer.

Types of Booting.

There are 2 types of booting, namely;

  • Cold booting – Turn on all the computer power switches.
  • 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.

  • When Power is turned on, the computer first executes a small program, POST (Power-On-Self-Test) that is permanently stored in

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.

  • 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.
  • If the bootable disk is found, a program in ROM executes 2 hidden Operating system programs; 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.
  • COMMAND.COM is then loaded into RAM.Command.com allows the user to execute any Internal DOS command.
  • 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.
  • 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.
  • 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?

  1. List the four basic modules of DOS?
  2. Where is the boot record loaded on a hard disk?
  3. (a). What does BIOS stand for and where is it located?

(b). What is the function of the BIOS?

  1. (a). What generates the Command Prompt in DOS?

(b). What is the function of the Command Prompt?

  1. Briefly explain the sequence of operation during boot-up.
  2. What is the default drive in most computers and what does the word ‘default’ mean in this context?

 

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:

 

  • 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.

  • 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).

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

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.

  • Use a period/dot (.) followed by a maximum of 3 characters for the extension.
  • 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.

DOS DIRECTORIES & DIRECTORY STRUCTURES.

What is a Directory?

A directory is a unit that groups related files for storage in a disk.

Directories are stored on the disk with files in them.

Directory Structure.

This is a method of organizing files so that one can efficiently store and retrieve data.

DOS uses a Tree (hierarchical) structuring system that allows the user to easily store and manipulate a large number of files efficiently.

Every disk formatted by DOS contains a directory called the Root directory.  The Root directory is the main (top-level) directory & is used to hold a list of all the files stored on a disk.

You can create separate directories called Sub-directories under the main/root directory or within other directories & use them to hold files that you want to keep separate from those in the root directory.

Root (Main) directory.

This is the directory in a disk drive from which all other directories branch.

It is indicated by a Backslash (\).  E.g., C:\ or A:\

Subdirectory.

Any directory other than the Root directory.

Uses of Subdirectories.

  • Can be used to store files that are not required currently until they are needed again.
  • Can be used to store the files of one program separately from the files of another program.
  • It allows each user to keep his/her files separately, even if all the users are using the same system.

From the above graph;

The Root directory has 2 subdirectories; MOF and MOH.

The subdirectory MOF has a subdirectory MISD, while the subdirectory MOH has 3 sub-directories; Training, Accounts & Research.  The subdirectory Research has the subdirectory Funds.

Current (Default or Active) directory.

This is the directory that you are currently using or working in.

When you turn on the computer, the Root directory is the current directory until you change to another directory.

DOS will access the current directory when you specify a file without specifying a directory.

The TREE command.

The TREE command displays graphically the structure of a directory.