Phil Storrs PC Hardware book

An introduction to the DOS Operating System

The heart of the DOS operating system are the three SYSTEM files that make up the DOS itself. These three files are called IO.SYS, MSDOS.SYS and COMMAND.COM. The two files with the .SYS extension are made HIDDEN and READ ONLY so they cant be deleted from the disk. These two files provide the various routines that form the basics of the DOS Operating System. The third file is the Command Interpreter and it processes the user commands and directs operations. The COMMAND.COM file is not hidden or made read only.

When the DOS computer is BOOTED, these three system files are loaded into the computers RAM memory. The COMMAND.COM file is loaded in two parts and the TRANSIENT portion of this file is usually flushed from memory, when an application is loaded, and reloaded when the application is terminated. This is done to make more memory space available for applications.

DOS has two types of commands

A summary of the HELP for DOS 6.22 commands with the commands not available in Windows 95 DOS indicated.

Other DOS Files

When you look at the boot disk of DOS computer you will see several types for DOS files.

Configuring DOS

When DOS loads, it allocates memory for work space and for configuration settings. The DOS configuration information helps it work with files (how many are open and can be opened), work with disk drives (buffering disk data, how many drives are available, file search path), work with hardware devices (through device drivers), and work with the Video system and Keyboard. DOS is configured by two Optional files it looks for on the boot disk at start-up. These files are called CONFIG.SYS and AUTOEXEC.BAT. The CONFIG.SYS file

After loading the DOS system files, the computer reads from a file called CONFIG.SYS, and automatically executes the statements in the file. CONFIG.SYS is used to define important DOS environment settings, and to change the settings from the DOS default values. Some of the most common CONFIG.SYS statements are:

Device Drivers

Device drivers are loaded from the CONFIG.SYS file and remain in memory and act as custom extensions to DOS, performing functions such as changing the keyboard's characteristics or establishing basic communication with a local area network. Device drivers are often provided as a part of certain hardware or software products. Device drivers provide support for devices that are not supported by DOS. The most common examples of device drivers today are the files that provide DOS with support for Sound Interface cards and CD-ROM Drives. These device driver files are supplied by the manufacturer of the particular hardware in use.

The AUTOEXEC.BAT

After DOS is loaded, the computer looks for an optional file called AUTOEXEC.BAT. This file contains a series of DOS commands and these are automatically executed after DOS is loaded. Some typical functions carried out by this file are -

The AUTOEXEC.BAT is also used to run programs on start up that may be required to perform some tasks on start-up. The old XT type computers usually had a "Real Time Clock on the I/O card and the time and date from this clock had to be transferred to the computers system clock on start-up. A clock program was usually run from the AUTOEXEC.BAT file to achieve this. The AUTOEXEC.BAT file can also be used to load Terminate and Stay Resident programs that may provide the user with some special facilities as a background task to the applications they may use. An application program can be started from the AUTOEXEC.BAT file and the user may never need to see the DOS prompt.

Support for the Mouse Device

In the early days of DOS, the mouse was supported by a Device Drives (a .SYS file) loaded from the Config.sys file but today it is usual to provide Mouse support with a .COM file loaded from the Autoexec.bat file. Some device drivers files are .EXE or .COM files and these are usually loaded from the Autoexec.bat file instead of the Config.sys file.

Booting the DOS Computer

The processes of booting a computer involves loading the operating system into the computers RAM memory. When you turn on a PC Computer it runs a series of routines that are located in the BIOS ROM and these routines perform the following functions.

These processes will be covered in more detail in a chapter on the POST routines.

The last of the above processes involves looking for an operating system on a boot disk. Traditionally the computer will look at the first floppy disk drive (drive A:) first and if it does not find an operating system on a disk in this drive it will look at the first hard drive (drive C:) for an operating system. Over the years the boot routines in the BIOS ROM that start the computer up have been changed and now most modern DOS computers give the user a BIOS setup option of bypassing the initial search for an operating system on drive A:.

The "Boot Strap Loader" routine that loads DOS into memory is looking for a disk with the three DOS System files on it, IO.SYS, MSDOS.SYS and COMMAND.COM.

The boot strap loader routine in the BIOS ROM does not actually load DOS itself, it loads a boot strap loader from the Boot Sector on the boot disk and this second boot strap loader loads the operating system. This is done to make the DOS hardware more universal by allowing for operating systems other than DOS to be loaded.

Another interesting point to note is that all disks have a Boot Sector, not only System Disks. If you try to boot a DOS computer from a non-system disk (a disk that has been formatted without the three DOS system files) you will get an error message about the disk being a non-system disk. This error message is coming from the boot strap loader contained in the boot sector of the disk. The boot strap loader in the BIOS ROM has loaded the boot sector from the disk, and the boot strap loader loaded into RAM from the boot sector, then looks for the three DOS system files on this disk.

Making a System Disk (boot disk)

Before a Floppy Disk can be used on any computer system it must be TESTED for SURFACE DEFECTS and its DOS infrastructure must be setup. The surface of a floppy disk is divided into Tracks, Sides and Sectors and some of the sectors are assigned to providing support for the data that is to be stored on the disk. The process of preparing a disk for use is called FORMATTING.

The Format process is provided by the DOS External Command, Format and we have some options available when formatting a disk.

The only other way the SYSTEM FILES can be out onto a disk is to use the DOS External Command, SYS.
Examples: SYS A: or SYS C:
This command will copy the three system files to a disk if there is room for them on that disk.

When we produce a System disk, FORMAT or SYS, only puts the three system files onto the disk, it does not put any of the DOS external command files, device drivers or support files on it.

When we load the latest versions of DOS onto the hard disk drive in a modern DOS computer, the original DOS disks provide automated routines for formatting the boot disk, transferring the DOS system files, setting up a DOS sub directory containing the external command files, the device drivers and the support files, and creating simple Config.sys and Autoexec.bat files.

DOS 6.22 help Back to the opening index Book one index


Copyright © Phil. Storr, last updated 26th December 1998