[Front] [Prev Chapter]
[Next Chapter]
The operating system configuration is defined by the CONFIG.SYS and AUTOEXEC.BAT files, both of which are executed every time you boot the system. This chapter describes these files.
Note: If you have installed DR-DOS on a computer already running Windows 95, the files DCONFIG.SYS and AUTODOS7.BAT replace CONFIG.SYS and AUTOEXEC.BAT as your operating system configuration files. In this manual, wherever you see the files AUTOEXEC.BAT or CONFIG.SYS mentioned, if you have a machine with both DR-DOS and Windows 95, replace these with AUTODOS7.BAT and DCONFIG.SYS.
For some advanced configuration changes, you may need to edit the configuration files directly using EDIT or another text editor. This chapter includes complete descriptions of all the special commands you can use in CONFIG.SYS.
NOTE: There are three CONFIG.SYS commands (DOS, HIDEVICE/DEVICEHIGH, and HIINSTALL/INSTALLHIGH) that are used for optimizing the way in which the system uses memory. These commands are also described in Chapter 10, "Managing Memory."
Using SETUP to Configure the System
The SETUP program allows you to make most of the changes to the system configuration that you may need without editing the configuration files yourself. Use SETUP to configure any of the following system features:
Warning: Certain utilities must not be run on a Windows 95 computer, even under DR-DOS. These include STACKER, DISKMAP and DELWATCH. Only use Windows 95 management tools because these support long filenames.
Starting SETUP
Start SETUP by making DRDOS the current directory, and typing the following command at the system prompt: Getting Help in SETUP
SETUP has extensive online help which is "context-sensitive"; simply press the <F1> key when an option is highlighted or when your cursor is on a field for which you want to view help information.
Leaving SETUP
You can leave SETUP at any time and return to the operating system by pressing <Alt> X and choosing to exit to DOS. Your existing system configuration is not affected and you can go back into SETUP at any time to change values. Configuration values will not actually change until you reboot the system.
SETUP Advise Mode
To see a summary of your current system configuration which includes current memory managers, available memory, last physical drive, and (if applicable) recommendations to improve the efficiency of the system, enter the following command: Configuring the System by Editing the Configuration Files
It is always easier and safer to use SETUP to make changes to the system configuration. Occasionally, however, you may want to make a change that can only be made by editing the configuration files yourself. Loading a CD-ROM driver, for example, can only be accomplished by manual editing of CONFIG.SYS.
In the CONFIG.SYS file, you can use any of the CONFIG.SYS commands. For information about the syntax and function of each CONFIG.SYS command, refer to "CONFIG.SYS Command Reference" starting on page 9-9.
NOTE: Three CONFIG.SYS commands are used to optimize the way in which the system uses memory. These commands (DOS, HIDEVICE/DEVICEHIGH, and HIINSTALL/INSTALLHIGH) are also described in Chapter 10, "Managing Memory."
CONFIG.SYS
When you install the operating system, a CONFIG.SYS file is built for you automatically and stored in the root directory of the disk from which you start the operating system.
You can also view the CONFIG.SYS file in SETUP by choosing the option to view CONFIG.SYS at the end of the SETUP program, if you have made changes.
AUTOEXEC.BAT
The AUTOEXEC.BAT file is a batch file that is run every time you start the operating system to configure it appropriately. When you install the operating system, an AUTOEXEC.BAT file is automatically built for you and stored in the root directory of the disk from which you load the operating system. The file must always be stored on this disk, which is usually your hard disk.
Note: For security, you can disable the F5 function by entering the following command as the first command in CONFIG.SYS. This also disables the F8 function described in the section "Confirming Each Configuration Command".
Starting Applications in AUTOEXEC.BAT
You can start your favorite software applications automatically by loading them from your AUTOEXEC.BAT file. Bypassing the Configuration Files
If you want to perform a "clean boot" of your computer by bypassing the CONFIG.SYS and AUTOEXEC.BAT files during startup, press and release <F5> (once only) after the computer finishes its internal tests. This is usually indicated by a beep. The computer will then start with a basic ("clean") configuration instead of its usual configuration.
SWITCHES /N
Confirming Each Configuration Command
If you want the system to prompt you to confirm each CONFIG.SYS and AUTOEXEC.BAT command during startup, press and release <F8> (once only) after the computer finishes its internal tests. This is usually indicated by a beep. The commands in CONFIG.SYS and AUTOEXEC.BAT are displayed one at a time followed by a prompt; answer Y to execute the command or N to bypass it. CONFIG.SYS Command Reference
The commands explained in this section can all be used in your CONFIG.SYS file. Remember, however, that it is always easier to let SETUP update CONFIG.SYS automatically rather than to edit the file yourself.
?
Format
? ["message_string"] command Explanation
When you use ? at the beginning of a statement, the operating system prompts you about whether or not you want the statement executed. Examples
The following statement means that you will be asked whether or not you want ANSI.SYS loaded (before it loads): :label
Format
:label Explanation
Use :label to define a location (label) that a GOSUB, GOTO, or SWITCH command can reference; refer to the descriptions of GOSUB, GOTO and SWITCH in this chapter. Example
The following sequence of statements includes a label (MEMDISK) that is referenced by a GOTO command: BREAK
Format
BREAK = ON|OFF Explanation
The value of BREAK determines whether or not you can stop a program while it is running by pressing <Ctrl><Break> or <Ctrl> C. BUFFERS
Format
BUFFERS = nn Explanation
Use the BUFFERS command to specify the number of buffers you want in memory. Buffers are small areas (blocks) of memory that the operating system uses during disk read and write operations to temporarily store the information being read or written. CHAIN
Format
CHAIN = filespec Explanation
Use the CHAIN command to transfer control (when CONFIG.SYS is executing) to another configuration file. CHAIN automatically verifies that filespec exists. If it does exist, the current configuration file is closed and the operating system begins executing the statements in filespec. If it does not exist, processing returns to the original configuration file. Example
The following sequence of statements includes a CHAIN command that tells the operating system to look for the CONFIG.SYS file on drive D: when it reaches the CHAIN command during execution. If a CONFIG.SYS file exists on drive D:, that file will be executed rather than the rest of the one containing the CHAIN command. If CONFIG.SYS does not exist on drive D:, the original CONFIG.SYS continues to execute. CLS
Format
CLS Explanation
Use the CLS command to clear the screen. COUNTRY
Format
COUNTRY = nnn, cp, [d:]\path\COUNTRY.SYS Explanation
Use the COUNTRY command to load the COUNTRY.SYS file. This file provides the following:
The COUNTRY.SYS file also affects the DATE, TIME, and TOUCH commands; refer to the "Command Reference" chapter of DOSBook for explanations of these commands.
When specifying the COUNTRY command, you must include the following in addition to the complete filespec of COUNTRY.SYS:
COUNTRY = 039, 437, C:\DRDOS\COUNTRY.SYS
Specify the row (the first nn) to set the vertical position of the cursor. The row number can be from 1 to 25.
Specify the column (the second nn) to set the horizontal position of the cursor. The column number can be from 1 to 80.
CPOS 10, 10
You need device drivers to operate devices (such as printers and keyboards) that are not recognized as default parts of your system. Most device drivers are hardware-specific although a few (such as VDISK.SYS, supplied with the system) are designed for software functions. Device drivers usually have the filename extension .SYS.
You configure device drivers by specifying the appropriate options in the DEVICE statement (options) after the name of the driver (filespec).
You can use ? in DEVICE statements to be prompted before drivers are loaded; you therefore have the option of loading or not loading a particular driver every time you start the operating system.
Supplied Drivers
Device drivers for the keyboard, the screen, disk drives, the printer, and auxiliary devices are automatically loaded as part of the system startup procedure. The operating system also provides a number of optional device drivers that you can load with DEVICE commands. ANSI.SYS, DISPLAY.SYS, DRIVER.SYS, PRINTER.SYS, and VDISK.SYS are described in detail in this chapter.
NOTE: EMM386.EXE, HIMEM.SYS, EMMXMA.SYS, and DPMS.EXE are memory managers. They are described in Chapter 10, "Managing Memory."
Device Drivers Supplied with the Operating System
This section describes the drivers that are supplied with the system. See Chapter 10, "Managing Memory," for descriptions of the memory managers (EMM386.EXE, HIMEM.SYS, EMMXMA.SYS, and DPMS.EXE).
The DEVICE statements that load the supplied drivers are automatically added to your CONFIG.SYS file when you load drivers using SETUP or INSTALL.
ANSI.SYS
ANSI.SYS is a device driver for the keyboard and the screen. It provides extra options for programs that need to move the cursor, change the screen display, or assign keyboard use. ANSI.SYS options are in the form of ANSI escape sequences, which all start with the ESC character (1B hex). The ANSI.SYS driver can detect escape sequences sent via the normal DOS function calls but it cannot detect character output from the ROM BIOS directly.
The following information describes different types of ANSI escape sequences: to position the cursor, to erase, and to change the display mode. Note the following about each of these escape sequences:
Cursor position (CUP): ESC [ y;x H
Horizontal and vertical position (HVP): ESC [ y;x f
CUP and HVP position the cursor according to the coordinates specified. The default (and null) value is the top left corner of the screen. CUP and HVP are equivalent.
Cursor up (CUU): ESC [ y A
Moves the cursor up y rows without changing the column position. This sequence is ignored if the cursor is already at the top of the screen.
Cursor down (CUD): ESC [ y B
Moves the cursor down y rows without changing the column position. This sequence is ignored if the cursor is already at the bottom of the screen.
Cursor forward (CUF): ESC [ x C
Moves the cursor to the right without changing the row position. This sequence is ignored if the cursor is already in the far right column.
Cursor backward (CUB): ESC [ x D
Moves the cursor to the left without changing the row position. This sequence is ignored if the cursor is already in the far left column.
Device status report (DSR): ESC [ 6 n
Cursor position report (CPR): ESC [ y;x R
The DSR sequence instructs the console driver to return the CPR sequence. The CPR sequence reports the cursor position in terms of row and column. CPR is returned via the keyboard input.
Save cursor position (SCP): ESC [ s
Restore cursor position (RCP): ESC [ u
SCP stores the current cursor position; RCP restores the cursor to that position. The default for RCP, if no SCP was issued, is 0,0. These escape sequences cannot be nested.
Erasing
Erase display (ED): ESC [ 2 J
Erases the display and moves the cursor to the top left of the screen.
Erase line (EL): ESC [ K
Erases from the cursor position to the end of the row.
Changing the Display Mode
Set graphics rendition (SGR): ESC [ n ; ... ; n m
Sets various screen modes that remain in effect until a different SGR sequence is issued. The screen mode specified by n can be any one of the following:
Set screen mode (SM): ESC [ = n h 1 or ESC [ = h 1 or
ESC [ ? n h
ESC [ ? n 1
Assign a key (KR): ESC [ n ; n ; ... n p
|
Key
|
Code
|
+Shift
|
+Ctrl
|
+Alt
|
|---|---|---|---|---|
|
<F1>
|
59
|
84
|
94
|
104
|
|
<F2>
|
60
|
85
|
95
|
105
|
|
<F3>
|
61
|
86
|
96
|
106
|
|
<F4>
|
62
|
87
|
97
|
107
|
|
<F5>
|
63
|
88
|
98
|
108
|
|
<F6>
|
64
|
89
|
99
|
109
|
|
<F7>
|
65
|
90
|
100
|
110
|
|
<F8>
|
66
|
91
|
101
|
111
|
|
<F9>
|
67
|
92
|
102
|
112
|
|
<F10>
|
68
|
93
|
103
|
113
|
|
<F11>
|
133
|
135
|
137
|
139
|
|
<F12>
|
134
|
136
|
138
|
140
|
Examples
Loading DISPLAY.SYS
DISPLAY.SYS is loaded automatically if you use the SETUP program to install code page switching. You can also install DISPLAY.SYS by editing the CONFIG.SYS file yourself. The format of the statement that loads DISPLAY.SYS is as follows:
DEVICE=C:\DRDOS\DISPLAY.SYS CON=(type,hwcp,n|(n,m))
Refer to Chapter 17, "Setting Up Code Page Switching" for more information about code pages and code page switching.
Examples
DRIVER.SYS
DRIVER.SYS defines the characteristics of a physical disk drive.
[/N] [/S:ss] [/T:tt]
Example
/T:80 PRINTER.SYS
PRINTER.SYS enables code page switching for printers.
Example
VDISK.SYS
The VDISK.SYS driver allows you to set up a memory disk: a portion of memory that acts as a very fast disk.
You must load VDISK.SYS in CONFIG.SYS before any other drivers that use extended memory but after your memory manager, such as EMM386 or HIMEM. If you use SETUP or INSTALL to create a memory disk, however, VDISK.SYS is loaded automatically, in the correct sequence.
Examples
DOS
Format
DOS=HIGH|LOW|UMB|HIGH,UMB|UMB,HIGH Explanation
DOS specifies the location of the system software.
You can also force the operating system software to use the HMA or upper memory exclusively (DOS=HIGH or DOS=UMB).
Example
The following command loads the system software in upper memory, if available: DRIVPARM
Format
DRIVPARM = /D:n [/C] [/F:n] [/H:nn] [/I] [/N]
[/S:nn] [/T:nn] Explanation
The DRIVPARM command defines the physical characteristics of a specified disk drive. Use it to associate a particular type of physical disk drive with a logical drive. To add a 3.5-inch diskette drive to a computer that does not expect to use 3.5-inch diskette drives, for example, the DRIVPARM command is required to redefine the drive parameters for subsequent use by the operating system.
ECHO
Format
ECHO [message] Explanation
Use the ECHO command to display messages on screen when you start the operating system. Example
The following ECHO statement causes the message INSTALL CODE PAGE SWITCHING? to appear on your screen whenever CONFIG.SYS executes: EXIT
Format
EXIT Explanation
EXIT forces the system to terminate CONFIG.SYS execution. FASTOPEN
Format
FASTOPEN = nnnnn Explanation
The FASTOPEN command increases the speed at which the operating system accesses files on a hard disk that are being accessed repeatedly. FASTOPEN records the locations of these files so that the operating system does not have to "navigate" along the path every time a file is accessed. Example
The following command defines a table size of 512 entries: FCBS
Format
FCBS = m,n Explanation
Use the FCBS command to specify the number of files that can be opened by programs at the same time using data structures called File Control Blocks.
Example
The following command sets the maximum number of open files allowed to 8 and the number of protected files to 4: FILES
Format
FILES = nnn Explanation
The FILES command specifies the number of files that can be opened simultaneously by programs. The operating system uses this number to determine how much memory to set aside for controlling open files. Example
The following command sets the maximum number of open files allowed to 20: GOSUB
Format
GOSUB label Explanation
GOSUB forces execution to jump to a group of statements (subroutine) within the same CONFIG.SYS file, execute the subroutine, and then jump back (when a RETURN command is encountered) to the statement immediately after the GOSUB. You must specify a label, and that label must be present in the CONFIG.SYS file to identify the start of the subroutine. A RETURN command must be present to identify and exit from the subroutine. Example
In the following sequence of statements, execution jumps to the statement after the label and through the following statements before jumping back to the statement after GOSUB when it reaches RETURN: GOTO
Format
GOTO label Explanation
Use GOTO to change the order in which commands are executed. Example
In the following sequence of statements, execution jumps to the label (MEMDISK) if the user enters Y (for Yes) when prompted by the ? statement: HIDEVICE/DEVICEHIGH
Format
HIDEVICE|DEVICEHIGH [SIZE=nnnn] filespec Explanation
HIDEVICE or DEVICEHIGH loads an installable device driver into upper memory. Example
The following command loads ANSI.SYS into upper memory: HIINSTALL/INSTALLHIGH
Format
HIINSTALL|INSTALLHIGH=filespec [options] Explanation
HIINSTALL or INSTALLHIGH loads and executes a specified program in upper memory rather than conventional memory. HIINSTALL or INSTALLHIGH performs the same function as HILOAD or LOADHIGH except that it is processed as part of CONFIG.SYS rather than at the system prompt or in a batch file (such as AUTOEXEC.BAT). Example
The following command installs the CURSOR program in upper memory: HISTORY
Format
HISTORY = ON[,nnnn[,ON|OFF][,[ON|OFF][,ON|OFF]]]|OFF Explanation
Use the HISTORY command to turn the extended command line editing features on and off. Extended command line editing stores commands you issue in a memory buffer so that you can recall commands that you recently issued and re-issue or modify and
re-issue them.
Example
The following command switches insert mode on and defines a memory buffer of 512 bytes: INSTALL
Format
INSTALL = filespec [options] Explanation
Use the INSTALL command to load a program automatically from CONFIG.SYS when you start the operating system; this saves you from entering the program name in the command line every time you want to use it.
|
CURSOR.EXE
|
NLSFUNC.EXE
|
|
GRAFTABL.COM
|
PRINT.COM
|
|
GRAPHICS.COM
|
SHARE.EXE
|
|
KEYB.COM
|
|
NOTE: To load installable device drivers during startup, use the DEVICE command; refer to the description of DEVICE in this chapter.
Example
The following statement loads the KEYB program (with the UK keyboard option) whenever CONFIG.SYS is executed: LASTDRIVE
Format
LASTDRIVE = drive_letter Explanation
Use the LASTDRIVE command to set a different "last drive letter" than the one automatically set by the operating system. Example
Assume that your computer has a diskette drive (A:), a hard disk drive (C:), and two virtual disk drives (D: and E:) but you are using a program that requires you to use the SUBST command with drives F: and G:. The following command causes the operating system to recognize drive letters F: and G: as well as A: through E: REM
Format
REM | ; [comment] Explanation
Use REM to add comments to your CONFIG.SYS file. Simply use REM (for "remark") or a semicolon as the first character in a statement to identify it as a comment; the statement will be ignored when the file is executed. Example
The following statements include a DEVICE command that loads the ANSI.SYS driver and a comment preceding it that explains what the DEVICE command does: RETURN
Format
RETURN Explanation
Use RETURN with a GOSUB or SWITCH command to direct execution back to the statement following the GOSUB or SWITCH command after the appropriate subroutine has been executed; refer to the descriptions of GOSUB and SWITCH in this chapter. SET
Format
SET name=parameter Explanation
Use the SET command to add environment variables to the command processor's master environment. Examples
The following statements include a SET command that specifies a value for the VDISK variable: SHELL
>
Format
SHELL = filespec dirpath /P[:filename] [/E:n] [/Mx] Explanation
SHELL defines the name (filespec) and location (dirpath) of the command processor used by the operating system. By default, COMMAND.COM is loaded from the root directory of the C: drive. Change the SHELL statement in CONFIG.SYS if you want the operating system to use a different command processor or a command processor that is located in a directory other than the root directory.
Examples
The following statement loads COMMAND.COM from C:\DRDOS rather than from the root directory:
/E:512 STACKS
Format
STACKS=n,s Explanation
The STACKS command supports the use of data stacks for hardware interrupts. Example
The following command allocates 8 stacks of 512 bytes each for hardware interrupt handling: SWITCH
Format
SWITCH label1, label2[, labeln] Explanation
Use the SWITCH command to switch between different subroutines within the same CONFIG.SYS file. When CONFIG.SYS executes, SWITCH causes the operating system to prompt you to select a configuration subroutine. Execution then jumps to the selected subroutine. Example
The following statements specify switching between three subroutines.
CONFIGURATION 2 selected
TIMEOUT
Format
TIMEOUT [=] n Explanation
Use TIMEOUT to set a time limit for the amount of time allowed to respond to a ? or SWITCH prompt (see ? and SWITCH); the command is then ignored (for ?) or the first option is assumed (for SWITCH) if you do not enter a response within the TIMEOUT limit. Example
The following statement sets a time limit of 10 seconds for ? and SWITCH prompts:
Explanation
The DR-DOS kernel corrects any Year 2000 problems, even if your BIOS does not support the Year 2000 system date. See "Year 2000 Support" in Chapter 1 for more information.
Year 2000 rollover support (that is, correct date and time as the century changes at midnight December 31st) can be turned off because not all software will run with this support enabled. For example, to avoid problems with the Stealth features of Quarterdeck's memory manager QUEMM, turn off Year 2000 rollover support by entering the following command in CONFIG.SYS.
YEAR2000 = OFF
Note: Although DR-DOS corrects the system date, this does not prevent problems with all software applications. You must check all the software used on your PC for Year 2000 compliance and load any required updates to ensure that no problems occur.