Skip to main content

DOS CONFIGURATION AND AUTOMATIC EXECUTION FILES

The CONFIG.SYS and AUTOEXEC.BAT files can be used to set the way your computer responds to commands. The purpose of each of these files is briefly described. Although these files are not always essential to the proper operation of your computer, there are certain programs that depend on their presence. At this point in your exploration of DOS, you are not expected to make use of these commands. However, it is important to know what they are and how they can be used. When you finish this blog, you may wish to experiment with the effect of these files on the way your computer interacts with certain programs, its operating speed, and the allocation of memory.

CONFIG.SYS When your computer is turned on, DOS  checks for a CONFIG.SYS file and adjusts your computor's configuration according to commands contained in that file. The CONFIG.SYS file is always found on the main directory of the DOS book disk. If you have a hard disk system, it is found on drive C, although you can boot from a floppy disk even when using a computer equipped with a hard disk. DOS is almost always on drive A when  using a floppy disk-based microcomputer. Some microcomputers will boot from drive B, but these systems are rare.

This CONFIG.SYS file is created and saved using the DOS EDLIN command, the DOS 5.0P EDIT program the copy command, or an ASCII word processor. In section 5, you are shown how to use the COPY command in file creation. The following command lines are typical of what you might find in a CONFIG.SYS file for MS-DOS 5.00. Don't worry if these commands are totally foreign to you. Here, you should just know that these files can exist and are used to control the way your computer operates.

The first three lines of the following CONGIF.SYS file example are specific to MS-DOS 5.00 and an 80286-, 80386, or 80486-based microprocessor equipped with at least 2 megabytes of random access memory. The fourth through seventh command lines apply to all versions of DOS beginning with 2.00.

Device=\DOS\HIMEM.SYS
DOS=HIGH
DEVICE=\DOS\SMARTDRV.SYS 1024
BUFFER=40
FILES=40
BREAK ON
DEVICE=\DOS\ANSI.SYS

The "\DOS" portion of some command lines tells DOS to look in the DOS sub directory for the corresponding device drivers files. A backslash (\) always identifies following text as a directory name rather than a filename. You learn more about file and directory names in Section 4. Following is a description of each command line in the CONFIG.SYS file example.

DEVICE=\DOS\HIMEM.SYS-- This command allocates memory above 640K, where certain device drivers maybe loaded. This leaves more memory in the first 640K available for programs operaton.

DOS=HIGH-- This command loads the MS-DOS 5.00 system files above 640K.

DEVICE=DOS\DOS\SMARTDRV.SYS 1024-- When using a computer having at least 2024 kilobytes and extended memory, this command allocates a 1024 kiobytes of cache memory. This process speeds program execution by loading and executing programs in memory rather than on disk. SMARTDRV is particularly useful with Windows 3.0, as Windows can adjust the size of cache as necessary.

BUFFERS=40-- A buffer is a 528-characters (or byte) block of computer memory temporarily used to store data that is either read from or written to your disk. Buffers speed up data input/output operations. Buffers are particularly helpful when processing databases.

FILES=40-- This command lets you change the number of files that can be opened at the same time. The default value is commonly FILES=8. Many programs suggest setting FILES to a value of from 20 to 40.

BREAK ON-- The BREAK ON command causes DOS to check for the Ctrl-Break (or Ctrl-C) sequence before performing any program operation. When BREAK OFF is active (which is the default value) operation from, or output operation to, a standard device (LPTn, COMn, CON, AUX, etc.) occurs. If your CONFIG.SYS file includes the command line BREAK=ON, then you can press Ctrl-Break to interrupt program operation and return to the DOS prompt. To check the status of BREAK, you can type BREAK and press Enter.

DEVICE=\DOS\ANSI.SYS-- The ANSI.SYS device driver provides extended screen and keyboard control features. Documentation supplied with programs requiring the ANSI.SYS driver usually tells you to load the ANSI.SYS driver in your CONFIG.SYS file. Some programs do not operate properly without it.

The SELECT command can also be used to create CONFIG.SYS files in DOS versions 3.3 and 4.01. SELECT was discontinued in MS-DOS 5.00. See Appendix B for more information about configuration commands and device drivers.

AUTOEXEC.BAT: This file automatically runs for (or executes) the command lines included within the file when your system is turned on. Each command encountered in this file is run as if you typed it directly from your keyboard. Like CONFIG.SYS, DOS "looks" for the AUTOEXEC.BAT file during the boot process. If it does not exist and you do not have a build-in, battery-powered clock-calendar, the DATE and TIME prompts are automatically displayed.

Following is an example of commands that are typically found in an AUTOEXEC.BAT  file.

ECHO OFF
PROMPT $p$g
PATH=C:\;C:\WP51
CHXDSK /F

The command lines in this AUTOEXEC.BAT file perform the following actions:

ECHO OFF--Suppresses the display of screen dialogue as each command is executed.

PROMPT $p$g-- Modifies the display of the DOS prompt. Without this command line the C prompt is displayed as C:. The $p displays the directory (or path) name; the $g displays the greater than character. The result is displayed C:\> for the main directory on drive C. It would display C:\DOS> if the \DOS sub directory were currently active.

PATH=C:\C:\DOS5;C:\WPS51-- Provides access to programs located in the listed file paths.

CHKDSK /F-- Runs the CHKDSK program; uses the "fix" option to recover lost clusters.

Comments

Popular posts from this blog

Filenames

It is important to understand DOS file naming conventions and their use. Here, filenames and some special filename "tools" called wild cards and literals are described. What is a File name?   Every program and data file is given a name to differentiate it from other programs and data files. A program is one or more computer instructions collected into a file. A data file is normally a collection of characters (or data) that make up a document, like a letter, or a database, like a collection of accounting transactions or customer records. Descriptive filenames are normally used. For example, if you create and save a letter to Mom, you might give it the filename MOM.LTR. A letter to Dad could be called DAD.LTR. A word processing program file might have the filename WP.COM. Examine these filenames a little closer. First, notice that each filename is meaningful. This is important if you want to know what is in a file by looking at its name. Obscure filenames are of little u

What Is DOS?

What is DOS? Your disk operating system (DOS) performs a number of essential jobs. These includes: Controlling the way various application programs, such as word processors, electronic worksheets, database managers, accounting programs, etc., operate with your computer. DOS creates an environment that lets these programs "talks" to your computer and its input and output devices (printers, modems, display screen, keyboard, disk drivers, etc.). Keyboard and program-generated information is read, interpreted by DOS, and transferred to the selected computer device. Data being returned by your computer device. Data being returned by your computer is again translated by DOS into useful information and written to an output device, such as your display screen, printer, or disk. Providing "housekeeping" and file management utilities that perform useful tasks such as: Disk preparation (formatting, copying, etc.) File operation (creating, displaying, copying, combining, renami