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.
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
Post a Comment