This is only a preview of the March 1991 issue of Silicon Chip. You can view 43 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
I
COMPUTER BITS
BY JENNIFER BONNITCHA
Configuring your computer
Over the next few months, we will take a close look at the
CONFIG.SYS file and the various installable device drivers,
describe what they are, and show you how to use them.
We'll also discuss some DOS environment settings that you
can try on your computer.
Before starting, a point on the hidden files in last
month's article. Two system files in MS-DOS and PCDOS have different file types viz:
MS-DOS
IQ.SYS
MSDOS.SYS
COMMAND.COM
PC-DOS
IBMIO.COM
IBMDOS.COM
COMMAND.COM
IQ.SYS contains the operating system's default device
drivers and since it interacts directly with the hardware,
it is highly system-specific and is generally implemented
by the computer's manufacturer.
MSDOS.SYS receives all requests for service functions
(such as opening and reading files) and channels the
requests to IQ .SYS. The command interpreter,
COMMAND.COM, serves as the interface between the
operating system and the user by displaying the system
prompt, accepting commands from the keyboard and
processing the commands so they can be executed.
DOS version 2.0 and higher has the ability to use
"device drivers" - programs whi'ch affect the input and/or
output to a non-standard device. These drivers are read
into memory (RAM) from the root directory of the boot
disc and remain active as long as the computer is turned
on. Since the drivers are RAM-resident, a certain amount
of memory will not be available to your programs.
The device drivers must be loaded through a file called
CONFIG.SYS in the root directory of the boot disc . In this
file are statements telling DOS what devices are going to
be used. CONFIG.SYS is a text file so you can .create the
file directly from DOS, or through your regular word
processing program provided you can save the file as an
ASCII text file. Each time the computer is booted, the
statements in CONFIG.SYS are read by MS-DOS.
You can easily create the CONFIG.SYS file using the
COPY command's ability to copy between devices. COPY
can be used to send data from one peripheral device to
another. The command is used in the same way as usual,
except that one device name is included as the source of
the data while another device or file is specified as the
recipient of the data. You can copy from the keyboard
(CON) to a file or perhaps the printer (PRN). For example,
the command:
copy fred .txt prn
copies the file FRED.TXT to the printer, while the following creates a new file on the current disc:
copy con: config.sys <Enter>
Type each line required, pressing <Enter> at line end.
Press <Ctrl Z> then <Enter> to end the copy.
CONFIG.SYS files may contain some of the following:
copy con: config.sys
device=c: \dos \ansi.sys
device=c: \himem.sys
files=32
buffers=24
"Z (you hold down Ctrl and press Z) then <Enter>
1 File(s) copied
You can also use function key F6
rather than <Ctrl Z> since when using DOS, it does the same thing (ie, it
produces "Z). Ctrl Z is the (lAH) endof-file character. Note that while you
use the COPY CON: command, you
can make corrections on the current
line only. Should you need to make
corrections or additions to the file,
DOS version 2.0 and higher has the
ability to use device drivers: programs
which affect the input and/or output to
a non-standard device.
62
SILICON CHIP
once again use your word processor or EDLIN.
The internal DEVICE command is used to give MS DOS the filename(s) of any device drivers you want to
install. This command can only be used as a statement
within the CONFIG.SYS file. At boot time, if any of the
statements in CONFIG.SYS are DEVICE commands, MSDOS stores them in computer memory. The general syntax of the DEVICE command is:
device = [drive:] [path]driver[.ext] [argument]
.The standard installable device drivers provided with
MS-DOS are ANSI.SYS, DISPLAY.SYS, DRIVER.SYS,
PRINTER.SYS and VDISK.SYS (maybe RAMDRIVE.SYS
depending on your version of DOS and computer manufacturer), together with XMA2EMS.SYS and XMAEM.SYS
(if you are using PS-DOS 4.0).
If you purchase a new device such as a mouse or
scanner, you generally receive device driver software
with the device. These installable
device drivers are installed using
the DEVICE command. Once you
have installed a device driver, make
sure the device driver is in the directory you specify, in any DEVICE
command. Since the DEVICE command will accept drive and directory entries before the driver name,
you may consider grouping all your installable drivers in
a single directory other than the root directory.
This month we will look at the installable device drivers in some detail, reserving the best till last, ANSI.SYS.
elude MONO, CGA (Colour Graphic Adapter), EGA (Enhanced Graphic Adapter) and LCD (Liquid Crystal Display).
HWCP is the code page supported by the hardware.
Hardware code pages are ready-to-use code pages that are
stored in the display deYice 's read-only memory (ROM):
437
850
860
863
865
United States (default)
Multilingual
Portugal
French-Canadian
Norway
N is the number of additional code pages (1 -12) that
can be supported. This number is dependent on the
hardware. Code pages may also be generated using the
MODE command and these are called prepared code
pages. MONO and CGA do not support other fonts, so N
must be O; EGA can be 2; LCD can be 1.
If you purchase a new device such as a
mouse or scanner, you generally receive
device driver software with the device.
DISPLAY.SYS
This device is a code-page-switching device driver
supplied with MS-DOS 3.3 and 4.x. It's job is to implement code page switching on a display adapter. A code
page is a table that defines the character set you are using.
A character set is a country-specific or language-specific
group of characters that are translated from the code page
table and displayed by your screen or printer; ie, converting stored nu·m erical data into displayable characters.
MS-DOS 3.3 has five different code pages, including a
multilingual code page (850) which is designed to transfer data written in 19 languages such as Norwegian,
Spanish, Swiss, German, French, Flemish and UK English. The other four tables are for the US , Portugese,
French-Canadian and Nordic languages.
Prior to version 3.3, each copy of MS-DOS had a single
fixed code page, so copies of DOS sold in the US came
with the appropriate code page, copies sold in Canada
came with the French-Canadian code page, and so on.
Problems arose when software written to run with one
code page was used with a copy of MS-DOS that had
another code page. Thus the introduction of the multilingual code page.
Each code page character set contains 256 characters
and a typical example is the set of letters , numbers and
symbols (such as accent marks) found in French.
To use the DISPLAY.SYS command:
device=[drive:][path]DISPLAY.SYS CON[:] =(type[,[hwcp]
[,(n,m)]])
TYPE is the display adapter in use. Valid values in-
M specifies the number of sub-fonts that are supported
for each code page.
Thus the command:
device=c: \dos \display.sys con:(egl ,437,2)
instructs MS-DOS to load the DISPLAY.SYS driver for
use with the Enhanced Graphics Adapter, together with
hardware code page 437 , and support two prepared code
pages.
DRIVER.SYS
This device driver supports external floppy disc drives,
is supplied with MS-DOS 3.2, 3.3 and 4.x, and is valuable
because it can be used to drive all MS-DOS supported
drives, including logical drives.
Physical drives are real whereas logical drives are the
product of logic stored inside a computer. At boot time,
MS -DOS determines the peripheral devices attached to
your computer and then checks CONFIG.SYS for any installable device drivers. During the process, DOS assigns
a unique letter to each disc drive. Systems with only one
internal disc drive have the letters A and B assigned to
the single drive (hence the ability to DISKCOPY A: B: on
single-drive computers). The first fixed disc is assigned
drive letter C.
The syntax of the DRIVER.SYS command is as follows:
device=[drive:][path]driver.sys /D:number [/C] [/F:factor]
[/H:heads] [/N] [/S:sectors] [/T:tracks]
where /D:number is the physical drive number ranging
from O to 255 . The first physical flopp y disc "drive is
number O and referenced as drive A by MS-DOS. Drive
number 1 is the second physical flopp y disc drive, while
Drive number 2 (which must b e external) is the third, up
to 127. The first fixed disc (CJ is assigned number 128,
the second 129 and so on to 255.
MARCH 1991
63
COMPUTER BITS • • • • •
IC specifies that the drive detect when the drive door
has been opened and closed. If the door is open, the
device driver will assume that the drive does not have a
disc in it yet.
IF:factor specifies the device type, where the default
value is 2:
lf:0
lf:1
/f:2
lf:3
lf:4
lf:5
lf:6
lf:7
160K bytesl180K bytes or 320K bytesl360K bytes
1.2 Megabytes
720K bytes (3.5-inch disc)
8-inch single density
8-inch double density
hard disc
tape drive
1.44 Megabytes
IH:heads is the maximum head number, ranging from 1
to 99 with a default of 2, while IN specifies a nonremovable block device (such as a fixed disc). IS:sectors
is the number of sectors per track ranging from 1 to 99
with a default of 9. Finally IT:tracks is the number of
tracks per side on the block device ranging from 1 to 99
with a default value of 80.
Thus the following command:
device=c:\driver.sys ld :2 lf:7
specifies physical driver number 2 as a 1.44Mbyte disc.
Since the DEVICE command is read after drive letters A,
B and C have already been assigned, the disc is assigned
drive letter D. This command:
device=c:\dos\driver.sys ld:0 lt:80 ls:15 lh:2 le lf:1
tells MS-DOS to create a new logical drive on the first
physical drive (/d:0) with 80 tracks per side (/t:80), 15
sectors per track (/s:15), two heads (/h:2), detecting the
door open status (le) for a 1.2 Mbyte drive (/f:1).
PRINTER.SYS
This driver is another code-page-switching device
driver supplied with MS-DOS 3.3 and 4.x and its job is to
support the switching on several IBM printers (such as
the Pro printer 4201, 4202, 4207, ·etc). Since it is designed
for a tight segment of the market, the syntax of the command is:
device=[ drive:J [pathJprinter.sys LPTx=(type[ ,hwcp[, ... ]]
[ ,n])
Included with MS-DOS 2.x, 3.x and 4.x is a virtual
(RAM) disc program called VDISK.SYS. A vitrual disc
has the ability to use an area of RAM or main memory as
a simulated disc drive. Programs may be copied to a
virtual disc as if they were a conventional disc. While
virtual discs provide greater speed than conventional
discs, they should not be used to store data. This will
prevent the accidental loss of information in case of a
power failure.
VDISK.SYS performs three functions: it installs the
RAM disc in memory and assigns a drive letter; it formats
the RAM disc so you can store files there (FORMAT does
not work with a RAM disc); and it acts as an interface
between MS-DOS and the RAM disc. The general syntax
of the command is:
device=[ drive:] [path]vdisk.sys[bbb] [sss] [ddd] [IE[:t]]IX[t:]]
BBB is the number of Kbytes put aside for the virtual
disc, from 1K up to the size of your system's memory; the
default disc size is 64K bytes. SSS sets the number of
sectors p·e r byte, where 128 is the default value and further acceptable sizes are 256 and 512. DDD sets the
number of entries allowed in the root directory where the
default·is 64 and the allowable range 2-512. Each directory entry requires 32 bytes and , if necessary, VDISK ~ill
adjust your request size upward to fill out a complete
sector.
IE directs MS-DOS to place the RAM disc in extended
memory while the driver itself is placed in low memory.
This switch is only applicable to the PC-AT and above.
Thus, you will receive an insufficient memory message
from MS-DOS is you use the switch on a machine that
does not have extended memory.
IX is implemented in DOS 4.x and directs the operating system to place the RAM disc in expanded memory.
Note that expanded memory requires the expanded
memory board and an expanded memory device driver.
The optional :t parameter tells MS-DOS the maximum
number of sectors to transfer to extended or expanded
memory at one time. The range is 1-8 with the latter as
the default.
The following command creates a one megabyte virtual disc one letter above the last drive in the system. It
has a sector size of 512 bytes and a directory which may
contain up to 64 entries, and is in extended memory with
a maximum four sectors transferred tci extended memory
at one time:
device=c:\dos\vdisk.sys 1000 512 64 le:4
. LPTx designates parallel ports LPTl, LPT2 and LPT3 ,
however you can substitute port name PRN for LPTl, the
first parallel port. TYPE is the printer in use (eg, 4201),
while HWCP once again is ·the hardware code page. You
can specify two or more code pages, provided they are
enclosed in parentheses. N is the number of additional
code pages that can be supported by the printer, thus the
number is dependent on the hardware.
The following command instructs MS-DOS to load
PRINTER.SYS for the Proprinter 4201, together with code
page 850 (multilingual) and support three prepared code
pages:
device=c: \dos\ printer.sys prn:=( 4201,850,3)
64
VIDSK.SYS
SILICON CHIP
ANSI.SYS
The last installable device driver, ANSI.SYS, processes
all character sequences sent from the keyboard and recognises certain character sequences as being command
sequences. These command sequences direct ANSIS.SYS
to modify keyboard input or to modify screen output. All
ANSI.SYS command sequences begin with an escape
character whose ASCII value is 27.
Since this is a topic well worth spending some time on;
it will be dealt with in more detail next month, together
with more on the CONFIG.SYS file and a look at some
DOS environment commands.
SC
|