Friday, 4 January 2013

Input/Output System


This most primitive of the DOS systems has two parts:

•  BIOS (Basic Input/Output System).These are the fundamental routines that control the
keyboard, video display and other peripherals. The BIOS is comprised of a ROM on the
computer's main circuit board and the file IBMBIO.COM (or IO.SYS), one of the two
hidden files on your disk.
•  Operating System.This is the main file-handling system for the computer. Actually, two
systems exist: one for disk-based files and one for non-disk peripheral devices. They are in
hidden file IBMDOS.COM (or MSDOS.SYS). (IBMBIO and IBMDOS areIBM names;
MS-DOS uses IO.SYS and MSDOS.SYS.)
The two systems are necessary because non-disk peripherals demand their data as strings of
characters, while disks move information in large groups, known as blocks.

Command Processor

The command processor (COMMAND.COM on your disk) performs three tasks:

•  It handles critical interrupts...that is, COMMAND.COM takes care of all demands for
attention by parts of the computer. The user typing the Control-Break program break
command is an example of an interrupt.
•  It handles critical errors...that is, COMMAND.COM takes care of problems. For example,
if you leave the disk drive door open during a disk operation COMMAND.COM is
responsible for the error message you will see.
•  It performs end-of-program housekeeping...that is, COMMAND.COM takes care of
making the computer's memory available for other programs and reloading parts of itself if
the program wrote over them.
COMMAND.COM also places the C> prompt on the screen and interprets any command(s) you
might type. In short, the command processor tells the rest of DOS what to do.
Everything that DOS interacts with has a name and the names have  certain rules that have to be
followed. Let's look at some of them.

Default Drive

The default drive is the first disk drive on which DOS will look fora program if no drive
specification is given with the file name.
How do you know what it is? Look at the prompt. The default drive letter is part of the
prompt (unless someone has changed the prompt to eliminate it).
A:\> indicates that drive A (the left or top drive in a two-drive system) is the default drive. The right
(or second) drive in such a system is called drive B and the first hard disk in any system is given the
letter C as its drive designation.
DOS supports many more than drives A through C. In fact, if your computer has them you
can specify up to 63 drive names. (This is a "Catch 22" situation. DOS can respond to 63
drive names but converts all lower case to upper case automatically so you really can't
access 63 devices.) You change drives by typing the desired default  drive followed by a
colon at the prompt. To change to drive C type C: as shown here:


Device Names

Character oriented devices can be addressed by DOS through their names:
•  CON:The name for the video display and keyboard.
•  AUX: or COM1:This is the first asynchronous communications port which usually has a
modem or other serial device connected to it. The second communications port is COM2:
•  PRN or LPT1:The first parallel printer port. PRN comes from printer  and LPT is an old
designator derived from line printer. A colon on PRN and all device names is optional in
later DOS versions. The second parallel port is LPT2:
•  CAS1:A holdover; this is the cassette recorder port.
•  NUL:This is a test device. Anything sent to device NUL: goes into the bit bucket (i.e., gets
thrown away).
Rules for File names
Like devices, disk files have to be identified so DOS can address them. These file names
have specific rules.
The basic form of a file name is:
File name.ext
The first part of the name to the left of the period is called the root name. The root name can
be from one to eight characters long and cannot be the same as a device name. The second part to
the right of the period is the extension. It is optional and, if used, can be one to three characters
long.
The period is used between the root name and extension and must be present if there is an
extension.
The following are legal and illegal characters in a file name:
•  Legal:A-Z 0-9 $#&@!()-{}'`_~
•  Illegal:|<>\^+=?/[]";,* plus control characters and the space
Some other operating systems allow longer file names and there are commercial utilities which
link a database of long names to your short names so you can find files by using more fully
descriptive names.
[Note: Windows allows longer file names with the space but underneath the facade the 8.3 format is
maintained.]
DOS commands are issued at the prompt C:\>. Whatever you type after that prompt that is
not in the COMMAND.COM standard library is assumed to be the name of a file on the default
disk and DOS will search for it under one of three names (in the order listed).
If you type C\:> FILE NAME
DOS will look for: FILE NAME.COM or FILE NAME.EXE or FILE NAME.BAT
The first is a command file (note the COM extension). The second is an execution file (EXE
extension). And, the third is a batch file (a series of DOS commands in a text file which you'll learn
about later in this tutorial). The first file found will be read into memory and the command
processor will start the program running.
Both .COM and .EXE files execute as programs. The difference between the two relates to
how memory is allocated and certain parameters in the computer are set.

No comments:

Post a Comment