Hardware Reference
In-Depth Information
DOS provides you with various methods for configuring a system: individual
DOS commands entered from the CLI, batch files, hardware device drivers, and
two important configuration files, CONFIG.SYS and AUTOEXEC.BAT. All of
these can be instrumental in helping you to get the best out of a system.
DOS basics
Booting the system
The system (DOS or Windows) is automatically loaded from the hard disk (drive
C:) or the floppy disk placed in drive A: whenever the system is booted (i.e.
whenever the power is applied and the processor executes the BIOS code stored
in the ROM). After successful loading, the title and version of the operating
system is displayed on the screen. The message is then followed by a prompt that
gives the currently selected drive (usually C: \ > in a system fitted with a hard
disk drive). This prompt shows that the system is ready to receive a command
from the user.
If an AUTOEXEC batch file is present, the commands that it contains are
executed before control is passed to the user. Furthermore, if such a file contains
the name of an executable program (i.e. a file with a COM or EXE extension),
then this program will be loaded from disk and executed. The program may take
one of several forms including a program that simply performs its function and
is then cleared from memory, a terminate and stay-resident (TSR) program, or
a fully-blown control or data acquisition application.
It is important to remember that the currently selected drive remains the
default drive unless explicitly changed by the user. As an example, consider
a system that is booted with a system disk (floppy) placed in drive A:. The
default drive will then be A: (unless an AUTOEXEC file is present that contains
commands to change the current drive). The system prompt will indicate that
A is the current drive. Thereafter, it is implicit that all commands which do
not specify a drive refer, by default, to that drive. The SET PATH command
(see page 118) can, however, be used to specify a directory path which will be
searched if a command or filename does not appear in the current directory.
To return to the root directory from within any level of sub-directory you
need only type CD \ (followed, of course, by the <ENTER> key). To return to just
one level of sub-directory towards the root you can simply type CD ... To help
you navigate the system use the PROMPT $p$g command (see page 118).
I/O channels
In order to simplify the way in which DOS handles input and output, the system
recognizes the names of its various I/O devices (see Table 3.1). This may, at first,
appear to be unnecessarily cumbersome but it is instrumental in allowing DOS
to redirect data. This feature can be extremely useful when, for example, output
normally destined for the printer is to be redirected to an auxiliary serial port.
The COPY command (see page 115) can be used to transfer data from one
device to another. As an example, the command COPY CON: PRN: copies data
from the keyboard (console input device) to the printer, COPY CON: COM1
copies data from the keyboard to the serial port. In either case, the end-of-file
character, <CTRL-Z> or <F6> , must be entered to terminate input.
Search WWH ::




Custom Search