Manual Ms-Dos 3.3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 558

MS-DOS.

33
Reference
Manual
I
6
o
C Z)
©

m
EPSON AMERICA, INC.
2780 Lomita Boulevard
Torrance, California 90505

Printed in Korea
EPSON®
MS-DOS. 3.3
Reference Manual

Y16299100502
IMPORTANT NOTICE
DISCLAIMER OF WARRANTY
Microsoft Corporation and Seiko Epson Corporation make no warranties or
representations, either express or implied, by or with respect to anything in
this manual, and shall not be liable for any implied warranties of
merchantability or fitness for a particular purpose or for any indirect, snecial
or consequential damages. Some states do not allow the exclusion of
incidental or consequential damages, so this exclusion may not apply to you.

COPYRIGHT NOTICE
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by any means, mechanical,
photocopying, recording or otherwise, without the prior written permission of
Microsoft Corporation and Seiko Epson Corporation. No patent liability is
assumed with respect to the use of the information contained herein. While
every precaution has been taken in the preparation of this book, Microsoft
Corporation and Seiko Epson Corporation assume no responsibility for errors
or omissions. Further, this publication and features described herein are
subject to change without notice.

TRADEMARKS
Epson is a registered trademark of Seiko Epson Corporation.
FX'286 is a trademark of Epson America, Inc.

Hercules is a registered trademark of Hercules Computer Technology


Corporation.
IBM is a registered trademark of International Business Machines
Corporation.
Intel is a registered trademark of Intel Corporation.

Lotus is a registered trademark of Lotus Development Corporation.


Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
XTREE is a registered trademark of Executive Systems, Inc.

Copyright © 1981, 1986, 1987, and 1988 by Microsoft Corporation and Seiko
Epson Corporation.
Seiko Epson Corporation Microsoft
Nagano, Japan Bellevue, WA 98009
Table of Contents

Introduction 1

Version 3.3 Enhancements 1

Epson Menu Utilities 2


How to Use This Manual 3
Conventions Used in This Manual 4
Where to Get Help 5

1 MS-DOS and Your Computer 1-1

Loading MS-DOS 1-2

Backing Up Your System Diskettes 1-3

Changing the Default Drive 1-6

Resetting the Computer 1-7

Using Diskette Drives 1-8


Formatting Diskettes 1-11
Using the Keyboard With MS-DOS 1-13

2 Managing Files and Directories 2-1

Managing Files 2-2


Creating and Using Directories 2-6

3 UsingMS-DOS Commands 3-1

MS-DOS Command Overview 3-2


Entering Commands 3-10

4 Alphabetical List of MS-DOS Commands 4-1


Introduction 4-3
APPEND 4-5
ASSIGN 4-9
ATTRIB 4-11
BACKUP 4-14
BREAK 4-19"

CHCP 4-20
CHDIR 4-22
CHKDSK 4-24
CLS 4-27
COMMAND 4-28

Table of Contents
COMP 4-31
COPY 4-33
CTTY 4'37
DATE 4-39
DEL 4-41
DIR 4-43
DISKCOMP 4-45
DISKCOPY 4-49
ERASE 4-52
EXIT 4-54
FASTOPEN 4-55
FC 4-57
FDISK 4-65
FIND 4-80
FORMAT 4-82
GRAFTABL 4-88
GRAPH24 4-90
GRAPHICS 4-91
HDCACHE 4-94
HELP 4-97
JOIN 4-98
KEYB 4-100
LABEL 4-104
MKDIR 4-106
MODE 4-108
MORE 4-120
NLSFUNC 4-121
PATH 4-122
PRINT 4-124
PROMPT 4-127
RECOVER 4-130
RENAME 4-132
REPLACE 4-133
RESTORE 4-136
RMDIR 4-139
SELECT 4-140
SET 4-147
SHARE 4-149

iv Table of Contents
SORT 4450
SUBST 4452
SYS 4454
TIME 4455
TREE 4457
TYPE 4459
VER 4460
VERIFY 4461
VOL 4462
XCOPY 4463

5 Epson Menu Utilities 54


Introduction 5-3

MENU 5-3

SETPRINT 5-41

XTREE 5-45
XTREEINS 5-73

6 Configuring Your System 6-1

Defining the CONFIG.SYS File 6-2

Allocating Memory 6-3

Opening Files 6-4


Identifying Block Devices 6-5

Configuration Constraints 6-5

BREAK 6-6

BUFFERS 6-7

COUNTRY 6-8
DEVICE 6-11
FCBS 6-13
FILES 6-15
LASTDRIVE 6-16
SHELL 6-17
STACKS 6-19
Device Drivers 6-21

7 Batch Processing Commands 7-1

Creating Batch Files 7-2


Using an AUTOEXEC.BAT File 7-4

Using Replaceable Parameters 7-5

Table of Contents v
Using Environment Variables 7-7

Using the Batch Processing Commands 7-8


CALL 7-9
ECHO 7-10
FOR 7-12
GOTO 7-14
IF 7-15
PAUSE 7-17
REM 7-19
SHIFT 7-20

8 Programming Tools 8-1

Introduction 8-2
DEBUG 8-3
EDLIN 8-23
EXE2BIN 8-43
LINK 8-45

9 Code Page Switching 9-1

Introduction 9-2
Using Code Page Switching 9-4
Setting Up Your System for Code Page Switching 9-6
Switching Between Code Pages 9-8

Appendixes
A Command Quick Reference A-l
List of Commands A-2
Configuration Commands A- 16

B Error Messages B-l


Introduction B-2
Error Message Listing B-3

C International Keyboard Layouts C-l


Introduction C-2
Belgium C-3
Canada C-3
Denmark C-4
France C-4

Table of Contents
Germany C-5
Italy C-5
Latin America C-6
Netherlands C-6
Norway C-7
Portugal C-7
Spain C-8
Sweden/Finland C-8
Switzerland C-9
United Kingdom C-9
United States C-10
Generating Special Characters C-l 1
Entering Characters Using Alt Gr C-ll

D Code Page Tables D-l


Introduction D-2
Code Page 437 (United States-English) D-3
Code Page 850 (Multilingual) D-4
Code Page 860 (Portuguese) D-5
Code Page 863 (Canada-French) D-6
Code Page 865 (Nordic) D-7

E ANSI Escape Sequences E-l


Introduction E-2
Cursor Functions E-2
Modes of Operation E-4
Keyboard Reassignment E-6

Index 1-1

Table of Contents Vll


Introduction

Your Epson® computer comes with MS-DOS®, the disk operating


system by Microsoft®. A disk operating system controls the computer’s
hardware and the software you are using, enabling you to create, store,

and retrieve data on a diskette or hard disk.

Using MS-DOS, you can run the most powerful, sophisticated software
on the market While running your application program, you’re
today.
not even aware that MS-DOS is in the background, but it is handling
all the communication between the different components of your

system.

This version of MS-DOS, version 3.3, consists of the standard


commands plus special menu utilities created by Epson.

Version 3.3 Enhancements


If you are familiar with version 3.2 of MS-DOS, you’ll notice the

following new features provided by version 3.3:

• Primary and extended MS-DOS partitions, which provide support


for hard disk drives than 32MB (an extended DOS partition
larger

can contain multiple logical drives of up to 32MB each)

• 1.44 megabyte diskette drive support

• Expanded national language support

• New and enhanced commands.

The extended MS-DOS you use more of your hard disk’s


partition lets
capacity. Now you can access more than the 32MB (megabyte)
maximum for a partition. For example, you could access a 128MB hard
disk as four 32MB disks.

With the 1.44MB drive support you can use 3 '/2 -inch, 1.44MB diskette

drives with your computer.

Introduction 1
Version 3.3 comes with five international language code pages. This
means you can produce characters from a wide variety of languages,
provided you have a compatible printer or monitor device.

You’ll find these new commands in this version of MS-DOS:

APPEND lets you create a search path for data files (and optionally, for
program files).

CALL is a batch file subcommand that calls another batch file.

CHCP and NLSFUNC are two new commands that enable code page
switching.

COMP lets you compare two files or groups of files to see if they are
different.

FASTOPEN speeds up access time for files on a hard disk.

GRAPH24 lets you print graphic characters on a 24-pin printer or a


laser printer that supports 24-pin printing.

HDCACHE improves the efficiency of your hard disk by creating a


buffer in which it stores information about the files you access.

new commands, many of the other MS-DOS


In addition to these
commands have been enhanced to make them more powerful and more
flexible.

Epson Menu Utilities


The MENU and XTREE® utilities make it easier for you to run
MS-DOS commands. Rather than typing long, complex command lines
with multiple variables, you can just select the appropriate options from
simple screen menus. Be sure to read Chapter 5 for information about
these utilities.

2 Introduction
How to Use This Manual
The first manual provide some basic information
three chapters in this
about using MS-DOS.you have never used an operating system,
If

these chapters will help you get started. The rest of this manual gives
more detailed information about MS-DOS and its commands.

For more information, you might want to buy a book about MS-DOS,
such as Van Wolverton’s Running MS-DOS, (Bellevue, Washington:
Microsoft Press, 1985).

The contents of this manual are as follows:

Chapter 1 provides some general information on using MS-DOS with


your computer.

Chapter 2 describes how to manage your files and organize them in

directories.

Chapter 3 provides an overview of the MS-DOS commands and the


procedure for entering commands on your keyboard.

Chapter 4 is an alphabetical listing of most of the MS-DOS commands.


These are the commands you use most often.

Chapter 5 describes the menu utilities: MENU, SETPRINT, and


XTREE.

Chapter 6 is an alphabetical listing of the commands you can use to


configure your system if you want to change the default settings.

Chapter an alphabetical listing of the MS-DOS batch processing


7 is

commands you can use to create batch files. Batch files let you group
commands in a single file to automate frequently used procedures.

Chapter 8 is an alphabetical listing of commands used as programming


tools.

Chapter 9 describes code page switching.

Appendix A is a brief summary of all the commands described in this


manual.

Introduction 3
Appendix B lists and describes all the error messages you could possibly
encounter when using MS-DOS.
Appendix C illustrates the international keyboard layouts supported by
MS-DOS.

Appendix D illustrates the five code pages.


Appendix E is a list of the ANSI Escape sequences that MS-DOS uses
for screen control.

Conventions Used in This Manual


This manual uses certain symbols and typographical conventions:

• All keys and function keys appear in boldface type, such as A, ESC,
and Enter.

• When you press two keys in combination, the names appear in bold
separated by a space, as in Ctrl Z. This means hold down the Ctrl
key and press Z.

• Special symbols indicate different types of command parameters.


You do not type these symbols when you enter the command; they
simply describe the valid command format.

[ ] Square brackets indicate an optional entry.

• • • Ellipses indicate that you may repeat a parameter as


many times as needed or desired.

• Lowercase italic letters indicate a command parameter that varies:

TYPE d: filename
In the above command format, d and filename are parameters that
vary.You can use any disk drive descriptor and any filename when
entering this command. An example of this command is the
following:

TYPE A: AUTOEXEC. BAT

4 Introduction
• When command, the command
instructions are given to type a
appears in uppercase DISKCOPY, CHDIR, or
letters like this:

MENU. However, it is not necessary to type the command in


uppercase letters. You can type the command in uppercase or
lowercase letters.

Where to Get Help


Customer support and service for Epson products is provided by a
network of authorized Epson dealers and service centers throughout the
United States. Epson America, Inc. provides product information and
toll-free support to our dealers and service centers.

Therefore, we ask that you contact the business where you purchased
your Epson product to request assistance. If they do not have the
answer to your question, they can obtain it through our toll-free dealer

support program.

We are confident that this policy will provide you with the assistance

you need. If you need to find an Epson dealer or service center in


your area, please call our toll-free number: 1-800-922-8911.

Introduction 5
6 Introduction
Chapter 1

MS-DOS and Your Computer


Loading MS-DOS 1-2

BackingUp Your System Diskettes 1-3

Copying with two diskette drives 1-3

Copying with one diskette drive 1-4

Changing the Default Drive 1-6

Resetting the Computer 1-7

Using Diskette Drives 1-8

Drive and diskette incompatibilities 1-8


Using two diskette drives 1-9

Using a single diskette drive 1-10

Formatting Diskettes 1-11


Formatting with two drives 1-11
Formatting with one drive 1-12

Using the Keyboard With MS-DOS 1-13


Control key functions 1-13
Function keys 1-14
Generating special characters 1-15
Selecting international keyboards 1-16

MS-DOS and Your Computer 1-1


Loading MS-DOS
To use your computer, you must load MS-DOS and have it running in
the computer’s memory. Loading MS-DOS, also known as booting the
system, lets you give instructions to the operating system in the form of
MS-DOS commands.
Follow these steps to load MS-DOS:

1. Turn on your computer and monitor.

2. Place the MS-DOS startup diskette into drive A and secure the
drive. (See your User’s Guide for a complete description of turning
on your system and inserting diskettes.)

Your computer begins loading MS-DOS into memory. After some


preliminary copyright information appears on the screen, the date
prompt appears, as in this example:

Current date is Wed 3-15-1988


Enter new date (mm-dd-yy)
You can either accept the date shown or enter a new date.

3. Press Enter to accept the current date. The time prompt appears:

Current time is 08:15:10.0


Enter new time:_
You can either accept the time shown or enter a new time.

4. Press Enter to accept the time shown.

Note
Ifyour computer does not have a real-time clock, you need to enter the
date and time each time you load MS-DOS. For a complete description
of how to enter the date and time, see the DATE and TIME commands
in Chapter 4.

Now you see the MS-DOS command prompt, A>. This is your starting
point.

1-2 MS-DOS and Your Computer


Safeguard your original MS-DOS diskettes by making backup copies.
Store the originals in a safe place and keep the second set as your
working copies for daily use. Follow the instructions below.

Backing Up Your System Diskettes


This section describes how to use the MS-DOS command DISKCOPY
to copy (back up) your MS-DOS diskettes. If you have not done this
yet, follow the instructions below.

Note
You can copy diskettes using the simplified Epson menu utility, MENU.
See the description of MENU in Chapter 5 for instructions.

The procedure for copying a diskette depends on whether your


computer has two diskette drives or only one diskette drive. Follow the
procedure for your model, described below. You need blank diskettes
same type as your MS-DOS system diskettes. (See your
that are the
User’sGuide if you are not sure of the diskette type.) The DISKCOPY
program automatically formats a diskette if it is not already formatted.

When you finish making the copies, be sure to put the originals in a safe
place.

Copying with two diskette drives


1. First make sure your original diskette is write-protected. A 514-inch
diskette is write-protected if there is an adhesive tab over the write-
protect notch. A3 ’/2 -inch diskette is write-protected when the
switch is set to the write-protect position. See your User’s Guide for
more information.

2. Insert your MS-DOS operating diskette (the one that contains


DISKCOPY) in drive A. The A) prompt should be on the screen.

3. Insert a blank diskette in drive B.

MS-DOS and Your Computer 1-3


4. Type:

DISKCOPY A: B:

and press Enter. The screen displays these prompts:

Insert SOURCE diskette in drive A:


Insert TARGET diskette in drive B:
Press any key when ready . . .

5. Drive A already contains the diskette you want to copy (the source)
and drive B contains the blank diskette (the target), so just press
any key. If the diskette in drive B is not formatted, the DISKCOPY
program formats it and then begins copying the data from drive A
to the formatted diskette in drive B.

6. When the copy is complete, the screen displays this prompt:

Copy another diskette (Y/N)?


Press Y you can make a copy of the next diskette. Remove the
so
diskettes from drives A and B. Then insert the next system diskette
in drive A and another blank diskette in drive B. Follow the
prompts on the screen to copy this diskette and any other system
diskettes.

7. When you finish and the Copy another diskette (Y/N) ?

prompt appears, press N to return to the MS-DOS A) prompt.

Copying with one diskette drive


1. First make sure your original diskette is write-protected. A 514-inch
diskette is write-protected if there is an adhesive tab over the write-
protect notch. A3 ’/2 -inch diskette is write-protected when the
switch is set to the write-protect position. See your User’s Guide for
more information.

2. your MS-DOS operating diskette (the one that contains the


Insert
DISKCOPY program) in drive A. The A) prompt should be on the
screen.

1-4 MS-DOS and Your Computer


3. Type:

DISKCOPY
and press Enter. The screen displays the following prompts:

Insert SOURCE diskette in drive A:


Press any key when ready . . .

4. Drive A already contains the diskette you want to copy (the


source), so just press any key. The DISKCOPY program copies the
contents of the diskette to the computer’s memory. Then the screen
displays these prompts:

Insert TARGET diskette in drive A:


Press any key when ready . . .

5. Remove the MS-DOS startup diskette from drive A and insert the
blank diskette (the target) in the drive. Then press any key.

If the diskette in drive A is not formatted, the DISKCOPY program


6. formats it and then begins copying the data from the computer’s
memory to the formatted diskette.

Note
If the MS-DOS diskette holds more data than can fit in the
computer’s 640KB of memory, the computer needs to copy the
contents of the diskette in two passes. The screen prompts you
when to insert and remove the diskettes.

When the copy is complete, you see this prompt:

Copy another diskette (Y/N)?


Press Y so you can make a copy of the next system diskette. Follow
the instructions above and the prompts on the screen to copy this
diskette and any other system diskettes. When
you finish and the
Copy another diskette (Y/N) ? prompt appears, press N to
return to the MS-DOS A) prompt.

MS-DOS and Your Computer 1-5


Be sure to label all your copies. Call one set MS-DOS Working
Diskettes and the other MS-DOS Master Diskettes. Date the labels and
attach them carefully to the top of each diskette. To avoid damaging
5!4-inch diskettes, it is best not to write on a label once it is on the
diskette. If you must, use a soft-tip pen.

Store your master diskettes in a separate, safe place.

Changing the Default Drive


As you already know, the symbol A) is the MS-DOS prompt from the
command processor. When you see the A) prompt, you know that
MS-DOS is operating from drive A and you can now enter a
command.

Whenever you turn on or reset your computer, MS-DOS automatically


logs onto drive A and displays the A) prompt.

Note
If your computer has a hard disk that has been set up to boot the
system automatically, MS-DOS displays the command prompt as C>.

Ifyou want to run a program or find a file on a different drive, you


must specify that drive. One way to do this is to log onto the drive. As
an example, log onto drive B now. At the A) prompt, type B and :

press Enter.

Your screen displays the B> prompt. This means that MS-DOS is now
using drive B as the default drive. The system continues to read from
drive B until you log onto another drive or turn off or reset your
computer.

You don’t have to log onto a drive to run a program or find a file on
that drive. You can just type the drive descriptor before the program
name or file name. For example, if you want to run the CHKDSK
program while logged onto drive B, type the following and press Enter:

A: CHKDSK

1-6 MS-DOS and Your Computer


The CHKDSK program displays information on the screen. You are
using a program from drive A even though you are still logged onto
drive B.

Resetting the Computer


When you are running MS-DOS, you may need
want to reset your
or
computer. This is sometimes necessary if you
program that
are using a
gets stuck in the middle of an operation. Or you may want to reset to
start fresh.

You can perform three types, or levels, of resets. As you move from one
level to the next, you cause more of the system to halt and start over.
The three levels are: the MS-DOS BREAK, the operating system
reboot, and the hardware level restart.

The first level, the MS-DOS BREAK, merely stops a program’s


operation and returns you to the command prompt. Any program you
are running is stopped, and any data not stored on is lost. You can
disk
usually use the following command to interrupt an application program:
hold down the Ctrl key and press C. However, many application
programs have their own abort commands which you must know when
using those programs.

The next level is the operating system reboot. This stops the computer’s
CPU (central processing unit) you to reload MS-DOS and
and forces
start over. Any program you is stopped, and any data not
are running
stored on disk is lost. After MS-DOS reloads, the date and time
prompts appear followed by the command prompt. To reset at this level,
hold down the Ctrl and Alt keys and then press the Del key.

The final level is a hardware level restart. To do RESET


this, press the
button. It works the same as turning your computer’s power switch OFF
then ON again. Use this when no other reset can help with a software
problem.

MS-DOS and Your Computer 1-7


Using Diskette Drives
Your computer has one or more of the following types of drives:

• 360KB —With this drive, use


drive 5'4-inch, double-sided, double-
density, 360KB diskettes. (You can also use single-sided, 160KB or
180KB diskettes.) These diskettes contain 40 tracks per side, 8 or 9
sectors per track, and hold up to 360KB of information. (With 8
sectors per track, a diskette holds 320KB.) KB stands for kilobyte;

each kilobyte equals 1024 bytes.

• 1.2MB drive—With this drive, use 5 14-inch, double-sided, high-


density, 1.2MB diskettes. These diskettes contain 80 tracks per side,
15 sectors per track, and hold up to 1.2MB of information. MB
stands for megabyte; each megabyte equals 1,048,576 bytes.

• 720KB —With this drive, use 3 '/2 -inch, double-sided, double-


drive
density, 720KB diskettes. These diskettes contain 80 tracks per side,
9 sectors per track, and hold up to 720KB of information.

• 1.44MB drive—With this drive, use 3 '/2 -inch, double-sided, high-


density, 1.44MB diskettes. These diskettes contain 80 tracks per side,

18 sectors per track, and hold up to 1.44MB of information.

If your computer has more than one of these drive types, you need to be
aware of certain incompatibilities between the drives and the diskettes
they use. These incompatibilities also apply to the same type of diskette
drives on other compatible computers.

Drive and diskette incompatibilities


Because of the difference in size, you cannot use 3 '/2 -inch diskettes in a

514-inch drive or vice versa. Additionally, there are certain limitations


on using diskettes that are the same size as the drive but have different
capacities. Tables 1-1 and 1-2 summarize the possibilities and limitations.

Table 1-1. 5 '4-inch drive /diskette compatibility

Drive type Diskette types it can read from and write to


360KB 160KB, 180KB, 320KB, or 360KB
1.2MB 160KB, 180KB, 320KB, or 360KB, and 1.2MB

1-8 MS-DOS and Your Computer


Warning
Ifyou write to a 360KB (or 160KB, 180KB, or 320KB) diskette while it is

in a 1.2MB drive, you may not be able to read it or write to it in a


360KB drive later.

Table 1-2. Th-inch drive /diskette compatibility

Drive type Diskette types it can read from and write to


720KB 720KB
1.44MB 720KB, 1.44MB

Ifyou have any combination of the above drives (360KB, 1.2MB,


720KB, and 1.44MB), you can copy files from one drive to another
(using the COPY command) as long as the correct diskette type is in

each drive. You can also copy between a hard disk and any type of
files

diskette. You cannot use the DISKCOPY command to copy from one
drive to another if the two drives are not the same type.

Using two diskette drives


Operating systems usually expect the computer to have at least two
physical disk drives. Normally, MS-DOS recognizes drives A and B for

two diskette drives, and C for the hard disk drive.


A typical way to use a two-drive system is to load MS-DOS from drive
A, run your application software from the same drive, and use drive B
to store your data files.

Note
You can load MS-DOS from an application software diskette if

that diskette contains the operating sytem files including


COMMAND.COM. See Chapter 4 for information on the /S
parameter of the FORMAT command and the SYS command. You use
these commands to transfer the necessary system files to a diskette.

MS-DOS and Your Computer 1-9


There are many advantages to having two drives. You can perform file
copy operations without swapping disks. This saves a great deal of time
and reduces the risk of damaging your data by accidentally inserting the
wrong disk for a copy or format operation. While you have an
application program in one drive, you can log onto the other drive to
access a file, perform disk operations, or display a directory.

Using a single diskette drive


Ifyour system has only one diskette drive, you enter commands just as
you would for a system with two diskette drives. The only difference is

that all your diskette operations are performed on drive A.

For certain functions, such as copying diskettes, your single drive can
act as two drives, drive A and drive B. Instead of A and B representing
two physical drives, they represent two different diskettes in the same
drive.

When you specify a file on a drive other than A, MS-DOS prompts you
to insert the diskette for that drive. If you type COPY LETTER B and :

press Enter, MS-DOS copies the file from the A diskette to the
computer’s memory and then the screen displays the following:

Insert diskette for drive B:


and strike any key when ready

Whenever you need to change diskettes, this prompt reminds you


which diskette to use. You simply remove your A diskette from the
drive, insert your B diskette, and press any key to continue. MS-DOS
copies the file from memory to the B diskette in the drive.

MS-DOS displays the letter of the default drive in the command


prompt, not the letter of the you used. For example, if you
last diskette

just viewed the directory of the B diskette and your default drive is A,
MS-DOS knows that the B diskette is still in the drive even though the
command prompt is A). If you now type DIR to view the directory of
the A diskette, MS-DOS prompts you to:

Insert diskette for drive A:


and strike any key when ready

MO MS-DOS and Your Computer


Formatting Diskettes
Before you can store data on a new diskette, the diskette must be
formatted. Formatting prepares the diskette so that MS-DOS can write
to it. You need to do this only once, before you use the diskette for the
first time.

You can also reformat previously used diskettes. Reformatting, however,


erases all data on that diskette. Always be sure that you do not want to
save any of the data on a used diskette before you format it.

The formatting procedure you use depends on the configuration of your


system, either two diskette drives or one diskette drive.

Follow the instructions below for your configuration.

Formatting with two drives


Follow this procedure to format a diskette in drive B. (If you want to

format a diskette in a different drive, substitute the letter for that drive
in the instructions below.)

1. Insert your working copy of the MS-DOS diskette that contains the

FORMAT program in drive A (and press any key necessary) or if

log onto drive C (and the appropriate directory) you have stored if

the FORMAT program on the hard disk.

2. When you see the A) or C> prompt, type:

FORMAT B:
and press Enter. You see this prompt:

Insert new diskette for drive B:


and strike ENTER when ready

3. Insert the diskette you want to format into drive B, and press Enter
to start formatting. MS-DOS displays the head and cylinder
numbers as it formats each cylinder of the diskette.

MS-DOS and Your Computet 1-11


4. When the diskette is completely formatted, you see messages such as
these (for a 360KB diskette):

Format complete
362496 bytes total disk space
362496 bytes available on disk
Format another (Y/N)?

5. You can either pressY and Enter to format another diskette, or


press N and Enter to return to the MS-DOS command prompt.

Formatting with one drive


1. Insert your working copy of the MS-DOS diskette that contains the
FORMAT program in drive A (and press any key necessary) or if

log onto drive C (and the appropriate directory) if you have stored
the FORMAT program on the hard disk.

2. When you see the A> or C> prompt, type:

FORMAT A:
and press Enter. You see this prompt:

Insert new diskette for drive A:


and strike ENTER when ready
3. If the MS-DOS diskette A, remove it. Then insert the
is in drive
diskette you want to format in drive A and press Enter to start
formatting. MS-DOS displays the head and cylinder numbers as it
formats each cylinder of the diskette.

4. When the diskette is completely formatted, you see messages such as


these (for a 360KB diskette):

Format complete
362496 bytes total disk space
362496 bytes available on disk
Format another (Y/N)?
5. You can either format another diskette by pressing Y and Enter or
return to the MS-DOS system prompt by pressing N and Enter.

M2 MS-DOS and Your Computer


Using the Keyboard With MS-DOS
This section describes how to use the keyboard to take advantage of a
variety of MS-DOS functions. (See your User’s Guide for a detailed

description of the keyboard.)

Control key functions


The control key (Ctrl) performs a variety of functions when used with
other keys. To activate these functions, you hold down the Ctrl key and
then press the other key or keys. This manual shows these multiple key
commands like this:

Ctrl C
Table 1-3 shows the control key functions available in MS-DOS.

Table 1-3. Control key functions

Control key
combination Function

Ctrl C Aborts the current command.


Ctrl H Removes the last character from the command
line and erases the character from the screen;

same as pressing the backspace key.


Ctrl 1 Inserts a tab in the command line; same as
pressing the tab key.

Ctrl J an end-of-line without emptying the


Inserts
command line; this allows you to enter a command

on more than one line.


Ctrl M Same as Enter.
Ctrl P Echoes keyboard output to the printer; press Ctrl
P again to turn off the echo.

Ctrl S Pauses scrolling of the output display on the


screen; press any key to resume.

CtrIZ Places an end-of-file character in a text file.

Ctrl Break Halts command execution; same as Ctrl C.

Ctrl Alt Del Performs a system reset; any data in memory is

lost.

MS-DOS and Your Computer 1-13


Function keys
The function keys, FI through F6, serve as command line editing keys
in MS-DOS. When you type a command on the command line and
press Enter, the command executes and the characters in the command
line automatically go to a buffer that acts as a temporary storage area.
The function keys enable you to retrieve the characters stored in the
buffer to do the following:

• Instantly repeat a command line by pressing a single key.

• Edit the command and retry it without retyping the entire


command.

• Create a command line that is similar to the previous command line


with a minimum of typing.

The following example shows how you can use the MS-DOS function
keys to edit a command line:

1. Type DIR PROG.COM and press Enter. MS-DOS displays


information about the file PROG.COM on your screen (“File not
found,” for example) and saves the command line to the buffer.

2. Press F3 to copy the contents of the buffer to the command line.

3. Press Enter to send the command line to MS-DOS for execution.

4. Press F2 and C to display the characters in the buffer up to but not


including the letter C. The command line displays the following:

DIR PR0G._
5. Type TXT and press Enter to display information about a file

named PROG.TXT. The command line DIR PROG.TXT is now in


the buffer.

6. Type TYPE, press Insert and a space, and then press F3 and
Enter to display the contents of PROG.TXT.

The command line TYPE PROG.TXT is now in the buffer.

M4 MS-DOS and Your Computer


When you are typing, the characters enter directly into the command
line, overwriting the characters in the buffer. When you press Insert, as
in the above example, you can insert characters into the buffer without
overwriting characters.

If you had misspelled TYPE as BYTE, you would see:

BYTE PROG TXT .

Because this is not an acceptable command, you would receive an error


message. Correct the command in either of two ways:

® Press the following keys, one after the other:

T, FI, P, F3

The T replaces the B, FI copies the Y, the P replaces the T, and F3


copies the rest of the command line.

• Press the following keys, one after the other:

Delete, Delete, FI, Insert, Y, P, F3

Pressing Delete twice removes the first and second characters in


the buffer. FI displays the-third character in the buffer. Insert, Y,
and P insert the two characters, and F3 displays the rest of the
buffer characters.

Either method produces the following command line:

TYPE PROG TXT .

Generating special characters


MS-DOS uses 256 characters, each of which is assigned a unique code.
You can generate special characters that do not appear on the keyboard
using the keys on the numeric keypad with the Alt key. To do this, hold
down Alt and enter the decimal value of the character code for the
desired character. The special characters and their character codes are
shown in Appendix D.

MS-DOS and Your Computer 1-15


Note
Remember, you must generate these characters from the numeric
keypad. You cannot use the numbers on the top row of the standard
keyboard. You cannot display characters in the range from 0 to 31.

When you release Alt, the specified character is displayed at the current
cursor position. For example, to print the Vi character, which is code
17 x ,
hold down Alt and type 171. When you release Alt, V2 appears.

When you are in graphics mode, you can display the characters from 128
to 255 only after loading the MS-DOS GRAFTABL character generator.
See Chapter 4 for information on the GRAFTABL command.

Selecting international keyboards


MS-DOS allows you to select an international keyboard layout for your
system using the KEYB command:
Keyboard KEYB
Country/language code command
Australia US KEYB US
Belgium BE KEYB BE
Canada (English) US KEYB US
Canada (French) CF KEYB CF
Denmark DK KEYB DK
Finland SU KEYB SU
France FR KEYB FR
Germany GR KEYB GR
Italy IT KEYB IT
Latin America LA KEYB LA
Netherlands NL KEYB NL
Norway NO KEYB NO
Portugal PO KEYB PO
Spain SP KEYB SP
Sweden SV KEYB SV
Switzerland (French) SF KEYB SF
Switzerland (German) SG KEYB SG
United Kingdom UK KEYB UK
United States US KEYB US

1-16 MS-DOS and Your Computer


See the KEYB command in Chapter 4 for more information.

After you select one of these special keyboard commands, use the
appropriate international keyboard type to generate the characters
appearing on the keys. Appendix C includes illustrations of these
keyboards and complete details.

MS-DOS and Your Computer 1-17


1-18 MS-DOS and Your Computer
Chapter 2
Managing Files and Directories
Managing Files 2-2
Naming files 2-2
Maintaining files 2-5
Protecting files 2-5

Creating and Using Directories 2-6


Creating directories 2-7
Changing directories 2-8
Using pathnames 2-9
Copying from one directory to another 2-10
Displaying a list of directories 2-11
Removing a directory 2-12

Managing Files and Directories 2-1


Managing Files
You store all your work and programs in files. Usually, you create these
with the application programs you are using with your computer.
files

This section explains how to name, maintain, and protect your files.

Naming files
Each file must have a filename. A filename consists of up to eight
characters, identifying the information stored in the file. Although it is

not essential, you can add up to a three-character extension to further


identify the file. (In this manual, the word filename represents the name
of a file whether or not it has an extension.)

When you use an extension, you must separate it from the filename by
a period. For example, a typical word processing filename looks like this:

LETTER DOC .

Application programs often determine the extensions for the files you
create. For example, if you store a file called TEXT, a program might
make a backup copy of that fileautomatically for you and call it
TEXT.BAK or TEXT.DOC. Avoid giving names and extensions used
by your application software.

It is best not to use the following filename extensions because MS-DOS


uses them:

BAT, BIN, COM, CRF, EXE, LST, MAR OBJ, SYS


When you name you can use any combination of letters and
a file,

numbers. But do not use uppercase and lowercase letters to distinguish


between files. MS-DOS does not recognize a difference and always
displays filenames in uppercase.

Also, do not use a space or any of the following symbols in your


filename:

. " / \ {}:!<> + =;,? *

2-2 Managing Files and Directories


Develop a logical method for naming your files to make your data easy
to find. For example:

REPORT.TXT A text containing a report


file

MEM0321 A memo written on March 21


2003. IN V Your invoice number 2003

Device names — Certain names are reserved by MS-DOS and used as


device names. Do not use device names for your filenames. MS-DOS
recognizes the following device names:

• AUX (Auxiliary) is the serial port.

• CON (Console) is the keyboard and monitor.

® PRN (Printer) is your daisywheel or dot-matrix printer.

• NUL (Null) is a non-functional device for testing without real


output or input. When you use NUL to test output, all data is sent
to the null device, but it is not acted upon. For input, an immediate
end-of-file code is sent.

• LPT1 (Line Printer 1) is your printer (the same as PRN).

• COM1 (Communication Port 1) is your serial port (the same as


AUX).

LPT2, LPT3, and COM2, COM3, and COM4 are device names for
additional printers and serial ports. Your system can recognize these
devices, but cannot use them unless they are actually installed.

Using a disk drive descriptor — In addition to the name and


extension, you can include a disk drive descriptor in your filename. A
disk drive descriptor tells MS-DOS to look for the file on the disk in the
drive you specify. If you do not include a drive descriptor, MS-DOS
looks for the file on the default drive.

If the file you want is not on the default drive, type the letter of the
drive and a colon before the filename:

B:NEWFILE.EXT

Managing Files and Directories 2-3


Using wildcards to group files You can use two special characters—
called wildcards when referring to your files. A question mark (?) can
take the place of any single character and an asterisk (*) can replace any
group of characters, even the entire filename or extension.

Using these wildcards allows you to refer to a group of related files such
as all the files with .TXT extensions. This enables you to execute a
command affecting all of the files in the group without entering each
filename separately. For example:

MEMO ? MEMO, MEMO MEM02, and


Includes 1 ,

MEMOS, but not MEMOS 1 (because of the


extra character).

* . EXE Is the same as ????????. EXE and represents all files

with an .EXE extension.

PROG* BAS . Is the same as PROG????. BAS and includes


PROG BAS 1. and PROG2.BAS.

*.* Includes all files in the current directory.

B * *
: . Includes all files on drive B.

Here are some specific examples of using wildcards in MS-DOS


commands (remember to press Enter after typing a command):

• To list all files with the extension .BAS on drive B, type:

DIR B * BAS :
.

• To copy all .TXT files from drive A to drive B and rename them
with the .DOC extension, type:

COPY A:*. TXT B:*.DOC


• To delete all files from the current directory whose names begin
with ME and are followed by a single character, type:
DEL ME?

2-4 Managing Files and Directories


Some MS-DOS commands operate only on single files, not groups of
files. With these commands, you cannot use wildcard characters. See
the description of the specific command, as appropriate.

Maintaining files

Here are some good file management techniques to follow:

• Delete files you no longer need.

• Give files new names if they contain new information that no


longer matches their names.

• Make copies of important files.

Chapter 3 provides general descriptions of the MS-DOS commands you


use to maintain your files, and Chapter 4 describes each command in
detail. Additionally, Epson has created a command named XTREE that
simplifies file management. See Chapter 5 for a description of XTREE.

Protecting files

Follow these precautions to safeguard the information you store on disk:

• Copy new data to backup diskettes every day to ensure your


backup copy is up-to-date.

• Never remove a diskette when a file is open.

• Never remove a diskette when the drive’s light is on. (This does not
physically damage the diskette, but may prevent important data
from being written to the disk.)

• Write-protect important diskettes and backup copies. This prevents

the disk drive from writing on the disk. (Be aware that some
application programs do not work properly if the program diskette
is write-protected.)

Managing Files and Directories 2-5


Additionally, you can prevent any file from being accidentally altered by
designating it as read-only. To do this, use the ATTRIB command,
described in Chapter 4.

Creating and Using Directories


MS-DOS stores the files you create in directories. This makes it easier
for you to organize and find your files. A directory contains specific
information about each file such as its name, size, and the date and time
you last updated the file.

At the top is the main directory, called the root directory. -If you never
create your own subdirectories (from the root directory), MS-DOS stores
all your files in the root directory. As you
more files, it may create
become difficult to find them because they are all in one directory. For
better organization, you can create separate subdirectories in which to
store your files.

The root directory can contain many subdirectories, and each


subdirectory can contain other subdirectories. In this way, you can set
up your files in a tree-like structure such as this:

Root directory (\)

1
I

RECEIV
—LEDGER
1
1
WORDPROC
1
ELECMAIL
|— ^"1
PAYABL SALES OUT IN

BUSINESS PERSONAL
1
NEWS.TXT MSGS.TXT
I 1

WEST MID EAST

Each subdirectory has a name, and you can access any file in any
subdirectory by using a pathname. The root directory does not have a
name, but is always identified by a backslash \ ). The name of a (

subdirectory can be up to eight characters long, consisting of letters and


numerals, but no punctuation marks.

2-6 Managing Files and Directories


The directory you are working in is called the current directory. Usually,
when you first load the operating system, the root directory is the
current directory. To list the files in the root directory, type DIR and
press Enter. The screen displays the following above the file names:

Directory of A:\
If you are working in a directory named LEDGER, the screen displays
the following above the list of files:

Directory of A:\LEDGER
There are six basic operations you need to know to create and use
directories:

• Creating directories

• Changing directories

• Using pathnames

• Copying from one directory to another

• Displaying a list of all directories

• Deleting a directory.

These procedures are described below, using examples from the tree
illustration above.

Creating directories
Use the MKDIR command to create a directory. (MKDIR stands for
Make Directory.) For example, to create the LEDGER directory under
the root directory, type the following and press Enter-.

MKDIR \ LEDGER
To save a few keystrokes, you can type just MD instead of MKDIR. For
example, to create the SALES directory under LEDGER, type the
following and press Enter:

MD \ LEDGERX SALES

Managing Files and Directories 2-7


Once you have created a directory, you can store your files there. You
can also copy files from one directory to another; this procedure is

described later in this section.

To check that the LEDGER directory is in the root directory, type DIR
and press Enter. The screen displays a list of files in the root directory,
along with the new subdirectory:

LEDGER (DIR)

The (DIR) after a name identifies it as a subdirectory of the current


directory (in this case, the root directory).

If you want to access files stored in a directory other than the current
one, you must first do one of the following:

• Change directories

• Specify the pathname.

Putting files in separate directories is almost the same as putting them on


separate disks. You have to specify the pathname or change directories
to access files in different directories just as you have to specify the drive
or log onto a different drive to access files on different disks.

Changing directories
To change directories, merely type CHDIR (or CD) followed by a
backslash and the name of the directory. For example, to change to the
LEDGER directory, type the following and press Enter:

CD \ LEDGER
CD or CHDIR stands for Change Directory, the backslash (for root
directory) specifies that the new directory is a subdirectory of the root
directory, and LEDGER is the name of the new directory.
Once you are in the directory, you can directly access any files it

contains.

2-8 Managing Files and Directories


When you change to a subdirectory of the current directory, you do not
need to enter the backslash. For example, to change to the SALES
subdirectory while you are in the LEDGER directory, type the following
and press Enter:

CD SALES
To return to the root directory, type the following and press Enter:

CD \
This command takes you back to the root directory from any
subdirectory.

Using pathnames
You can access files in a different directory without leaving the current
one by specifying a path along with the filename. The path consists of a
series of directory names separated by backslashes.

MS-DOS begins searching for a file in the current directory.


Normally,
When you set a path, MS-DOS searches for the file in all the directories
in the designated path. For example, if you are in the LEDGER
directory and want to access a file named BETTY under the
PERSONAL directory, you would type the following pathname and
press Enter:

\WORDPROC\PERSONAL\BETTY
The pathname \WORDPROC\PERSONAL\BETTY is the full

pathname for the file BETTY. You can use it no matter what directory
you are in (as long as it is on the same disk). The first backslash (for root
directory) signifies that the path to the file starts in the root directory.
WORDPROC is the name of the subdirectory under the root directory,
and PERSONAL is the subdirectory under WORDPROC.
In a pathname, the filename is always last and is always preceded by a
backslash. A backslash at the beginning of a pathname signifies the root
directory, but subsequent backslashes merely separate directory levels.

Managing Files and Directories 2-9


If you want to access a file on a different drive, just include the drive
letter in the pathname as in this example:

B \WORDPROC\PERSONAL\BETTY
:

Other directory commands — MS-DOS lets you substitute a drive


letter for a directory path. This is when you use a long
helpful path. For
more information, see the SUBST command in Chapter 4.
The APPEND command you set a search path to directories
lets

containing data Another MS-DOS command, PATH, lets


(text) files.

you specify a search path for external commands or program files (those
having an extension of .COM, .EXE, or .BAT). This saves you the
trouble of entering the complete pathname when looking for these types
of files. See the descriptions of APPEND and PATH in Chapter 4.

Copying from one directory to another


You can copy files from one directory to another with the COPY
command. Simply specify the pathname for the file you want to copy
and for the directory to which you want the copy to go. For example, if
you are in the WORDPROC directory and want to copy BETTY from
the PERSONAL subdirectory to the BUSINESS subdirectory, type the
following and press Enter:

COPY PERSONALNBETTY BUSINESS


Be sure to type a space between the filename and the new pathname.
Note that you do not type a backslash before PERSONAL or
BUSINESS because they are subdirectories of the current directory. If

you do enter the backslashes, MS-DOS looks in the root directory for
the directories and does not find them.

2-10 Managing Files and Directories


With MS-DOS, you can use two special notations, one for the current
directory and one for the next directory up the tree. These two notations
are the first entries in each directory other than the root directory:

This represents the current directory. Typing DIR . is the same


as typing DIR without the period.

This represents the next directory above the current one, called
the parent directory. If EAST is your current directory, typing
DIR . . displays the contents of the SALES subdirectory.

Your word processing or other application program may have other


methods of creating and changing directories, but the above
descriptions of commands and pathnames should help you organize
your files in any application program.

Displaying a list of directories


With the TREE command, you can display a list of all the directories on
the specified drive. For example, to see the names of all the directories
on the default drive, type the following and press Enter:

TREE
The screen displays a report such as the following for every directory on
the drive:

Path: C:\LEDGER

Sub-directories: RECEIV
PAYABL
SALES
If you want to see a list of all the files in the directories, add the
command switch /F (switches are described in Chapter 3):

TREE /F

Managing Files and Directories 2’11


The screen displays the directory information as shown above plus the
names of all the files in each subdirectory, for example:

Path: C : \ SALES

Sub-directories: None

Files : DECSALES
FORECAST. 88
OCTSALES
NOVSALES

Note
When using the TREE command, be sure you are logged onto the drive
(and directory) where TREE.COM is stored or specify the drive location
in the command.

Removing a directory
If you no longer need a you can remove (delete) it with the
directory,
RMDIR (Remove Directory) command. But first, you must be sure the
directory does not contain any files; you cannot remove a directory that
is not empty. If you are sure you don’t want to keep any of the files in

the directory, delete them first; then you can remove the directory.

To remove an empty directory, such as the WEST directory under


LEDGER, type the following and press Enter:

RMDIR \LEDGER\WEST
You must give the complete pathname when removing a directory.

2-12 Managing Files and Directories


Chapter 3
Using MS-DOS Commands
MS-DOS Command Overview 3-2
Internal and external commands 3-2
Diskette operations 3-3
Hard disk operations 3-4
File operations 3-4
Directory operations 3-6
MENU, SETPRINT, and XTREE utilities 3-6
System configuration and operation 3-7
Batch processing operations 3-9
Programming tools 3-9

Entering Commands 3-10


Command formats 3-10
Rules for entering commands 3-13
Using batch files to combine MS-DOS commands 3-14
Input and output 3-17

Using MS-DOS Commands 3-1


MS-DOS Command Overview
To help you understand how MS-DOS works, this section presents an
overall look at the different categories of MS-DOS commands.

Internaland external commands


Each MS-DOS command is either internal or external. Internal
commands are built into MS-DOS. Once you have started your
computer and loaded MS-DOS, you can execute these internal
commands any time. External commands are stored on your system
diskettes as program files. Any file with an extension of .BAT, .COM,
or .EXE is considered an external command. MS-DOS must read these
commands from the disk before you can run them.

Your system diskettes contain the files you can access. You can view
these files on your screen when you type the directory command, DIR,
and press Enter.

Two files on the system do not appear in the directories. These


diskettes
files contain the instructions that make up the operating system. To

protect these files from being accidentally changed or erased, they do


not appear in your diskette directory and you cannot access them.

The commands, which are always immediately available in


internal
memory, do not show on the directory either. These commands are
stored in the COMMAND.COM file. COMMAND.COM is the
command interpreter, which displays the A) prompt, accepts your
commands, and runs programs. Only COMMAND.COM itself appears
in the system diskette directory. These are the internal commands:

BREAK DIR MKDIR SET


CHOP ECHO PATH SHIFT
CHDIR ERASE PAUSE TIME
CLS EXIT PROMPT TYPE
COPY FOR REM VER
DATE GOTO RENAME VERIFY
DEL IF RMDIR VOL

3-2 Using MS-DOS Commands


It’s easy to understand the MS-DOS commands if you think of them in
these functional categories:

• Diskette operations

® Hard disk operations

® File operations

• Directory operations

• System configuration and operation

• Batch processing operations

• Programming tools.

Every MS-DOS command falls into one of these categories. The


remainder of this chapter examines the commands by category, name,
and function.

Diskette operations
The following files on your system diskettes let you manage the
information on your diskettes:

CHKDSK.COM enables you to check the status of a diskette to


determine the available space and the size of your files. CHKDSK also
checks and .reports the condition of diskettes and files and, optionally,
fixes any errors found in the directory or file allocation table.
(CHKDSK functions in the same manner on a hard disk.)

DISKCOMP.COM compares and identifies differences


diskettes
between them. This is useful you need to determine whether two
if

diskettes are exactly alike or if you want to verify a DISKCOPY


operation.

DISKCOPY.COM copies the complete contents of one diskette to


another. (It formats the diskette if necessary.)

FORMAT.COM formats diskettes and, optionally, installs system files

and puts volume labels on diskettes. Before using new diskettes for the
first time, you must format them.

Using MS-DOS Commands 3-3


LABEL.COM allows you to create, change, or delete a diskette volume
label.

SYS.COM transfers operating system files from one diskette to another.

Hard disk operations


The following files on your system diskettes allow you to prepare and
maintain a hard disk:

BACKUP.COM enables you to back up hard disk files. Use this

command to store your hard disk files on diskettes. (Restore them from
diskettes to the hard disk with the RESTORE command.)
FDISK.COM partitions the hard disk to establish a work area for the
MS-DOS operating system on your hard disk. It also enables you to
start MS-DOS automatically from your hard disk (rather than a

diskette) every time you turn on or reset your computer.

HDCACHE.EXE enhances the performance of a hard disk by storing


the location of requested sectors in a reserved part of memory.

RESTORE.COM lets you restore hard disk files. Use this command to

restore your files from diskettes (which you stored previously with the
BACKUP command) to the hard disk.
SELECT.COM lets you format your hard disk for the first time,

simultaneously copying the MS-DOS files to the hard disk, choosing a


keyboard layout, and labelling the hard disk.

File operations
The following files on your system diskettes help you manage your files:

ATTRIB.EXE allows you to set or reset the read-only attribute of a file

and set the archive bit on or off. You can also use this command to

display the attributes of a file. By setting a file’s attribute to read-only,

you protect the file from being accidentally altered or deleted.

COMP.COM lets you compare the contents of two files or two groups
of files to see if they are different.

3-4 Using MS-DOS Commands


FASTOPEN.EXE speeds up file access time by storing the location of
directories in the computer’s memory.

FC.EXE compares two files and either verifies that they are identical or
reports the differences.

FIND.EXE locates text strings within files.

MORE.COM is a command filter you can use when displaying files.

This command filters screen output so that a pause occurs each time the
screen fills. (Filters are described below.)

PRINT.COM is the file printing command that outputs your DOS text
files to a printer. While your file is printing, you can use the computer
for other tasks.

RECOVER.COM attempts to save damaged disks or disk files. Use this


command if you continually receive disk error messages when accessing
a particular disk or file.

SHARE.EXE is the command that sets up your computer to support file

.sharing through the network system. This command has no effect


unless a network system has been installed.

REPLACE.EXE lets you replace files on the target disk with files of the
same name from the source disk. You can also add new files, copying
them from the source to the target.

SORT.EXE sorts strings in text files. This command arranges the records
in a file in alphabetical or numerical order.

XCOPY.EXE lets you copy groups of files or entire subdirectories.

Internal commands — These internal commands also help you


manage your files:

COPY copies your files to other disks, directories, or devices.

DEL, also called ERASE, deletes files from your disks.

RENAME, also called REN, renames files on your disks.

TYPE displays DOS text files on your screen.

Using MS-DOS Commands 3-5


Directory operations
The following, files on your system diskettes create and maintain
directories:

APPEND.EXE displays or sets paths to directories containing data files.

JOIN.EXE connects a directory on one drive to an entirely different

drive.This allows certain applications to access a different drive without


having to change the current drive.

SUBST.EXE allows you to substitute a different drive letter for another

drive or path. Using this command, you can shorten a long path name
to just one letter.

TREE.COM allows you to display all the directories on a disk and,

optionally, list all the files they contain. Use this command to display

your disk file structure in one complete listing.

Internal commands — These internal commands also maintain your


directories:

CHDIR, also called CD, shifts you to a different directory within the

directory structure of a disk.

DIR displays the contents of a disk directory.

MKD1R, also called MD, creates (makes) a new directory on your disk.

RMD1R, also called RD, removes an empty directory from your disk.

MENU, SETPRINT, and XTREE utilities


Epson offers three menu utilities: MENU.EXE, SETPRINT.EXE, and
XTREE.EXE. MENU provides simple, easy-to-use menus for certain
complex MS-DOS commands and also lets you access any MS-DOS
command. SETPRINT lets you define the printing defaults for your
printer. XTREE simplifies the use of several file and directory
maintenance commands by providing a convenient menu for the DIR,
DEL, COPY, ATTRIB, TYPE, REN, MKDIR, RMDIR, CHDIR,
TREE, LABEL, and VOL commands. See Chapter 5 for instructions
on these menu utilities.

3-6 Using MS-DOS Commands


System configuration and operation
The following files on your system diskettes let you define your system’s
configuration and operation:

ANS1.SYS is a file that contains a set of standard escape codes for


console control. Some application programs you run may require this
standard console driver interface. If so, the documentation for the
application program specifies it. When you do need ANSI.SYS, enter it

in the CONFIG.SYS file with the command DEVICE = ANSI.SYS.


This automatically places it in memory at startup. See Chapter 6 for
information on CONFIG.SYS and Appendix E for more details about
ANSI codes.

ASSlGhI.COM allows you to assign a drive letter to a different drive.


Because some application programs require that you place data diskettes
in a particular drive, this command is useful in redirecting input/output
to a drive of your choosing.

DRIVER.SYS you copy files from one drive to the same drive when
lets

the system has more than one diskette drive. Without DRIVER.SYS,
files are automatically copied to the second drive. When you need
DRIVER.SYS, just list it in a CONFIG.SYS file with the command
DEVICE = DRIVER. SYS. This automatically places it in memory at
startup. See Chapter 6 for more information on CONFIG.SYS and
DRIVER.SYS.

GRAFTABL.COM loads a special character generator table for use


when the display screen is set to graphics mode.

GRAPHICS.COM (for 9-pin printers) and GRAPH24.COM (for 24-pin


printers) let you make exact printed copies of your screen’s image.

HELP.COM displays information about all the MS-DOS commands


and utility programs.

KEYB.COM loads a special program that redefines the keyboard


country layout.

MODE.COM allows you to change the configuration of printer output,


monitor output, serial port operation, and code pages.

Using MS-DOS Commands 3-7


NLSFUNC.EXE enables code page switching.

VDISK.SYS simulates a disk drive by using a portion of your computer’s


memory as the storage medium. When you need VDISK.SYS, just list it
in a CONFIG.SYS file with the command DEVICE = VDISK.SYS.
This automatically places it in memory at startup. See Chapter 6 for
more information on CONFIG.SYS and VDISK.SYS.

XTREEINS.EXE lets you install and customize XTREE for your


XTREE.EXE and XTREEINS.DAT work with
monitor.
XTREEINS.EXE. All three files must be in the same directory for the
program to operate. See Chapter 5 for information.

Internal commands — These internal commands also let you configure


and operate your system:

BREAK enables or disables command aborting by Ctrl C.

CHCP displays or changes the current code page (character set).

CLS clears the screen.

CTTY changes the standard input/output device.


DATE displays and allows you to set the date.

EXIT returns to an application program after loading and executing


COMMAND.COM from the application.

PATH displays or sets paths to directories containing command files.

PROMPT restores or changes the characters that make up the


command prompt.

SET displays or sets your system parameters in the current


environment.

TIME displays and allows you to set the time.

VER displays the number for the MS-DOS version you are using.

VERIFY enables or disables a verification of all files written to disks.

VOL displays the volume identification of your disks.

3-8 Using MS-DOS Commands


Batch processing operations
The commands you use for batch processing are all internal commands.
These commands add flexibility and power to your batch programs.
However, you do not need to use any of these commands in order to
use your operating system or application programs.

CALL allows a batch file to call another batch file without loading
another copy of COMMAND.COM.
ECHO enables or disables screen output during batch file operations.
FOR allows conditional repetitive processing in batch file operations.

GOTO jumps to a specified label in batch file operations.

IF specifies parameters for conditional processes in batch file operations.

PAUSE interrupts processing of batch files until you are ready to


continue.

REM lets you add remark statements to batch files to explain their
operation.

SHIFT allows you to access more parameters in batch files.

Programming tools
Your system diskettes contain four standard MS-DOS utilities you can use
in programming and designing assembly routines. You do not need to run
any of these in order to use your operating system or application programs.

DEBUG.COM is the debugging tool that examines and modifies code


and data in memory. This command monitors and modifies your
computer’s memory.

EDL1N.COM is the editing utility for creating and modifying text files.

EXE2BIN.EXE is the conversion utility for changing .EXE files into


.BIN files.

LINK.EXE is the utility that combines your object code modules into one
executable program. Use this command when constructing programs. (You
need a language assembler or compiler to create object modules.)

Using MS-DOS Commands 3-9


Entering Commands
This section explains the format for giving MS-DOS commands and the
various parameters you can use. It also describes how to group
commands in a batch file and redirect input or output from one device
to another.

Command formats
To enter an MS-DOS command, you must understand the format of
the command. The format specifies everything MS-DOS needs to
perform a task. This includes the name of the command and any
parameters.

In this manual, the command name appears in all uppercase letters. You
can actually enter the name in upper- or lowercase letters. MS-DOS
does not recognize a difference.

The parameters you specify for each command are determined by the
command itself. Some parameters are required while others are optional.

This manual uses certain symbols and typographical conventions to


illustrate what the command parameters are and how you enter them.

In this manual square brackets ( [ ] ) indicate an optional entry. Ellipses


you may repeat a parameter as many times as needed
(...) indicate that
or desired. Do not enter the brackets or the ellipses when you type the
command.

You must enter the following items:

• All other punctuation such as commas, colons, slash marks, and


equal signs, exactly as shown.

• Any parameter that does not have square brackets around it. (This
indicates that the command requires these parameters.)

• shown in uppercase letters. (While you can enter


All items
commands in upper- or lowercase, be sure to spell them correctly.)

3-10 Using MS-DOS Commands


Items shown in lowercase italic letters are parameters, as in this example:

TYPE filename
You must enter bothTYPE and filename because they are shown
without special symbols. TYPE is the name of the command and
filename is a parameter. You can type any filename.

The chart below identifies the parameters you see in this book. The
descriptionsshow both the format and an example for each of the
parameters. The format shows what you see in the Format section for
each command (in chapters 4, 6, 7, and 8) and the example shows one
example of what you could type for that parameter.

Parameter Description

d: Disk drive descriptor such as A: or B:. Shows which drive


contains the file or files you want. A colon always follows a
disk drive descriptor.

Format: d :

Example: A:

path The path name showing how to locate thefile on the disk,

including any necessary backslashes and the name of each


directory in the path.

Format: path
Example: \LEDGER\ SALES'\ WEST
The total number of characters in the path must not exceed
one line on the screen.

filename The name of a file with or without an extension. This


parameter does not include the disk drive descriptor. When
you do not use a disk drive descriptor, MS-DOS looks for
the file on the disk in the currently logged drive. Filenames
can be from one to eight characters. The optional extension
can be up to three characters.

Using MS-DOS Commands 3' 1


Note
Whenever a file is part of a path, the filename must be
preceded by a backslash. The filename is always the last

name in a path, separated from the last directory name by a


backslash.

You can use wildcard characters in the filename unless noted


in the command description. The wildcard characters are *
and ? . Chapter 2 describes how to use wildcard characters.

Format: filename
Example: NEWS TXT .

n or nnn A number that varies according to the command.


Format: n
Example: 9

x or xxx A character (or characters) that varies according to the


command.

Format: X
Example: R

Certain commands may allow or require other parameters not shown


here. The individual descriptions for these commands (in chapters 4
through 8) identify any special parameters.

For instance, some commands can include optional switches that affect
the way the commands work. You always precede the switch name
(usually a letter) with a slash (/).

A typical command format using switches looks like this:


DIR [d:] [path] [filename] [/P] [/W]

3-12 Using MS-DOS Commands


You can enter this DIR command in a number of ways, each yielding
different results. Some examples are:
DIR
DIR\LEDGER\SALES
DIR B:\
DIR A: ACCPAY/P
DIR C:/W

Rules for entering commands


Follow these rules when entering MS-DOS commands. Remember, one
or more parameters usually follow command names:

• Enter command names and parameters in either uppercase or


lowercase letters.

• Separate command names and parameters by delimiters. You usually


use spaces or commas as delimiters. For example:

TYPE TEXTFILE
You can also use the semicolon (;), the equal sign ( = ), or the tab
key as delimiters. This manual shows the space only.

• You do not need to separate a file specification with delimiters

because the colon, backslash, and the period already serve as


delimiters:

A \SALES\LETTER DOC
: .

• Include the file extension when referring to a file with an extension.

• For an external command, type the command without its extension


(.COM, .EXE, or .BAT). For an internal command, there is no
extension; simply type the command name.
• For an external command, you may need to add the drive
descriptor and directory if the file is not in the current directory. For
example, ifyou are logged onto Drive B and want to use the
MENU program, which is on Drive A in the \DOS directory, you
would type:

A:\D0S\MENU

Using MS-DOS Commands 3-13


You can specify a path preceding the name of a command. This
allows you to store the MS-DOS commands in subdirectories.

• You can use batch processing commands, such as IF and FOR,


when specifying an MS-DOS command.
• Always press Enter to execute a command.
This version of MS-DOS provides network support. You can use most
MS-DOS commands on a network disk, directory, or printer. The
following commands, however, may not work in a network
environment:

CHKDSK
DISKCOMP
DISKCOPY
FORMAT
JOIN
LABEL
RECOVER
SYS

Using batch files to combine MS-DOS commands


Ifyou find yourself typing the same sequence of commands over and
over, you can list the commands in a special file called a batch file.
When you execute the batch file, MS-DOS processes the entire
sequence of commands in the order you entered them.

You can store in a batch file any command that you normally run from
the command prompt.

You can create batch files with any text editor including the MS-DOS
EDLIN (described in Chapter 8). You can also
Line Editor, use the
COPY command with the CON device. The CON device allows you
to enter data from your keyboard and copy the data to a file.

The batch filename must include the extension .BAT so that MS-DOS
recognizes it as a batch file. To execute a .BAT file, type its name
without the extension. For example, if your batch filename is

END. BAT, type END and press Enter.

3-14 Using MS-DOS Commands


As an example, follow the steps below to create a batch file called

SAMPLE.BAT. It will erase all files on drive A with an extension of

.BAK, display a message indicating the files have been erased, and
display the directory of A. (This example uses the COPY command
with the CON device.)
Type each of the following lines exactly as shown. Press Enter after
typing each line:

COPY CON SAMPLE.BAT


DEL A:*. BAK
REM All .BAK files have been erased.
DIR A:
Press Ctrl Z and then Enter to close the file.

Now, to use this batch file, simply type SAMPLE at the command
prompt and press Enter.

You can specify another batch file as the last command in a batch file.

In this way, you can link batch files.

If you press Ctrl C while MS-DOS is executing a batch file, you see the

following prompt:

Terminate batch job (Y/N)?


Press Y to cancel execution of the remainder of the batch file commands
and return to the command prompt. Or press N to complete execution
of the current command and continue processing the remaining
commands.

If you remove the diskette containing the batch file during execution,
MS-DOS prompts you to insert it again before the next command can
be read. You see this message:

Insert diskette with batch file


and press any key when ready

Using MS-DOS Commands 3-15


The AUTOEXEC.BAT file — When you boot MS-DOS, the
command processor looks for a file called AUTOEXEC.BAT on your

system diskette or hard disk. AUTOEXEC.BAT is simply a batch file


you can create to automate your system boot-up routine. By grouping
several commands in this file, you can tell your computer to perform
them automatically, in sequence, every time you load MS-DOS.
store AUTOEXEC.BAT in the root directory of your
You must
MS-DOS startup diskette or hard disk. If the command processor finds
AUTOEXEC.BAT, the batch file immediately executes, bypassing the
date and time prompts. See Chapter 7, Batch Processing Commands,
for more information.

You can create AUTOEXEC.BAT with a text editor such as EDLIN. If


you use the COPY command with the CON device, remember to press
CtrIZ or F6 and then press Enter to close the file.

Creating a batch file with replaceable parameters— You can


create a batch file with replaceable parameters, enabling you to run the
same batch file with different sets of data.

You can specify up to 10 dummy parameters (%0 through %9) within a


batch file. When you execute the batch file, the values you supply
sequentially replace the %1 through %9 parameters. The filename of the
batch file and the disk drive descriptor, if specified, always replace the
%0 parameter.
As an example, create a a batch file called MYFILE.BAT that consists
of three lines:

COPY %1.MC %2 MAC


TYPE #2.PRN
TYPE %0.BAT
To run the file, type the following and press Enter:

MYFILE A PR0G1 B:PR0G2


:

3-16 Using MS-DOS Commands


The program substitutes MYFILE for %0, A:PROGl for %1, and
B:PROG2 for %2. The result is the same if you execute the following
commands:

COPY A PR0G1 MAC B:PR0G2.MAC


: .

TYPE B PR0G2 PRN : .

TYPE MYFILE.BAT
If you use the percent sign as part of a filename within a batch file, you
must type it twice. For example, to specify the file ABC%.EXE, you
type ABC %% .EXE in the batch file. When the batch file executes, you
see ABC % EXE , not ABC %% EXE
. .

Input and output


MS-DOS assumes that the keyboard is your input device and the
monitor is your output device. You can redirect the input or output to a
file or another device (such as a printer). You can also use filters and
pipes (described below) to manipulate your input and output.


Redirecting input and output You can instruct a program to read
input from a file rather than the keyboard, and you can direct output to
a file or printer instead of the monitor screen.

To direct MS-DOS to read input from a file instead of the keyboard, use
the less-than sign «) before the filename. For example, this command
sorts the text file NAMES.TXT:
SORT < NAMES. TXT

To direct output to a file instead of the monitor screen, use the greater-
than sign ()) before the filename. For example, this command stores the
directory of the default disk drive in a file called MYFILES.DIR:

DIR > MYFILES.DIR

Note
If the file MYFILES.DIR already exists, MS-DOS overwrites what is in
the file with the new data.

Using MS-DOS Commands 3-17


If you want to append (add) data to a file, rather than overwrite the file,

type two greater -than signs () )) before the filename. (If the file does not
exist, MS-DOS creates it.) For example, this command appends the
directory listing of the default drive to the existing file named
MYFILES.DIR:

DIR >>MYFILES.DIR
MS-DOS by two device names: PRN and LPT1.
recognizes a printer
Use names to redirect data output to a printer. For
either of these device
example, to send the file ABCDIR to the printer, turn on the printer
and use one of the following commands:

COPY ABCDIR PRN:


COPY ABCDIR LPT1:
You can send the MS-DOS file EPSON.TXT to the printer with either
of the following commands:

TYPE EPSON.TXT >PRN:


TYPE EPSON.TXT >LPT1:
The RS-232C serial port can both send and receive data. Therefore,
output can be sent toit, and input can be accepted from it. The device

names RS-232C port are AUX, COM1, COM2, COM3, and


for the
COM4. (COM2, COM3, and COM4 are available only if you have
installed additional serial ports in your computer.)

To communicate with another MS-DOS based computer via the


RS-232C serial port and send the EPSON.TXT file to the other
computer, follow these steps:

1. Match signal parameters with the SETUP or MODE command.


2. Type the following, but do not press Enter:

COPY EPSON.TXT AUX:


3. Wait for the receiving end to type COPY AUX : EPSON TXT .

4. When the receiving end presses Enter, you must press Enter.

3-18 Using MS-DOS Commands


Using filters —A filter is a command that reads your input, changes it

in some way, and then outputs it. In this process, the data is filtered by
the program.

MS-DOS filters include the following:

• FIND searches for a constant string of text in a file.

• MORE displays text on your screen one screen page at a time.


• SORT sorts text in alphabetical or numerical order.

You can put these filters together in many different ways and create
functions that take the place of a large number of specific commands.
See Chapter 4 for more details.

Command piping — You can give more than one command to the
system at a time by piping commands to MS-DOS. To do this, enter a
pipe separator ( j ) between command names. For example, this
command gives you an alphabetically sorted list of your directory:

DIR |
SORT
The pipe separator sends
all output for processing— generated by the

command on side— to the command on the right side of the bar.


the left

In other words, the output from the command on the left becomes the
input for the command on the right.

You can link more than two commands. For example, this command
sequence sorts your directory and displays it one screen at a time:

DIR |
SORT |
MORE
You can link several commands together as long as the output of one is

usable as the input of the next.

Using MS-DOS Commands 3-19


Chapter 4

Alphabetical List of MS-DOS Commands


Introduction 4,3
About the command format 4,3
APPEND 4,5
ASSIGN 4- 9
Al l RIB 4,2
backup ”
4-14
BREAK *
4 ig
chcp
CHDIR 4,22
chkdsk ! 4-24
CLS 4,27
COMMAND 4,28
COMP 4 , 31
copy
cm
DATE
4.37

DEL
DIR 4,43
DISKCOMP 4,45
diskcopy ,;;;;;;;;;; 4_49
ERASE
EXIT 4,34
FASTOPEN 1 . 4-55
FC 4-57
fdisk 4 , 65
HND 4-80
FORMAT 4 , 82
GRAFTABL 4 , 88
GRAPH24 4,90
GRAPHICS ’ ' 4 , 91
HDCACHE '

4.94
HELP ’4-97
JOIN 4,9s
KEYS 4-100

Alphabetical List of MS-DOS Commands 4.1


LABEL 4-104

MKDIR 4406
MODE 4-108

MORE 4-120

NLSFUNC 4-121

PATH 4-122

PRINT 4-124

PROMPT 4-127

RECOVER 4-130

RENAME 4-132

REPLACE 4-133

RESTORE 4-136

RMDIR 4-139

SELECT 4-140

SET 4-147

SHARE 4-149

SORT 4-150

SUBST 4-152

SYS 4-154

TIME 4-155

TREE 4-157

TYPE 4-159

VER 4-160

VERIFY 4-161

VCL 4-162

XCOPY 4-163

4-2 Alphabetical List of MS-DOS Commands


Introduction
This chapter and the following four chapters contain descriptions of the
MS-DOS commands The most commonly used
in alphabetical order.
commands menu
are covered in this chapter. Chapter- 5 describes three
utilities created by Epson: MENU, SETPRINT, and XTREE. Chapter 6

describes the commands stored in the CONFIG.SYS file, Chapter 7


describes batch processing commands, and Chapter 8 describes
programming commands.

For a general description of the functional categories of commands, see


“MS-DOS Command Overview” in Chapter 3. For instructions on how
to enter commands, see “Entering Commands,” also in Chapter 3.

The commands are presented in a standard format that provides the


following information:

• Command name— appears at the top of the page in bold uppercase


letters.

• Internal or External — appears across from the command name and


identifies whether the command is internal or external.

• Purpose—briefly describes what the command does.

• Format— gives the correct syntax for entering the command. Be sure
to read“Command Formats” in Chapter 3 for a complete
explanation of the command syntax.

• Description— explains in greater detail how to use the command.


• Cautions — when applicable, identify any special conditions to avoid
or be aware of when giving the command.

• Examples — show one or more examples of the command and


describe the result.

About the command format


Although the Format section of each command may require more than
one line to show all the possible variables, you should always type the
complete command on one line, including all parameters, before
pressing Enter.

Alphabetical List of MS-DOS Commands 4-3


To execute an external command, you must either be logged onto the
drive and directory where the command is stored, or you must enter the
drive descriptor and path before the command name. For example,
here’s how this manual presents the external command FDISK:

[d:] [path] FDISK

If FDISK is on drive C in the \DOS directory and you are currently


logged onto drive A, you would type:

C:\DOS\FDISK

4-4 Alphabetical List of MS-DOS Commands


APPEND External

Purpose
Sets a search path for data files. With the /X switch, also sets a path for
executable files.

Format
First time:

[d:] [path] APPEND [ d:]patd[ ; [ d:~\path . .


.]

or:

[d: ] [path] APPEND [/X] [/E]

If APPEND has already been loaded:

APPEND [d:~]path[;[d:~\path . .
.]

or:

APPEND [;]

Description
Use APPEND to identify the directories that you want MS-DOS to
search to locate files that are not in the current directory. Once the
APPEND command is entered after loading MS-DOS, you can access
files that are in different directories without entering their pathnames.

Whenever you request a file from MS-DOS, it first searches the current
directory, then the directories listed in the APPEND command, then
any directories specified with the PATH command.
Because the APPEND command is an external command, you need to
precede it with the drive descriptor and pathname the first time you

give the command if APPEND is not in the current directory. After


APPEND is loaded in memory, however, it is an internal command.
Therefore, if you give the APPEND command again later, you do not
need to specify its location.

APPEND 4-5
Use the format APPEND path; path) path to specify' several paths
by separating each path with a semicolon. MS-DOS searches the paths
in the order you specify.

Type APPEND; (with a semicolon) to set a null path. This instructs


MS-DOS to look only in the current directory for the specified file or
files.

To display the current search path, type only APPEND, with no


pathnames or parameters.

Each time you use the APPEND command, the new path you specify
APPEND command.
replaces the path specified in the previous

You can use the following switches with APPEND:


Switch Function

/X Appends program files to the specified path in addition


to data files

/E Stores the APPEND paths in the DOS environment


Normally, you would use the APPEND command to locate data files
and the PATH command to locate executable files— program files that
have an extension of .COM, .EXE, or .BAT However, you can add the
/X switch to the APPEND command to include program files, as well as
data files, in the search path. This switch is effective only if you include
it the first time you give the APPEND command after loading

MS-DOS. You cannot use the /X switch and specify the search path at
the same time; use the /X switch first, and then give the APPEND
command again to set the search path.

Note
Certain MS-DOS commands, such as BACKUP and RESTORE, set
their own search paths. If you include the /X switch the first time you
give the APPEND command, you must set the search path to null with
the command APPEND; before using either the BACKUP or
RESTORE command.

4-6 APPEND
Use the /E switch to store the APPEND paths in the DOS
environment. This enables you to display and change the APPEND
DOS environment values with either the APPEND or SET command.
Without the /E switch, MS-DOS stores the paths only in APPEND,
and you can use only the APPEND command to display or change
paths. For the command to be effective, you must include the /E switch
the first time you give the APPEND command after loading MS-DOS.

Cautions
Although APPEND can retrieve a file from a different directory, it does
not automatically return the file to its proper location when storing the
file. If you edit a file from another directory that was located by the
APPEND command, be sure to specify the complete pathname when
you store the file. Otherwise, the file is stored in the current directory,
not the one it came from.
If you use the ASSIGN command to reassign drives, do so after you
give the APPEND command the first time.
The maximum number of paths you can specify in an APPEND
command is 127. The maximum number of characters you can include
in a single command is 256.

If you make any mistakes when entering the path information in the
APPEND command, such as an invalid drive descriptor or path name,
MS-DOS does not detect the error until it needs to search for the specified
paths.

Examples
To tell MS-DOS to search your WORDPROCNBUSINESS directory
on drive C for data files and program files, type the following two
commands, pressing Enter after each:

APPEND /X
APPEND C NWORDPROCNBUSINESS
:

The command with the /X switch must come first and must be the first

APPEND command after MS-DOS has been loaded.

APPEND 4-7
To search this path and two others, type the following and press Enter:

APPEND C \WORDPROC\BUSINESS; NELECMAILMN;


:

\LEDGER\ SALES
Now you can access any of the data or program files in these directories
without specifying the pathname.

To display the current APPEND path, type the following and press Enter:

APPEND
For the previous path, the screen displays the following:

APPEND = C \WORDPROC\BUSINESS; NELECMAILMN;


:

\ LEDGERN SALES
To tell MS-DOS to search only the current directory and not the above
path, type the following and press Enter:

APPEND;

4-8 APPEND
ASSIGN External

Purpose
Assigns a new letter to a drive specification.

Format
[d:] [path ] ASSIGN [dl=d2...]

Description
Use ASSIGN to assign different letters to your disk drives. This can be
helpful application program recognizes only drives A and B
when an
and does not allow you to specify another drive such as C. Entering this
command lets you use other drives.

In the ASSIGN format, dl is the disk drive to receive the new letter

and d2 is the new letter. Both drives must exist; that is, they must be a
diskette drive, a hard disk drive, or a device driver such as VDISK.

To cancel the assignment, type ASSIGN without parameters. This resets


all drive letters to their original drive assignments.

Cautions
Use ASSIGN only when necessary. When you are done, cancel the
assignment. Do not use ASSIGN during normal use of MS-DOS.

Do ASSIGN command with BACKUP JOIN, LABEL,


not use the
RESTORE. If you do, you could destroy data because
PRINT, or
ASSIGN hides the true device type. DISKCOMR DISKCOPY, and
FORMAT ignore any reassignments made with ASSIGN.
Examples
To make all references to drive B act upon drive C, type the following
and press Enter (do not type colons):

ASSIGN B=C
Now, if you type DIR B : ,
you see the list of files on drive C.

ASSIGN 4.9
To make all references to drives A and B act upon drive C, type the
following and press Enter:

ASSIGN A=C B = C
lb reset all drives to their default assignments, type the following and
press Enter:

ASSIGN

4-10 ASSIGN
ATTRIB External

Purpose
Sets, displays, or removes the read-only attribute or archive bit for a file

or group of files.

Format
[d: ] [path] ATTRIB [±R] [±A] [d:] [path] filename [/S]

Description
Use the ATTRIB command to give you an extra level of protection for
important data files that you store on disk. Using ATTRIB, you can set
a file’s attribute to read-only. This allows the file to be read, but not
altered or deleted. (This is not the same as write-protecting the file.)

You can also use ATTRIB to set a file’s archive bit on or The
off.

archive bit tells MS-DOS which files have been altered so commands
such as BACKUP and XCOPY know which files to copy.

Note
An easier way to use the ATTRIB command is through the MENU
utility. See Chapter 5 for instructions.

ATTRIB +R sets the read attribute of the specified file to read-only.


ATTRIB -R removes the read-only attribute, allowing you to alter or
delete the file.

ATTRIB +A sets the archive bit of the specified file so XCOPY and
BACKUP know to copy the file. ATTRIB -A turns off the archive bit,
indicating the file has not been altered and does not need to be
archived. After you copy a file with XCOPY or BACKUP the file’s

archive bit is reset to A—.


You can use ATTRIB with any logical combination of +R/-R or
+A/-A.
If you use ATTRIB without an R or A option, the screen displays the
attribute that is currently set for the specified file.

ATTRIB 4-11
You can use wildcards (* and ?) in the filename to specify groups of files.

Use the /S switch when you want ATTRIB to process every matching
file in a specified directory and all of its subdirectories.

Caution
If you use REPLACE /R, you can overwrite a read-only file with the
source file. If you use XCOPY /M to copy a file whose archive bit is set,
XCOPY will turn off the archive bit of the source file. See the
REPLACE and XCOPY commands in this chapter.

Examples
To set the read attribute of a file named BETTY to read-only, type the
following and press Enter:

ATTRIB +R BETTY
To remove the read-only attribute of all files on drive A, type the
following and press Enter:

ATTRIB -R A:*.*
To set the archive bit of all files on drive C in the SALES directory, type
the following and press Enter:

ATTRIB +A C:\SALES\*.*/S
The /S sets the archive bit of all files in any subdirectories of the
SALES directory.

To turn off the archive bit of a file named MEMO.TXT, type the
following and press Enter:

ATTRIB -A MEMO.TXT
In the following example, a file called EPSON.TXT on drive C has been
set to read-only (+R) and has had its archive bit set (+A). To display
the current attributes of this file, type the following and press Enter:

ATTRIB EPSON.TXT

4-12 ATTRIB
The screen displays:

R A C:\EPSON.TXT
The letters R and A appear only when the applicable attribute is set.

If neither attribute is set, using the ATTRIB command with the


EPSON.TXT file, the screen displays the following:

C:\EPSON.TXT
A file’s archive bit is always set unless you turn it off. If you have not
used the ATTRIB command with the EPSON.TXT file and enter the
command ATTRIB EPSON.TXT , the screen displays the following:

A C:\EPSON.TXT

ATTRIB 4-13
BACKUP External

Purpose
Backs up (copies) one or more files from one disk to another in a special,
condensed format.

Format
[d:] [path] BACKUP dl: [path] [filename] d2:[/ S][/A][/F]
[/M] [/D: date] [/T time] [/L[ : [d: ] [path] filename ]
:

Description
Use BACKUP to back up one or more files from one disk to another.
You can back up files in any of the following ways:

• Hard disk to a diskette

• Hard disk to a hard disk

• Diskette to a diskette

• Diskette to a hard disk.

BACKUP is most commonly used to back up hard disk files.

Note
An easier way to use the BACKUP command is through the MENU
utility. See Chapter 5 for instructions.

Do not confuse BACKUP with COPY or XCOPY. COPY and XCOPY


make an exact duplicate of a file. BACKUP creates files that are not
usable until they are restored with the RESTORE command. The
advantage of BACKUP is that you can store more files on a disk
because of the condensed format in which the files are stored.
Therefore, it is a good idea to use BACKUP when storing files for
archive purposes. To back up files you use daily, use COPY or XCOPY.

The disk that contains the files you want to back up is called the source
disk. The target disk is the disk being used to store all the backed up files.

4-14 BACKUP
In the command format above, dl: represents the source and d.2:

represents the target.

The target diskette’s current directory must be the root directory.

You can use the following switches with BACKUP:


Switch Function

/S Backs up all files in the subdirectories of the specified


directory in addition to the files in the specified or
current directory. Without the /S switch, only files in
the current directory are backed up.

/A Adds files to the target disk if it already contains backed-


up files. Use /A to copy files from the source disk which
are not already stored on the target.

/F Formats the target diskette if it has not already been


formatted. The FORMAT command must be accessible
from the current path.

/M Backs up files that have been modified since the last


BACKUP
/D -.date Backs up files that have been modified on or after the
specified date. The date format depends on the
COUNTRY code selected with the COUNTRY
command. Use a period or a dash to separate the day,
month, and year.

/T-.time Backs up files that have been modified on or after the


specified time. The time format depends on the
COUNTRY code you select with the COUNTRY
command. Use a period or dash to separate the hours,
minutes, and seconds.

/L:[d:][path]file Makes a backup log file listing the filenames. If you do


not specify a filename, MS-DOS makes the log file

BACKUPLOG on the source disk. MS-DOS cannot


make the log file on the target disk.

BACKUP 4-15
If you do not specify a drive and path, the log file is stored in the root

directory of the source drive. If a log file already exists, the new log

information is added to the end of that file.

The first record in the log file specifies the date and time of the backup.
Each subsequent record contains the backup disk number and complete
pathname and filename for each file backed up.

Before beginning BACKUIj make sure the current directory of your


target diskette is the root directory.

If you do not specify the /A switch, BACKUP deletes all files stored on
the target disk.

When you use the /A switch to add files to diskettes, be sure to back up
the additional files on the last diskette in the series. Otherwise,
MS-DOS displays an error message.

BACKUP does not format the target diskettes unless you include the /F
switch. If you are going to back up many files (or even a few very large

ones), either include the /F switch or be sure to have plenty of


formatted diskettes before you begin the procedure.

You can use wildcards to back up groups of similarly-named files

including files from different subdirectories.

BACKUP displays the name of each file as is backed up. After it

BACKUP up a diskette, prompts you to insert another diskette


fills it

into the drive.

Label and number each backup diskette in consecutive order. When


you RESTORE these files, you will be prompted to insert the diskettes

in order.

If the target is a hard disk, backup files are stored in a subdirectory


called \BACKUP If the target is a diskette, backup files are stored in

the root directory.

4-16 BACKUP
Ifyou want to stop the BACKUP procedure after it has started, press
Ctrl Break. MS-DOS cancels the command and displays the system
prompt on the screen.

If you are sharing files, you can back up only those files that you
normally can access. If you try to back up a file that you are not

permitted to access, the following message appears:

PATHNAMEXFILENAME EXT .

Not able to backup at this time


BACKUP sets the following exit codes which you can use in processing
batch files to troubleshoot potential errors:

0 Normal completion of BACKUP procedure.

1 No files were found to be backed up.

2 Some files were not backed up because of file-sharing conflicts.

3 Terminated by Ctrl Break.

4 Terminated because of an error.

Caution
Do not use BACKUP while the APPEND /X, ASSIGN, JOIN, or
SUBST commands are in effect.

Examples
To back up all files on the hard disk (drive C) to the diskette(s) in drive
A, type the following and press Enter:

BACKUP C :* .* A:/S
This command backs up all files in the current directory and all of its

subdirectories on drive C.

To back up the file FILEITDOC from drive B to drive A, type the


following and press Enter:

BACKUP B: FILEIT.DOC A:

BACKUP 4-17
To back up to drive A all files on C in the current directory that
drive

have been modified since the last BACKUP and format any
unformatted diskettes in the process, type the following and press
Enter:

BACKUP C: A:/M/F
To back up all files on drive C that have been modified since March 15,

1988, type the following and press Enter:

BACKUP C: A:/D:3-15-88/L
Using the /L switch creates a log file named BACKUELOG in the root

directory of drive C that lists all the backup files.

To add from drive B in the WORDPROC directory (and any of its


files

subdirectories) to files already backed up on drive A, type the following


and press Enter:

BACKUP B:\W0RDPR0C A: /A/S

4-18 BACKUP
BREAK Internal

Purpose
Enables or disables the Ctrl C function.
Format
BREAK [ON]

BREAK [OFF]

Description
Use BREAK to turn on or off the MS-DOS abort current command
(Ctrl C) function. Normally, MS-DOS checks for Ctrl C only while it is

reading from the keyboard, or writing to the monitor or printer. The


standard setting is BREAK OFF.
When BREAK is ON, MS-DOS checks for Ctrl C whenever a program
requests MS-DOS to perform any function, such as a disk read and/or
write.

Ifyou are running an application program that uses Ctrl C itself, type
BREAK OFF to turn off the MS-DOS Ctrl C function. Then, when you
press Ctrl C, you affect your application program and not the operating
system.

When you have finished running your application program and are
using MS-DOS, type BREAK ON to turn the Ctrl C function on again.
To display the current setting of BREAK, type BREAK only without
ON or OFF. If BREAK is OFF, the screen displays:
BREAK is off
You can also turn on the abort current command function by including
BREAK = ON in your CONFIG.SYS file. See Chapter 6.

BREAK 4-19
CHCP Internal

Purpose
Displays or changes the current code page (character set).

Format
CHCP [nnn]

Description
Use the CHCP command to display the current code page or to select a
different one. Unlike the MODE command, which lets you change the
code page for a particular device, CHCP changes the code page for the
entire system.

The nnn represents the number of the code page you want to use:

Number Code page


437 United States — English
850 Multilingual
860 Portuguese
863 C anada—French
865 Nordic

If you do not specify a number, the screen displays the number of the
current code page for the system.

Before giving the CHCP command, you must do the following:

• Load the NLSFUNC command to provide national language


support.

• Use the DEVICE command in the CONFIG.SYS file to enable the


device drivers affected by code page switching.

• Use the MODE command with the Codepage Prepare option to


prepare the selected code page for the device or devices.

4-20 CHCP
• Be sure that the COUNTRY.SYS file, which contains country
information, is accessible to the CHCP command. If it is not in the
current directory, you can use the COUNTRY = statement in the
CONFIG.SYS file or the NLSFUNC command to tell MS-DOS
where to find COUNTRY.SYS.

Be sure to read Chapter 9, Code Page Switching, for information on


code page switching.

If you are running an application program and then give the CHCP
command, the program continues to use the original code page. If you
start a program after giving the command, it uses the new page code.

If the code page you select is not prepared for the system, the screen
displays a message such as this:

Code page 863 not prepared for system

If the device (a monitor or printer, for example) is not prepared for a


code page, the screen displays a message like the following:

Code page 863 not prepared for all devices


The CHCP command changes the active code page even if the specified
code page is not prepared for a device. So you want to return to the
if

original code page, you need to reenter its number in the CHCP
command.

Examples
To display the current code page, type the following and press Enter:

CHCP
If the current code page is the US, the screen displays the following:

Active code page: 437


To select the multilingual code page, type the following and press Enter

CHCP 850

CHCP 4-21
CHDIR Interned

Purpose
Changes or displays the current directory.

Format
CHDIR [d:] [path]
CD [d:][path]

Description
Use CHDIR to change the current directory to another, or to display
the current directory path of a drive. You can type either CHDIR or
CD.

The directory you are working in is called your current directory.


MS-DOS remembers the current directory for each drive. Therefore,
when you change drives without specifying a directory, MS-DOS goes to
the directory you were using when you last used that drive.

Unless you set a path, MS-DOS looks in the current directory (on the
current drive) to find files. You can set a path of up to 64 characters
starting from the root directory. Indicate the root directory with a
leading backslash ( \ ).

A single period ( . ) represents the current directory. Two periods ( ..

represent tjie parent directory of the current directory.

Caution
The current directory may be hidden by ASSIGN, SUBST, and JOIN.

Examples
If your current directory is \LEDGER\SALES\WEST and you want

to change to the \WORDPROC\BUSINESS directory, type the


following and press Enter:

CD \WORDPROC\BUSINESS

4-22 CHDIR
To display the current directory, type only CHDIR and press Enter. The
screen displays your current directory. For example, if your current
directory is \WORDPROC\BUSINESS, the screen displays the
following:

B \WORDPROC\BUSINESS
:

To change to the parent directory of the current directory (the next


directory up the tree), type the following and press Enter:

CHDIR ..

To change to the root directory, regardless of what your current


directory is, type.the following and press Enter:

CHDIR \

CHDIR 4-23
CHKDSK External

Purpose
Checks the directories, files, and file allocation tables on the specified
disk and produces a disk and memory status report.

Format
[d:] [path] CHKDSK [d:] [path] filename ] [/F] [/V]

Description
Use CHKDSK to inspect the status of a diskette or hard disk and report
the number of files, the amount of total disk space and space still
available for use, and the amount of internal memory available.

Run this command periodically to check for errors. If CHKDSK finds


any errors in the disk’s directory or file allocation table, it reports them
and, optionally, corrects them.

Note
An easier way to use the CHKDSK command is through the MENU
utility. See Chapter 5 for instructions.

You can specify a filename and CHKDSK will report the number of non-
contiguous areas occupied by the file (or all the files if you specify *.*).

CHKDSK assumes that the disk to be checked is in the specified drive.


You are notprompted to insert the disk. If you have a dual diskette
drive system, be sure to specify drive B as the drive to be checked. (On
a single diskette drive system, MS-DOS prompts you to insert the B
diskette.)

4-24 CHKDSK
You can use two switches with CHKDSK:
Switch Function

/F Selects fix mode and CHKDSK attempts to correct any


errors

/V Selects verify mode and CHKDSK displays filenames,


directories, and messages while it is running

CHKDSK d : ) filename redirects the output from CHKDSK to a file


and sends status information and errors to the specified filename. If you

also include the /V switch, CHKDSK outputs the filenames and messages
to the file.

Do not use the /F switch if you redirect the output to the same disk
drive. The addition of a new filename to the directory would
automatically cause an error.

Cautions
Do not use CHKDSK on drives specified in a SUBST or JOIN
command.

This command may not work in a network environment.

Examples
To check the disk in drive B, type the following and press Enter:

CHKDSK B:
If CHKDSK does not find any errors, you see a status report similar to
this:

Volume SALES created Feb 17, 1988 9:30a


362496 bytes total disk space
71680 bytes in 7 user files
290816 bytes available on disk

655360 bytes total memory


589264 bytes free

CHKDSK 4-25
To check the disk in drive A and display all the files and their paths,
type the following and press Enter:

CHKDSK A:/V
You see a status report like the one above plus a display of all the files

and their paths.

To determine the number of non-contiguous areas, if any, occupied by


the file BUSINESS in your current directory, type the following and
press Enter:

CHKDSK BUSINESS
If the file contains non-contiguous areas, CHKDSK displays the
following message:

B: \BUSINESS
Contains 2 non-contiguous blocks

4-26 CHKDSK
CLS Internal

Purpose
Clears the monitor screen.

Format
CLS

Description
Use CLS to clear your monitor screen. MS-DOS clears your screen and
displays the command prompt in the upper left corner of the screen.

If you have loaded ANSI.SYS and have set screen attributes, the CLS
command does not change the attributes.

Example
On a screen filled with text, type the following and press Enter:

CLS

Your screen clears and displays only the command prompt.

CLS 4-27
COMMAND External

Purpose
Loads a secondary command processor.

Format
[ d : ] [path COMMAND
'] [d:][path] [CTTY-dey]
[/C command ] [/E :nnnnn] [/P]

Description
If you have loaded a top-level command processor in place of
COMMAND.COM, use COMMAND to load a secondary command
processor.

When you boot MS-DOS, COMMAND automatically loads, but it

loads in parts. One part remains in memory permanently. Another part


is transient.

The space in memory that the transient part occupies is not reserved
and application programs are permitted to overwrite it. Therefore,
programs sometimes have to reload this transient part.

If COMMAND.COM is not found in the specified directory, MS-DOS


searches the path in your environment. COMMAND.COM loads the
transient portion from the file specified in COMSPEC= as part of its

initialization.

If you enter COMMAND without any parameters, MS-DOS loads a


new copy of the command processor. This new copy inherits the
environment known to the previous level of the command processor.

If SET command to change the environment of the


you use the
secondary command processor, only the secondary copy recognizes the
change. If you exit back to the primary command processor, it returns
to the environment of the primary command processor that was in
effect before the secondary copy existed.

4-28 COMMAND
You can CITY-dev parameter to select a different device (such
use the
as AUX) for input and output. See the description of CTTY later in
this chapter for more information.

You can use the following switches with COMMAND:


Switch Function

/C command. Allows you to enter a command and then


automatically exit back to the primary command
processor after the command is completed. /P is

ignored if you use /C.

You send command to the command processor. The


command is interpreted and executed as if you had
typed it at the system prompt.

/E:nnnnn Specifies a base 10 integer and indicates the number of


bytes to set the environment size. This number must be
between 160 and 32768. It is rounded up to the nearest
paragraph boundary (a multiple of 16 bytes).

/P Causes the copy of the new command processor to


become permanent in memory and it remains active
until you turn off or reboot the system. The second
command processor does not return to the primary
command processor. You must restart MS-DOS to
remove the second command processor. If you use /C,
/P is ignored.

Without the /P switch, the secondary processor


remains resident until you give the EXIT command. If
you use the /P switch, the EXIT command does not
work.

Examples
To load a secondary command processor and have it execute the DIR
command (for drive B), and then exit back to the primary command
processor, type the following and press Enter:

COMMAND /C DIR B:

COMMAND 4-29
To load a new command processor with an environment size of 100
paragraphs and cause it to become permanent in memory, type the
following and press Enter:

COMMAND /E:1600 /P

4-30 COMMAND
COMP External

Purpose
Compares the contents of one file or group of files to another.

Format
[d:] Qpat.fr] COMP [d:] [patfr] [ filename ]
[d:] [patfr] [filena/ne]

Description
The COMP command compares single files or groups of files by
examining each byte of information. The files can be in the same
directory or in different directories on the same or on different disks.

Note
Use COMP if you just want to know if the files are the same. If you
want more detailed information about the files, you may prefer to use
the FC command.

If you do not enter any parameters in the command, COMP displays


prompts on the screen for information about the two files to be
compared.

If the filesyou want to compare are not on the same disk as COMP
type the COMP command without any parameters. The program then
prompts you for the filenames, and you can insert the proper diskette.

If the two files to be compared are not the same size, COMP displays
the following prompt and stops the comparison:

Files are different sizes

Compare more files (Y/N)?


You cannot compare two files that are not the same size.

When the program finds bytes that do not match, it displays a message
such as the following.

COMP 4'31
Compare error at OFFSET 10
File 1 = 48

File 2 = 71

This error message gives the hexadecimal location (the offset) and the
value of bytes that do not match. After finding 10 unequal
comparisons, COMP quits and displays this message:
10 Mismatches - ending compare

If the files are identical, COMP displays this message:


Files compare ok

If you comparing more than two files, the next pair matching the
are
filename specification are compared. When COMP finishes comparing
all the specified files, it displays this message:

Compare more files (Y/N)?

Press Y if you want to compare more files — the program prompts you to
enter the filenames, etc.— or press N to exit the program.

For all comparisons, COMP looks at the last byte of the files to verify
that they contain a valid end-of-file mark (Ctrl Z). If it does not find this
mark for a file, COMP displays this message:
Eof mark not found

Examples
To compare all files with the extension .TXT on drive A with files on
drive B with the same names, type the following and press Enter:

COMP A:*. TXT B:

To compare a named JUNEMEMO with a


file named JULYMEMO file

in the WORDPROC directory on drive C, type the following and press


Enter:

COMP C:\W0RDPR0C\JUNEMEM0 C:\W0RDPR0C


\ JULYMEMO

4-32 COMP
COPY Internal

Purpose
Copies one or more files to the same or to another disk and optionally
renames or merges them.

Format
COPY [d: ] [path] filename [d: ] [path] [ filename
[/A] [/B] [/V]

COPY [d: ] [path] filename +


[[d:][path]filename [. .]] .

[d:][path]filename[/ A] [/B] [/V]


COPY [d:][path] filename +,

Description
There areseveral ways to use the COPY command to copy files. You
can do any of the following:

• Copy individual files from one disk to another or to the same disk

• Copy a group of files using wildcard characters

• Copy one or more files under new names

• Copy files to any system device

• Combine or merge files into one file with each file starting at the
end of the preceding file.

If you want to copy files including subdirectories, use either the


BACKUP or XCOPY command. COPY only copies files from the
current or specified directory.

To copy files—In the first COPY format above, the first file
specification is the source file and the second one is the destination file.
If the source and destination files are in the current directory, you need
not specify a complete path; simply specify the filenames.

COPY 4-33
The source fileand the destination file must either be on different
directories or have different names. If you try to copy a file without
specifying a different directory or a different filename for the destination
file, the copy stops and the screen displays an error message.

COPY dl: path \ filename d2: copies the original file to the drive

you designate and retains the original filename.

COPY d:path \ filenamel filename2 copies the original file to

a file on the default drive, using the new filename you specify.

COPY d:path \ filenamel d filename2 copies : the original file

to the drive and filename you specify.

COPY d:path\ filename device copies a file to a device. Use this

format to print a file on the printer, send commands to the printer, or to

transfer data to any system device.

use the wildcard characters to copy groups of similar files. The


You can
command COPY * . TXT B : copies all files with the TXT extension
from the default drive to the disk in drive B.

You can use three switches with COPY:

Switch Function

/A Selects ASCII (text) mode

/B Selects Binary (program) mode

/V Selects Verify mode

The /A and /B switches apply to the file specification immediately

preceding itand to all remaining file specifications on the command


line, until you enter another /A or /B switch. You can enter the /
and /B switches before the first filename.

Use /V to select Verify mode. MS-DOS then verifies that the sectors

are recorded properly during the COPY process. This is the same check
that results from the VERIFY ON command. However, /V is effective

only during the specified COPY command.

4-34 COPY
Use /A to select ASCII mode, which indicates that you are processing
ASCII, or text, files. When you use / A with a source file specification,

the copy includes data but does not include the first end-of-file mark (in
EDLIN, this is Ctrl Z). The remainder of the file does not copy. When
you specify a destination file, the /A switch adds an end-of-file character
as the last character of the file.

Use /B to select Binary mode, which indicates that you are processing
binary, or program, files. When you use /B with a source file

specification, the copy contains the entire file, including any end-of-file
mark. When you specify a destination file, the /B switch does not add
an end-of-file character.

To merge files — Use the second COPY format above to merge files.
Type any number of filenames separated by plus signs ( + ). For example,
the following command combines three files into a new file called
newfile

COPY filel+file2+file3 newfile


You can use wildcards to combine several files. The command
COPY * ext newfile combines all files with the specified extension
.

into a file called newfile.

You can also use wildcards and file extensions to combine the files and
create additional files.

To update without copying— Use the third COPY format above to


update the date and time of the file without copying it anywhere:

COPY filename +,

Caution
Do not try to merge files if one of the source filenames has the same
if ALL.LST already exists, do
extension as the destination. For example,
not use the command COPY * LST ALL LST. MS-DOS overwrites
. .

the original ALL.LST on the destination diskette and detects this error
only when the copy is complete.

COPY 4-35
Examples
To copy all files from drive A to drive B, type the following and press
Enter:

COPY A:*.* B:
To copy all .TXT files in the specified path to the root directory of the
hard disk, type the following and press Enter:

COPY A \WORDPROC\BUSINESS\ INTERNALS TXT


: .

C:\
To copy the file 620.TXT (in the \ELECMAIL\IN directory) to the
\WORDPROC\PERSONAL directory, type the following and press
Enter:

COPY \ELECMAIL\IN\620.TXT \W0RDPR0C


\PERS0NAL
To print the textfile EPSON.TXT on your printer, type the following

and press Enter:

COPY A -EPSON.TXT PRN

To update the date and time of the textfile STATUS.TXT without


copying it, type the following and press Enter:

COPY STATUS.TXT +,

4-36 COPY
CTTY Internal

Purpose
Changes the input/ output device.

Format
CTTY device

Description
Use Cl l Y to change the device you are using. You can direct input
and output to the following devices:

Device Description

AUX An auxiliary device, such as a printer or disk drive


connected to the RS-232C serial port

CON The console, which represents input from the keyboard


and output to the monitor screen

PRN . A printer connected via the printer port


NUL A non-functional device (useful during program
development)

LPT1 Line printer 1, the same as PRN


COM1 Communications port 1, which is your serial port, the
same as AUX

You can specifyLPT2, LPT3, and COM2, COM3, and COM4 as long
as that device is installed in or connected to the system.

You can use printers as output devices only. You cannot use a printer for
input.

Caution
Once you use CTTY, input is no longer accepted from the keyboard
and you would have to reset the computer. Therefore, use the CTTY
command in a batch file. Remember to include CTTY CON at the end
of your batch file to return control to the keyboard.

CTTY 4-37
Examples
To direct all command output from the current device (the keyboard),
to the AUX port (which may be a printer), type the following and press
Enter:

CTTY AUX
To direct all command input and output back to the keyboard and
monitor, type the following and press Enter:

CTTY CON
Here is an example of a batch file you can create, directing output to
the printer and then back to the screen:

REM This is printed on the screen.


CTTY PRN
REM This is output to the printer.
CTTY CON
REM This is output to the screen again.
With CTTY, you can use your computer as a terminal for another
computer. Connect the two computers via the RS-232C serial port
(device name AUX), and make sure the signal parameters match
properly with the MODE command. Then use the command CTTY
AUX to input and output all commands from the other computer. The
command CTTY CON, entered from the other computer, moves all
command output back to the keyboard of your computer.

4-38 CTTY
DATE Internal

Purpose
Displays and/ or sets the system date.

Format
DATE [ mm-dd-yy]
DATE [dd-mm-yy']
DATE [,
yy-mm-dd ]

Description
Whenever you create a new file or alter an existing one, MS-DOS
records the date and time with that file in its directory. You can use the
DATE command to display the current date or set a new date for the
system. The file directory then records this date on all files that are
created or modified.

This command updates the CMOS date if your computer contains a


real-time clock.

You can display the current system date by typing DATE and pressing
Enter. If you are using the United States country code, a message
similar to this appears:

Current date is Tue 3-15-88


Enter new date (mm-dd-yy) :

For other countries, the month and day are reversed or the year may
come first. (The way the current date displays depends on which
COUNTRY command is included in the CONFIG.SYS file. United
States is the default setting.)

PressEnter if you do not want to change the current date. Or, enter a
new date and then press Enter. MS-DOS returns to the command
prompt.

DATE 4-39
Enter the date using numbers only. You need not enter the day of week.
The numbers must be in the following ranges:

® mm must be from 1 to 12

• dd must be from 1 to 3

• yy must be from 80 to 99 or from 1980 to 2099.

You can separate the month, day, and year entries with hyphens (-),
slashes (/), or periods ( . ).

MS-DOS updates months and years correctly, whether the month has
31, 30, 29, or 28 days. MS-DOS also accommodates leap years.

Examples
To set the date for April 20, 1988, you can type any one of the following
(using the U.S. format):

4 / 20/88 04 / 20/88
4 / 20/1988 04 / 20/1988
4 - 20-88 04 - 20-88
4 - 20-1988 04 - 20-1988
you have used the COUNTRY = United Kingdom in the
If

CONFIG.SYS file, you would type the date in one of these formats:

20 / 4/88
20 - 4-1988
20 4.88
.

4-40 DATE
DEL Internal

Purpose
Deletes a file or group of files.

Format
DEL [d: ] [path ] filename

Description
Use DEL to delete one or more files. (You can type ERASE instead of
DEL.)

DEL filename deletes the specified file from the current directory.

You can use the wildcard characters (?and *) to delete groups of similar
files. The command DEL * . ext deletes all files with the specified
extension from the current directory on the default drive.

You can delete all files from a directory or disk by using wildcard
characters for the filename and extension. Type DEL * . * and you see
this prompt:

Are you sure (Y/N)?

Press Y and Enter to delete all files in the current directory. Press N and
Enter to cancel the DEL command.
If you enter a pathname but no filename in the command, MS-DOS
assumes you want to delete all the files in the specified path. Since this is

the same as entering * . #, you see the same prompt and have an
opportunity to cancel the command.

DEL and ERASE delete files only. You cannot delete a directory with
these commands. To delete a directory, use the RMDIR command.

You cannot delete a file that is marked as read-only.

Cautions
Be sure you no longer need a file before you delete it.

Be careful when using DEL after using ASSIGN, JOIN, or SUBST.

DEL 4-41
Examples
To delete the file SEEME from the current directory on the default
drive, type the following and press Enter:

DEL SEEME
To delete all files on drive B with a .BAK extension, type the following
and press Enter:

DEL B * BAK
:
.

To delete a file named JUNSALES from EXTERNAL the subdirectory


(in the \WORDPROC\BUSINESS\EXTERNAL directory) on drive
C, type the following and press Enter:

DEL C \WORDPROC\BUSINESS\EXTERNAL\ JUNSALES

4-42 DEL
DIR Internal

Purpose
Lists the files in a directory.

Format
DIR [d: ] path ] filename ] [/P] [/W]

Description
Use DIR to display a list of the files in a directory. You can display the
entire directory or a portion of the directory.

The information DIR displays includes the filename and extension, the
size (in bytes),and the date and time the file was last modified. The
directory listing also displays the volume identification and the amount
of free space left on the disk.

The following is an example of how a DIR command displays a file

named AUTOEXEC.BAT:

AUTOEXEC BAT 54 5 - 23-88 15:33


I date and time the file

filename was last altered

extension size of file in bytes

Note that the format for date and time is dependent on the
COUNTRY command set in your CONFIG.SYS file. See Chapter 6,

Configuring Your System, for information on the CONFIG.SYS file.

Directory names are identified by (DIR) in the file size field.

You can use the wildcard characters ? and * in the filename. For
example, the following DIR commands are equivalent:

Command. Equivalent

DIR DIR #.*


DIR LETTER DIR LETTER.*
DIR .INV DIR * INV .

DIR 4-43
You can specify two switches with DIR:

Switch Function

/P Selects Page mode. The directory display pauses when


the screen is full;press any key to display the next
screen.

/W Selects Wide display. The screen displays five filenames


per line but no other file information. Use this switch
for 80-column displays only.

Examples
To list all filesand any subdirectories in the current directory on the
default drive one screen page at a time, type the following and press
Enter:

DIR /P
To list all files and directories on drive B, type the following and press
Enter:

DIR B:
To list all the files in the SALES directory on the default drive, type the
following and press Enter:

DIR \ SALES
To list a file named DEVST.MT on drive A, type the following and
press Enter:

DIR A: DEVST.MT
To list all files with a .COM extension in wide display, type the following
and press Enter:

DIR *.C0M /W
To list all files in the current directory whose names begin with MEMO
followed by a single character that varies, type the followiong and press
Enter:

DIR MEMO?

4.44 DIR
DISKCOMP External

Purpose
Compares the contents of two diskettes.

Format
[d:] [path]DISKCOMP [dl: [d2:]] [/ 1] [/8]

Description
Use DISKCOMP to compare sectors on one diskette with those on
another diskette. An examination by sector tells whether the diskettes
are exactly alike. Use DISKCOMP with diskettes only. You cannot
compare a diskette to a hard disk.

Note
Use this command to compare entire diskettes. To compare files, use the
COMP or FC command. You can also compare diskettes using the
Epson MENU utility. See Chapter 5 for instructions.

The order in which you specify drives sets the order for reading and
comparing. The diskette in the first drive you specify is read, then
DISKCOMP compares the contents of the diskette in the second drive
to those of the first. DISKCOMP then reports at which points the
second diskette fails to match the first.

For example, DISKCOMP A: B : compares the diskette in drive (the A


first disk) with the diskette in drive B (the second disk), displaying on
the screen any differences on the second diskette.

If you are logged onto a hard disk drive, you must include both drive
descriptors in the command, even if you have only one diskette drive.

If you are logged onto a diskette drive and specify only one drive,
DISKCOMP reads the diskette in the specified drive first and then
compares it to the disk in the default drive. For example, if you are
logged onto drive A, typing DISKCOMP B : compares the diskette in drive
B to the diskette in drive A, showing possible differences between the two
diskettes.

DISKCOMP 4-45
Note
The disks you are comparing must be of the same type. You cannot, for

example, compare a 360KB diskette to a 1.2MB diskette or a 720KB


diskette to a 360KB diskette.

If you do not include any drive specifications, DISKCOMP performs its

comparison using only the default drive, prompting you to insert


diskettes one at a time in that drive. DISKCOMP compares the second
diskette you insert to the image read from the first and reports the
differences. Use this procedure if your system has only one diskette
drive.

You can use two switches with DISKCOMP:


Switch Function

/I Compares only one side of each diskette; use for single-

sided diskettes only

/8 Compares only the first eight sectors per track on your


diskettes; use for diskettes originally formatted in eight
sectors per track

DISKCOMP is very handy anytime you want to know the similarity of


two diskettes. You can also use it to check the success of a DISKCOPY
operation.

DISKCOMP automatically determines the number of sides and sectors


per track to compare. The first drive specified determines the type of
comparison that is performed.

Batch files using DISKCOPY can also use DISKCOMP Other batch
files dealing with diskette housekeeping can make frequent use of this
comparison command. Your own operating needs determine just how
you use DISKCOMP

4-46 DISKCOMP
Note
If you compare a diskette with abackup version you made using the
COPY command, you may an error message even though the
receive
two diskettes contain the exact same files. This happens because
although COPY copies the files exactly, they may not be stored in the
same sectors on the two diskettes. The diskettes are identical if you use
the DISKCOPY command to make the backup copy.

Cautions
If you have used ASSIGN to reassign disk drive descriptors,
DISKCOMP may not work properly. Cancel the assignments and then
run DISKCOMP

Do not use DISKCOMP on any drives that are being used in a SUBST
or JOIN command.

This command may not work in a network environment.

Examples
To compare the diskette in drive B to the one in drive A, type the
following and press Enter:

DISKCOMP A: B:
After DISKCOMP loads, it displays the following screen prompts:

Insert FIRST diskette in drive A:


Insert SECOND diskette in drive B:
Press any key when ready...
Put your first diskette in drive A and your second one in drive B. Press
any key to continue.

DISKCOMP reads the format of the particular diskette being checked.


For a 360KB diskette, the screen displays the following:

Comparing 40 tracks 9 sectors per track, 2


side(s)

DISKCOMP 4-47
If DISKCOMP detects any differences, the screen reports each of them
by track and side. For example:

Compare error on side 1 track 4


If DISKCOMP does not find any differences between your diskettes, it

reports:

Compare OK
When the comparison is complete, your screen displays:

Compare another diskette (Y/N)?


Press Y to repeat the procedure, or N to exit to the command prompt. If

you do repeat the procedure, remember that the same drive order
applies in your next comparison.

448 DISKCOMP
DISKCOPY External

Purpose
Copies the contents of one diskette to another.

Format
[d: ] [path] DISKCOPY [dl: \_d2: ] ] [/l]

Description
Use DISKCOPY to copy the contents of the diskette in the source drive
to the one in the destination drive. If you enter DISKCOPY A B the :
: ,

source drive is A, and the destination, or target, drive is B.

Use DISKCOPY to copy diskettes only. You cannot use it to copy a


diskette to a hard disk or any portion of the hard disk to a diskette.

Use this command to copy entire diskettes. To copy files, use the COPY
command.

Note
An easier way to use the DISKCOPY command is through the MENU
utility. See Chapter 5 for instructions.

You can specify the same drive as your source and destination drive, or
you can specify different drives. When the source and destination drives
are the same, MS-DOS performs a single-drive copy operation.
DISKCOPY prompts you to insert the diskettes at the appropriate times
and waits for you to press any key before continuing.

If you copy a 360KB diskette in a 1.2MB drive, you may have trouble
reading that diskette in a 360KB drive later. Read “Drive and diskette
incompatibilities” in Chapter 1 for more information.

When the copy operation begins, you see this message when copying a
1.2MB diskette:

Copying 80 tracks
9 Sectors/Track, 2 Side(s)

DISKCOPY 449
DISKCOPY then checks to see if the destination diskette is formatted
and in the same format as the source disk. If not, DISKCOPY formats
the diskette. You see this message:

Formatting while copying


When the copy is complete, you see this message:

Copy another diskette (Y/N)?


Y to make another copy on the same drives.
Press Press N to end the
DISKCOPY command.
Notice that the disk drive descriptors are optional as long as the default
drive is not the hard you omit both, the current drive conducts
disk. If

a single-drive copy operation. If you omit the second disk drive

descriptor, the current drive is also the destination drive. You cannot
give the DISKCOPY command without drive descriptors if you are
currently logged onto the hard disk drive.

Usually, DISKCOPY number of sides


automatically determines the per
diskette to copy, based on the source drive and diskette. For some
applications, however, you must use /I to perform a single-sided
DISKCOPY.

Cautions
Diskettes become fragmented when you create and delete a lot of files.
This is because diskette space is not allocated sequentially. The first free

sector found is the next sector allocated, regardless of its location.

A fragmented disk can cause poor performance due to delays involved


in finding, reading, or writing a file. To eliminate fragmentation, use the
COPY command or XCOPY- instead of DISKCOPY—to copy your
diskette.

Ifyou have reassigned disk drive descriptors with ASSIGN, cancel the
assignments before you run DISKCOPY. Otherwise, you could destroy
data.

Do not use DISKCOPY on any drives that are being used in a SUBST
or JOIN command.

4-50 DISKCOPY
This command may not work in a network environment.

If you copy to a 360KB diskette in 1.2MB drive, you may have trouble
reading the diskette in a 360KB drive.

To copy the contents of a 360KB diskette to a 1.2MB high-density


diskette or from a 720KB diskette to a 1.44MB diskette, use the
COPY command.
Example
To copy two same type with a dual drive system, place
diskettes of the

the source diskette in drive A and the target diskette in drive B. Then
type the following and press Enter:

DISKCOPY A: B:

DISKCOPY 4*51
ERASE Internal

Purpose
Erases a file or group of files.

Format
ERASE [d: ] path ] filename

Description
Use ERASE to erase (delete) one or more files. (You can type DEL
instead of ERASE.)

ERASE filename erases the specified file from the current directory.

You can use the wildcard characters (? and *) to erase groups of si milar
The command ERASE * ext erases all files with the specified
files. .

extension from the current directory on the default drive.

You can erase all files from a directory or disk by using wildcard
characters for the filename and extension. Type ERASE* . * and you
see the prompt:

Are you sure (Y/N)?


Y and Enter to erase all files in the current
Press directory. Press N and
Enter to cancel the ERASE command.

Ifyou enter a pathname but no filename in the command, MS-DOS


assumes you want to erase all the files in the specified path. Since this is

the same as entering * . *, you see the same prompt and have an
opportunity to cancel the command.

ERASE and DEL erase files only. You cannot erase a directory with
these commands. To erase a directory, use the RMDIR command.
You cannot erase a file that is marked as read-only.

Cautions
Be sure you no longer need a file before you erase it.

Be careful when using ERASE after using ASSIGN, JOIN, or SUBST.

4-52 ERASE
Examples
To erase a file named MEMO in the current directory, type the
following and press Enter:

ERASE MEMO
To erase all files on drive B with a .BAK extension, type the following
and press Enter:

ERASE B * BAK :
.

To erase all files from the BUSINESS subdirectory under the


WORDPROC directory on drive C, type the following and press
Enter:

ERASE C:\WORDPROC\BUSINESS

ERASE 4-53
EXIT Internal

Purpose
Exits the command processor and returns to an application program.

Format
EXIT

Description
Use EXIT to exit to the command processor, COMMAND.COM, and
return to an application program.

When you an application program, you may want to return


are running
to the command processor to perform some function. After performing
the function, use the EXIT command to return to the program.

If you have loaded a secondary command processor (with


COMMAND), use EXIT to return to the original command processor.

Note
If you used the /P switch when giving the COMMAND command,
EXIT does not work.

You can use this command only if you are running an application
program that supports it. A number of application programs do so.
Example
To format a diskette in B while in a program that allows you to exit:

1. Leave the program using the appropriate command for the


temporary exit.

2. Change the current drive and directory to the one that contains
FORMATCOM (unless you have set the appropriate path).
3. Type FORMAT B : and press Enter.

4. When the command prompt reappears, type EXIT and press Enter
to return to the application program.

4-54 EXIT
FASTOPEN External

Purpose
Speeds up access to frequently used files and directories on a hard disk.

Format
Id: ] [path] FASTOPEN d: [=nnn] . .

Description
FASTOPEN monitors the location of files and directories on a hard
disk, enabling MS-DOS to find your files faster. This is especially useful
for complex directories or when you run application programs that
require several files to work.

Every time you access a directory or open a file, FASTOPEN records its
name and location in a list in memory. Then, the next time you access
that directory or file, MS-DOS locates it faster because it does not need
to search for it.

FASTOPEN works only on hard disks and does not work over a
network. You can use the program on up to four hard disks at a time.
Repeat the d:=nnn format for each drive you want FASTOPEN to
monitor.

You can give the FASTOPEN command only once after you load
MS-DOS; so be sure to include all the drives you want affected in the
first command. you need to change any of the settings, reload
If

MS-DOS and reenter the command. You may want to include


FASTOPEN in your AUTOEXEC.BAT file.
The nnn is the number of files per disk you want FASTOPEN to keep

track of. The number can be from 10 through 999. If you do not enter a
number, the default is 10.

FASTOPEN requires approximately 40 bytes of memory for each file or


directory it monitors.

FASTOPEN 4-55
Example
To track the location of 150 files on drive C:, type the following and
press Enter:

FASTOPEN C:=150

4-56 FASTOPEN
FC External

Purpose
Compares files on your disk.

Format
[d: ] [pa t£] FC [/A] [/B] [/C] [/L] [/N] [/T] [/W] [/LB a]
[/.n][d: ][patd] filename 1 [d: ][path] filename2

Description
Use FC to compare two files on your disk if you want to know exactly
where they are different. You can output any differences between the
two files to the monitor or to a third file.

Note
If you just want to know if two files are different, you may prefer to use
the COMP (compare) command. It is simpler but does not provide the
detailed information that FC produces. An easier way to use the FC
command is through the MENU utility. See Chapter 5 for instructions.

You can compare either text files or binary files. Text files are files

containing ASCII data. Binary files are those output by the


MACRO'86 assembler, the MS-DOS LINK utility, or by a Microsoft
high-level language compiler.

FC compares files in one of two ways: on a line-by-line or on a


character-by-character basis. A line-by-line comparison isolates blocks of
lines that are different between the two files and prints those blocks. A
character-by-character comparison shows the characters that are
different between the two files in hexadecimal value.

When comparing binary files, FC displays all bytes that differ. When
comparing ASCII files, FC displays the lines that differ unless the
number of consecutive lines that differ exceed the size of the internal
buffer.

FC 4-57
You can use the following switches with FC:

Switch Function

/A Abbreviates the output of an ASCII comparison

/B Forces a binary comparison

/C Does not distinguish between uppercase and lowercase


letters

/L Forces an ASCII comparison

/N Displays line numbers for an ASCII comparison

/T Compresses tabs; normally tabs are expanded to 8 spaces

/W Compresses tabs and spaces

/LB n Sets the internal line buffer to n lines

/n Allows you to specify the number of consecutive lines

to match; the default is 2

When you use /A, only the beginning and ending lines of each set

of differences are displayed. Intermediate lines are represented by


ellipses (...).

Use /B to force a binary comparison of both files. This switch is used


automaticallywhen you compare .EXE, .COM, .SYS, .OBJ, .LIB, or
.BIN The two files are compared byte-to-byte, with no attempt to
files.

resynchronize after a mismatch. The mismatches print as follows:

-ADDRS— FI— F2-


xxxxxxxx yy zz
In this example, XXXXXXXX is the relative address in hex of the pair of
bytes from the beginning of the file. Addresses start at 00000000. The
mismatched bytes are yy and zz from filel and file2, respectively. If one
of the files contains less data than the other, a message appears. For
example, if filel ends before file2, then the following message is
displayed:

*** File2 longer than filel ***

4-58 FC
Use /C to ignore the case of letters so FC treats uppercase and
lowercase letters as equals. Only use /C in source comparisons. With
/C set, these lines are a match:

Much_MORE_data_IS_NOT_FOUND
much_more_data_is_not_ found

Use /L to compare ASCII files. This switch is used automatically when


you compare any non-system files; that is, any files without the .EXE,
.COM, .SYS, .OBJ, .LIB, or .BIN extensions.

Use /N to display line numbers on an ASCII comparison.

Use /T to compress tabs and use /W to compress both tabs and spaces
during the comparison. Only use /W in source comparisons. With /W
set, FC views multiple, contiguous blanks in any line as a single space.

Note that although FC compresses blanks, it does not ignore them. The
two exceptions are beginning and ending blanks in a line, which FC
does ignore. For example (the underscores represent blanks), FC sees all
but the fourth line as matches:

More__data_to_be found
More_ data _ t o_be_ found
More data_to_be found
Moredata_to_be_ found

Ifyou specify both the /W and /C switches, then FC compresses blanks


and ignores case. For example, these two lines match:

DATA_was_ found
data _was_ found
Use /LB n to set the size of the internal line buffer. The default length is

100 lines. If the two files have more than this number of consecutive
differing lines, FC aborts.

Use /n to specify the number of lines that must match for FC to


consider the files a match after it you don’t specify
finds a difference. If
this switch, it defaults to two. Use this switch only in source
comparisons.

FC 4-59
If the files are identical, FC completes the comparison and the
command prompt reappears on the screen. No message appears.

If the files are not identical, FC reports the differences between the two
files you specify by displaying the first filename, the first line that
matches, then the lines that differ between the files, and finally, the last

line to match in both files. FC then displays the name of the second file
along with the first and last line that match. The default for the number
of lines to match between the files is two. (lb change this default, specify
the number of lines with the /n FC continues to list each
switch.)
difference. FC then returns to the MS-DOS command prompt.
FC displays the differences and matches between the two files you
specify on your screen unless you redirect the output to a file. Use the
greater-than symbol (>) to redirect output to the printer or to a file.

The following command compares Filel and File2, and sends the output
to DIFFER.TXT on the default drive:

FC Filel File2 > DIFFER. TXT

4-60 FC
Examples
To understand how FC compares differences, you could store these two
ASCII files on disk:

ALPHA.ASM BETA.ASM
A A
B B
C C
D G
E H
F I

G J
H 1

I 2
M P
N Q
O R
P S
Q T
R U
S V
T 4
U 5
V W
w X
X Y
z Z

To compare the two files and display the differences on the screen, type
the following and press Enter:

FC ALPHA.ASM BETA.ASM

FC does not compress blanks and does not ignore case. Here, two lines
must be the same to constitute a match.

FC 4-61
The screen displays the following (the notes do not appear):

***** ALPHA. ASM


C Note: ALPHA file contains CDEFG,
D BETA contains CG.
E
F
G
***** BETA. ASM
C
G
*****
* * * * * ALPHA. ASM
I Note: ALPHA file contains IMNOP
M where BETA contains IJ12E
N
0
P
* * * * *' BETA. ASM
1
J
1
2
P
* * * * *

* * * * * ALPHA. ASM
V Note: ALPHA file contains VW
W where BETA contains V 45W.
* * * * * BETA. ASM
V
4
5
W
* * * * *

4-62 FC
You can print the differences on the printer using the same two source
files. In this example, four successive lines must be the same to
constitute a match. Type the following and press Enter:

FC /4 ALPHA. ASM BET A. ASM >PRN

The following is output to the printer:

* * * * * ALPHA. ASM
C
D
E
F
G
H
I
M
N Note: P is the first of a string of 4
0 matches.
P
* * * * * BETA. ASM
C
G
H
1
J
1
2
P

* * * * * ALPHA. ASM
V Note: W is the first of a string of 4
W matches.
* * * * * BETA. ASM
V
4
5
W

FC 4-63
The /B switch in the next example forces a binary comparison. You
must type this switch and any other before the filenames in the FC
command line.

To comparison and display the differences on the monitor


force a binary
using the same two source files, type the following and press Enter:

FC /B ALPHA. ASM BETA. ASM

The screen displays the following:

00000009 44 47
00000009 45 48
0000000F 46 49
00000012 47 4A
00000015 48 31
00000018 49 32
0000001B 4D 50
0000001E 4E 51
00000021 4F 52
00000024 50 53
00000027 51 54
0000002A 52 55
0000002D 53 56
00000030 54 34
00000033 55 35
00000036 56 57
00000039 57 58
0000003C 58 59
0000003F 59 5A

fc: ALPHA. ASM longer than BET A. ASM

You can specify a path to locate the files you want to compare. For
example:

FC B:\WORDPROC\BUSINESS\BLUE.TXT
\WORDPROC\BUSINESS\BLUE BAK .

In this case, FC compares BLUE.TXT in the \WORDPROC\BUSINESS


directory of drive B with BLUE.BAK in the same directory.

4-64 FC
FDISK External

Purpose
Creates one or more partitions on a hard disk.

Format
[d:] [pa th] FDISK

Description
Use FDISK to partition a hard disk so it can run the operating system(s)
you want to use. (FDISK stands for “fixed disk,” which is another term
for hard disk.) You can divide your hard disk into as many as four
separate partitions to run four operating systems. If you are using only
MS-DOS, you need only one partition.

Use FDISK to do any of the following:

• Create a primary MS-DOS partition


• Create an extended MS-DOS partition
• Create logical drives within an extended MS-DOS partition
• Change an active partition

• Delete an MS-DOS partition


• Display partition data

• Partition a second hard disk.

WARNING
Use FDISK before storing files on a hard disk. If you already have files

stored on the hard disk, back up these files first or they will be
destroyed. Also, FDISK does not work on drives that have been
reassigned by the SUBST or JOIN command.

FDISK 4-65
Checking the Hard Disk for Partitions
Before you can use a hard disk, it must be partitioned and then

formatted for MS-DOS. Your dealer may have already partitioned your
hard disk and formatted it so it automatically loads MS-DOS when you
turn it on. If this is the case, you do not need to run FDISK.

If you are not sure whether your hard disk has already been prepared
for use, do the following:

1. Turn on or computer without a system diskette in drive A.


reset the

If MS-DOS loads automatically on the hard disk, it is both

partitioned and formatted, and it contains the MS-DOS system


files. If it does not start, the disk may have been partitioned but not

yet formatted for MS-DOS; go on to step 2.

2. If MS-DOS does not start, you need to check whether the disk has
been partitioned. To do this, place the MS-DOS startup (system)
diskette in drive A and press Ctrl Alt Del to start MS-DOS.

3. Next, run FDISK and select the Display Partition Information


option to see if any MS-DOS partitions exist. (See the instructions
below.) If any do exist, the disk has been partitioned. If no
partitions exist, follow the instructions below to partition the disk.

Note
After you have partitioned the hard disk, be sure to format it for

MS-DOS with the SELECT command or with the FORMAT /S


command. For instructions, see the descriptions of these commands
later in this chapter.

Starting FDISK
Follow these steps to run FDISK:

1. Insert the diskette containing FDISK in drive A. (This should be


the startup diskette.)

4-66 FDISK
2. At the A> prompt, type FDISK and press Enter. The screen
displays the FDISK Options menu:

FDISK Options
Current Fixed Disk Drive: 1
Choose one of the following:

1. Create DOS Partition


2. Change Active Partition
3- Delete DOS Partition
4. Display Partition Information

Enter choice: [1]

Press ESC to return to DOS

If your computer has more than one hard disk, a fifth option
appears on the screen:

5. Select Next Fixed Disk Drive

3. Press the number for the option you want and press Enter. Then
see the instructions below for that option.

3.
Creating an MS-DOS Partition
You must create a DOS partition to run MS-DOS on your computer.
But you also can create other partitions on the hard disk. Press 1 on the
FDISK Options menu to select the Create DOS Partition option. Press
Enter. The screen displays the following:

Current Fixed Disk Drive: 1


1. Create Primary DOS Partition
2. Create Extended DOS Partition

If you have created an extended DOS partition, a third option is

displayed:

Create Logical DOS Drive (s) in the Extended


DOS Partition

FDISK 4-67
You must create a primary MS-DOS partition before you can create an
extended MS-DOS partition on the hard disk.

Typically,you need only one MS-DOS partition for your entire hard
disk. You may, however, want to create an extended partition to
designate one or more logical drives for the disk. Follow the appropriate
instructions below for the option you choose.

Note
If your hard disk already contains four partitions and you select option
1 or 2, an error message appears.

Creating the primary DOS partition


Choose option 1 to create the primary MS-DOS partition. You must
create a primary DOS partition before you can create an extended
your computer has two hard disks, only the first one must
partition. If
have a primary partition; on the second disk, you can create only an
extended partition if you wish.

Press 1 and Enter to create a primary MS-DOS partition. The screen


displays the following:

Create Primary DOS Partition


Current Fixed Disk Drive: 1
Do you wish to use the maximum size
for a DOS partition and make the DOS
partition active (Y/N) ? [Y]

Press ESC to return to FDISK Options


If you want the primary DOS partition to occupy the largest space
available up to 32MB, see “Using the entire hard disk for MS-DOS”
below.

If you plan to run another operating system on the hard disk, the
MS-DOS partition cannot occupy the entire disk. See “Using part of
the hard disk for MS-DOS” below.

4-68 FDISK
Using the entire hard disk for MS-DOS
1. To use the entire hard disk for MS-DOS, press Y and Enter. The
screen displays the following message:

System will now restart


Insert DOS diskette in drive A:
Press any key when ready...

2. Press any key to restart the system. You do not have to insert any
MS-DOS diskette is already in drive A.
diskettes because the Your
computer reloads MS-DOS and the screen displays the date
prompt.

3. Enter the date and time if necessary, or just press Enter. The system
creates the MS-DOS partition and the A> prompt reappears.

Before you can use the MS-DOS partition, you must format it with the
SELECT or FORMAT /S command. See the documentation for your
hard disk and the command descriptions in this chapter.

This procedure does not use the entire disk if its capacity is greater than
32MB. To use the rest, run FDISK again to create an extended partition.

Using part of the hard disk for MS-DOS


To have more than one partition on the hard disk, with one of them
being MS-DOS, press N and Enter at the Create Primary DOS

Partition prompt. The screen displays information such as the following:

Total disk space is 977 cylinders.


Maximum space available for partition
is 770 cylinders.

Enter partition size [770]

No partitions defined.
Press Esc to return to FDISK options

FDISK 4-69
The on the hard disk is measured in cylinders, or tracks.
space available
This menu shows number of cylinders available for a hard disk
the total
partition and prompts you to enter the desired size, in cylinders. Any
part of this total amount that you do not use for the primary partition
can be used for the extended MS-DOS partition or another operating
system.

To accept the default maximum value (770 in this case), press Enter. To
select a different size, type the number and press Enter.

When you create the primary partition this way, FDISK does not
automatically make the MS-DOS partition (When the MS-DOS
active.
partition is active, it loads automatically from the hard disk whenever

you turn on or reset the computer.) To make the MS-DOS partition


active, see “Changing the Active Partition,” below.

The procedure creates the primary MS-DOS partition, but you must
then do the following before you can load MS-DOS from it:

• Change the active partition.

• Exit the FDISK program.


• Format the MS-DOS partition with the SELECT or FORMAT
command.

• Copy the MS-DOS files to the hard disk.

Creating an extended DOS partition


You must create a primary DOS partition before you can create an
extended partition. If your computer has two hard disks, only the first

one must have a primary partition; on the second disk, you can create
only an extended partition if you wish.

4-70 FDISK
Choose option 2 from the Create DOS Partition menu to create an
extended MS-DOS partition. The screen displays the following:

Create Extended DOS Partition

Current Fixed Disk Drive: 1

Partition '

Status Type Start End Size


C: 1 A PRI DOS 1 770 770
Total disk space is 977 cylinders.
Maximum space available for partition
is 207 cylinders.

Enter partition size : [ 207]

Press ESC to return to FDISK Options

Enter the number of cylinders you want to be the size of the extended
partition and press Enter. maximum size you can make the
(The
partition is the number displayed as the maximum space available for
the partition.) The screen then displays the status of your primary and
extended partitions, for example:

Partition Status Type Start End Size


C: 1 A PRI DOS 1 770 770
2 EXT DOS 771 977 207
Extended DOS partition created

Press ESC. The screen displays the following:

No logical drives defined

Total partition size is 207 cylinders

Maximum space available for logical


drive is 207 cylinders.

Enter logical drive size : [ 207]

Press ESC to return to FDISK Options

FDISK 4-71
See the instructions below to create logical drives in the extended
partition.

Creating logical drives in the extended MS-DOS partition


When you create an extended partition, MS-DOS lets you create
additional logical drives on that part of the hard disk. You do this by
assigning drive letters (from D through Z) to each of the logical drives
you want.

To create logical drives in the extended partition, choose option 3 from


the Create DOS Partition menu. The screen displays a menu such as
the following:

Create Logical DOS Drive (s)

No logical drives defined


Total partition space is 328 cylinders.
Maximum space available for logical drive is
328 cylinders.
Enter logical drive size [328]

You can make the entire partition one logical drive if it is less than
32MB in size or you can divide it into two or more drives. This is useful
if you want to isolate a particular application program and its data files
in a separate logical area (drive) in the partition.

You should assign all the cylinders in the extended partition to a drive
or drives; otherwise you will not be able to access all of the available
disk space in the extended partition.

After you have assigned a drive (or drives) for all of the extended
partition, FDISK displays this message:

All available space in the Extended DOS


partition is assigned to logical drives.
Press ESC to return to the main FDISK menu. From there, you can
restart MS-DOS or select another option.

4-72 FDISK
Changing the Active Partition
Although your hard disk can have as many as four partitions, only one
can be active. The active partition takes control of your computer each
time you turn it on or reset it. If your hard disk has more than one
partition, you can choose which one should be active.

A partition can be active only if it contains an operating system. You


cannot make an extended MS-DOS partition active. If your computer
has two hard disk drives, be sure to place any partition containing an
operating system on the first hard disk; a partition on the second drive
cannot be active.

1. Press 2 on the FDISK Options menu to select the Change Active


Partition option. Press Enter.

The Change Active Partition screen appears. For example, if you


have created primary and extended DOS partitions, it might look
like this:

Change Active Partition

Current Fixed Disk Drive: 1


Partition Status Type Start End Size
C: 1 A PRI DOS 1 770 770
2 EXT DOS 771 977 207
Total disk space is 977 cylinders

Enter the number of the partition you


want to make active :[ ]

Press ESC to return to FDISK Options

The column headings represent the following:

Partition—The number assigned to the partition.

Status —Whether the partition is active (A) or not.

Type—Whether the partition is a DOS partition or a non-DOS


partition.

FDISK 4-73
—The starting cylinder number of a partition.
Start

End—The ending cylinder number of a partition.


Size—The partition measured in cylinders.
size

2. Type the number of the partition that you want to designate as


active and press Enter. For example, to make the DOS partition
active, press 1 and then Enter.

3. Press ESC to return to the FDISK Options menu.

Deleting an MS-DOS Partition


FDISK lets you delete an MS-DOS partition you no longer want. (You
cannot delete a non-MS-DOS partition with FDISK.)

To delete an MS-DOS from the FDISK


partition, select option 3
Options menu. The screen displays the following menu:

Delete DOS Partition


Current Fixed Disk Drive: 1
Choose one of the following:

1. Delete Primary DOS Partition


2. Delete Extended DOS Partition

3. Delete Logical DOS Drive(s) in the Extended


DOS Partition.
Enter choice: [ ]

Press ESC to return to FDISK Options


The third option appears only if logical drives exist in the extended
partition of MS-DOS.

Press the number of the option you want and press Enter. The next
menu shows the status of the partition you selected — either the primary
or the extended partition. See the instructions below for the option you
choose.

4-74 FDISK
Warning
When you an MS-DOS partition, FDISK deletes any data stored
delete
in that partition, and there is no way to recover that data. So be sure to
back up any data you want to keep before you delete a partition.

After you delete an MS-DOS partition, you will not be able to access
that part of the hard disk. When you want to run MS-DOS, you will
need to insert a system diskette in drive A
you delete the primary
if

partition on the first hard disk. Also, if you want to start a different
operating system in another partition, you must change the active
partition before you delete the MS-DOS partition.

Deleting the primary MS-DOS partition


When you select option 1 from the Delete DOS Partition menu, the
screen displays the following:

Delete Primary DOS Partition

Current Fixed Disk Drive: 1


Partition Status Type Start End Size
C: 1 A PRI DOS 1 770 770
2 EXT DOS 771 977 207

Warning! Data in Primary DOS


partition will be lost. Do you wish
to continue ?[N]

Press ESC to return to FDISK Options

Ifyou do not want to delete the primary MS-DOS partition, press N


and Enter.

If you do want to delete the primary MS-DOS partition, press Y and


Enter.

The screen displays this message:

Primary DOS partition deleted

FDISK 4-75
Press ESC to return to the FDISK Options menu.

Note
You cannot delete the primary MS-DOS partition on the first hard disk
if an extended partition exists on the drive.

Deleting the extended MS-DOS partition


Before you can delete the extended partition, you must delete all the
logical drives you have assigned for that partition. (See “Deleting logical
drives in the extended partition” below.)

When you select option 2 from the Delete DOS Partition menu, the
screen displays partition information such as the following:

Delete Extended DOS Partition

Current Fixed Disk Drive: 1

Partition Status Type Start End Size


C: 1 A PRI DOS 1 770 770
2 EXT DOS 771 977 207

Warning! Data in Extended DOS


partition will be lost. Do you wish
to continue ?[N]

Press ESC to return to FDISK Options

Ifyou do not want to delete the extended MS-DOS partition, press N


and Enter.

If you do want to delete the extended MS-DOS partition, press Y and


Enter.

The screen displays this message:

Extended DOS partition deleted

4-76 FDISK
Press ESC to return to the FDISK Options menu.

Note
You cannot delete the primary MS-DOS partition on the first hard disk
if an extended partition exists on the drive.

Deleting logical drives in the extended partition


Before you delete a logical drive in the extended MS-DOS partition, be
sure that there is no data you want to keep stored on the drive. If so,

back up the files to diskettes before deleting the drive.

To delete a logical drive in the extended MS-DOS partition, select

option 3 from the Delete DOS Partition menu. FDISK displays a menu
such as the following:

Delete Logical DOS Drive


Drv Start End Size
D: 771 850 80
E: 851 977 127

Total partition space is 207 cylinders.


Warning! Data in the logical DOS drive
will he lost. What drive do you wish
to delete ? [ ]

Press ESC to return to FDISK Options


Press the letter of the drive you want to delete and press Enter. FDISK
displays the following message:

Are you sure ? [N]

If you are not sure you want to delete the selected drive, press N and
Enter.

If you are sure you want to delete the drive, press Y and Enter. The
information about the specified drive disappears from the screen and the
following message is displayed:

drive deleted

FDISK 4-77
Repeat this procedure for each logical drive you want to delete. Then
press ESC to return to the FDISK Options menu.

Displaying Partition Data


To display information about how the hard disk is partitioned, select
option 4 from the FDISK Options menu. The screen displays
information such as the following:

Display Partition Information


Current Fixed Disk Drive: 1

Partition Status Type Start End Size


C: 1 A PRI DOS 1 770 770
2 EXT DOS 771 977 207
Total disk space is 977 cylinders

The Extended DOS partition contains logical DOS


drives. Do you want to display logical drive
information [Y]

Press ESC to return to FDISK Options

If you have an extended partition, press Y and Enter to display


information about that partition:

Display Logical DOS Drive (s)


Drv Start End Size
D: 771 850 80
E: 851 977 127
Press ESC to return to FDISK Options
Press ESC to return to the FDISK Options menu.

4-78 FDISK
Partitioning a Second Hard Disk
If you have a second hard disk, you can use FDISK to partition it and
to perform all of the functions described above on the second hard disk.

When the FDISK Options menu is on the screen, press 5 and Enter to
choose the Select Next Fixed Disk Drive option. (This option is

available only if your computer contains more than one hard disk.)

FDISK changes the current fixed drive number to 2 and displays the
FDISK Options menu. If you plan to use this disk for MS-DOS, follow
the appropriate instructions above.

FDISK 4-79
FIND External (filter)

Purpose
Searches for a specific string of text within one or more files.

Format
" "
[d: [path] FIND [/C] [/N] [/V] string
[ [ d ] [path]
:
filename. .
.]

Description
Use FIND to locate alloccurrences of a particular string in a directory
or in each of the files you specify. FIND is called a filter because it reads
data from a standard input device, filters out the string that matches
your specification, and then writes the result to a standard output
device. For example, it can display the matching line on your monitor
screen.

FIND does not allow wildcards in the filename.

You can use three switches with FIND:

Switch. Function

/C Prints the number of lines that match the string (or

that don’t match if you use the /V switch)

/N Precedes each line with its relative line number in the

file

/V Displays all lines that do NOT contain the string


Ifyou include both / C and /N in the command, the / C switch
overrides /N.

If you do not enter any switches, FIND displays all lines in the specified

file(s) that contain the string.

4-80 FIND
Type quotation marks around the string. If the text in your string
contains quotation marks, type two quotation marks for each
occurrence. For example, to find the string She said “Goodbye” and
left, type the following:

FIND "She said ""goodbye"" and left"


FIND locates the exact string of characters you specify, so be sure to
type upper- or lowercase you want to find them. If you
letters just as

type uppercase Y, the program does not find lowercase y. The same rule
applies to spaces and punctuation. If FIND does not locate the string
you specify in the file or files you list, it displays just the filenames on
the screen.

Examples
To display all lines from BOOKl.TXT and BOOK2.TXT (in that order)
that contain the string A Day in the Life, type the following and press
Enter:

FIND "A Day in the Life" BOOKl.TXT B00K2.TXT

To display the filenames on drive B that do not contain the string DAT,
type the following and press Enter:

DIR B: i
FIND /V "DAT"

To display all subdirectories of the current directory, type the following


and press Enter:

DIR |
FIND "<DIR>"

You can include special characters in the string without redirecting


input or output.

FIND 4-81
FORMAT External

Purpose
Formats the disk in the specified drive to accept MS-DOS files.

Format
[d ;
] [path] FORMAT d: [/B] [/S] [/V] [/l] [/4] [/8]
[/N:nn][/T:nn]

Description
Use FORMAT to format your disks for use with MS-DOS.

Note
An easier way to use the FORMAT command is through the MENU
utility. See Chapter 5 for instructions.

Formatting initializes the directory and file allocation tables and


analyzes the disk for any defective tracks. All new disks must be
formatted before you can use them with MS-DOS.

Warning
FORMAT erases any data stored on a disk, so be sure to back up any
files you want to keep before you format a disk that contains data.

You can use this command on your hard disk. However, the SELECT
command has been designed specifically for formatting the hard disk.
On a hard disk, formatting destroys the entire contents of any existing
MS-DOS partition, including all subdirectories and files.

You must specify a drive descriptor when you use the FORMAT
command. If you do not, you see this message:

Drive letter must be specified

4-82 FORMAT
You can use the following switches with this command. If you do not
use any switches, the default parameters for FORMAT are no system
files, the maximum available sectors, and two sides.

Switch Function

/B Reserves space on an 8-sectored diskette for the system


files (which you copy later with the SYS command).
This switch allows you to place any version of
MS-DOS on the diskette; without the /B switch, you
can place only version 3.3 on the diskette.

/S Copies the operating system files from the disk in the


default drive to the newly formatted disk.

/V Causes FORMAT to prompt you for a volume label for


the disk you are formatting. A volume label can be up
to 1 1 characters long.

/I Formats only one side of a 5 '4-inch diskette for single-

sided use.

/4 Formats a 5 '4-inch, 360KB double-density diskette in a


1.2MB high-density drive.

/8 Formats a diskette with 8 sectors per track.

/T:nn Specifies the number of tracks on the diskette to be


formatted. Use this switch when you want to format a
diskette for less than the maximum capacity supported
by the disk drive. For a 360KB diskette, nn is equal to
40. For a 720KB or 1.2MB diskette, nn is equal to 80 or
40.

/N:nn Specifies the number of sectors per track if you want to


format a diskette to use less of the maximum capacity
allowed by the disk drive. For a 360KB diskette, nn is

equal to 9 or 8. For a 1.2MB diskette, nn is equal to 15,


8, or 9.

FORMAT 4-83
You can use the following switches with the specified disk types:

Disk tyt>e Parameters allowed

160/ 180KB /B, /S, /V, /l, /4, /8, /N, /T


320/360KB /B, /S, /V, /l, /4, /8, /N, /T

720KB /S, /V, /N, /T

1.2MB /S, /V, /N, /T

1.44MB /S, /V, /N, /T

Hard Disk /S,/V

If you use the /S switch, FORMAT copies the operating system files

from the disk in the default drive to the target disk. If the system does
not have enough memory to store the files, it copies as many as it can
to memory, formats the and then copies the files in memory
target disk,
to the disk. Then it reads the remaining
files from the source disk to

memory and copies them to the target disk. If you have removed the
source diskette from the drive, the program prompts you to reinsert it
before continuing.

Ifyou use the /V switch, FORMAT prompts you for a volume label.
The label can be up to 1 1 characters long, and must comply with the
same rules defining valid file names. You do not need to type a period
( ), however, as you do before an extension to a filename.
.

The FORMAT program formats the diskette according to the format of


the diskette drive and any switches you have entered in the command.
Ifyou format a single-sided diskette, be sure to include the /I switch;
otherwise, you will not be able to use the diskette in a single-sided drive.

Do not use the /N or /T parameters if you are formatting the hard


disk.

The FORMAT program marks any defective tracks as reserved. These


reserved tracks are not allocated to data files.

4-84 FORMAT
FORMAT produces a status report that lists the total disk space,
defective disk space, space allocated to MS-DOS system files, and the
amount of space available for your files.

Formatting a hard disk


Ifyou want to use the FORMAT program to format a hard disk, be
sure you have first used FDISK to create the MS-DOS partition. If you
later change the MS-DOS partition with FDISK, you will need to run

FORMAT again for the new partition.


When you format a hard disk, the FORMAT program prompts you for
the volume label:

Enter current Volume Label for drive d:

If your hard disk does not have a volume label, press the Enter key.

Note
If the hard disk has never been formatted or if it has a bad boot sector,

FORMAT does not prompt you for the volume label.

If the volume label you enter does not match the label for the disk, the
screen displays the following message:

Invalid Volume ID Format failure

After you enter the proper volume label, this message appears:

WARNING, ALL DATA ON NON-REMOVABLE DISK DRIVE


d WILL BE LOST!
Proceed with Format (Y/N)?
If you want to format the hard disk, press Y and Enter. If not, press N
and Enter.

Cautions
Ifyou have reassigned disk drive descriptors with ASSIGN, cancel the
assignments before you run FORMAT. Otherwise, you could destroy
data.

FORMAT 4-85
Do not use FORMAT with any drives that are currently used in a JOIN
or SUBST command.

This command may not work in a network environment.

The /4 switch allows you to use a 360KB, double-density diskette in a


1.2MB, high-density drive. If you write to this disk in a 1.2MB drive,
however, you may have trouble reading or writing to it 360KB
in a
drive.

Examples
To format a diskette in drive B using all default values, type the
following and press Enter:

FORMAT B
You see the prompt:

Insert diskette for drive B:


and strike ENTER when ready

Insert the diskette you want to format in drive B and press Enter to
start formatting. As MS-DOS formats the diskette it displays head and
cylinder numbers:

Head: h Cylinder: c

When the diskette is formatted, you see this message:

Format complete
xxxxxx bytes total disk space
xxxxxx bytes available on disk
Format another (Y/N)?
Press Y and Enter to format another diskette or press N and Enter to
leave the program.

"Io format a system disk on drive A and specify a volume label, type the
following and press Enter:

FORMAT A.-/S/V

4-86 FORMAT
The system displays the following prompt for the volume label:

Volume label (11 characters, ENTER for


none) ?

To format the hard disk (after you have partitioned it with FDISK), type
the following and press Enter:

FORMAT C:/S/V
The screen prompts you to enter the current volume label (if there is

one) or enter a new one. Then the program formats the hard disk and
copies the system files to it.

FORMAT 4-87
GRAFTABL External

Purpose
Loads a graphics table into memory to enable display of graphic
characters in color/graphics mode.

Format
Id: ] [path GRAFTABL
'] [m] [/STATUS]
Description
If your computer has a color/graphics adapter, you can use the
GRAFTABL command to display ASCII characters with decimal values
above 127 in graphics mode. GRAFTABL loads a special graphics
character generator into memory so you can access these characters
when you are using special application software or a programming
language such as BASIC. You do not need to load this table if you are
not in graphics mode.

If you also include one of the following code page numbers, you can
access characters in that international language character set:

437 United States — English


850 Multilingual
860 Portugal
863 Canada— French
865 Nordic

The default is 437 (the United States). After you enter the GRAFTABL
command, the screen displays a message such as the following:

USA version of Graphic Character Set Table


has just been loaded.

To display the number of the code page currently being used, include
the /STATUS switch.

4-88 GRAFTABL
Once it is loaded, GRAFTABL remains in memory until you turn off or
reset the computer. You can access any of the graphics or national
language characters through the application software or programming
language you are using.

Load the graphics table only once each session. If you give the
command a second time, the following message appears:

USA version of Graphic Character Set Table is


already loaded
You may want to include GRAFTABL in your AUTOEXEC.BAT file
so the table loads automatically every time you boot the system, or
include it in a batch file for an application or programming diskette.

This command increases the size of MS-DOS in memory by 1KB.

Examples
To load the graphics character table, type the following and press
Enter:

GRAFTABL
To load the French Canadian version of the graphics table, type the

following and press Enter:

GRAFTABL 863
To display the number of the code page currently in effect, type the
following and press Enter:

GRAFTABL /STATUS

GRAFTABL 4-89
GRAPH24 External

Purpose
Enables printing of screen graphics on a 24-pin or laser printer when
you are using a color graphics adapter.

Format
[d:] [pa th]GRAPH24 [/R]

Description
The GRAPH24 command is exactly like the GRAPHICS command
except that itsupports 24-pin printers and you cannot use the /B
switch. If you have a 9-pin printer, use the GRAPHICS command. If
you have a 24-pin printer, use GRAPH24.
You can use GRAPH24 with a laser printer that supports 24-pin mode,
such as the Epson GQ-3500.

For detailed information on GRAPH24, see the GRAPHICS command,


next in this chapter.

4-90 GRAPH24
GRAPHICS External

Purpose
Enables printing of screen graphics when using a color/ graphics adapter.

Format
[d: ] [path] GRAPHICS [priater][/R][/B][/P=port][/LCD]

Description
Use GRAPHICS to make exact printed copies of the image on your
screen on GRAPHICS loads, the
a graphics-compatible printer. After
command prompt reappears on the screen. GRAPHICS is now in

memory, and you can use it whenever necessary. GRAPHICS stays in


memory until you reset or turn off the system.

Note
GRAPHICS supports 9-pin printers but not 24-pin printers. If you have
a 24-pin printer, use the GRAPH24 command instead.

Specify any one of the following for printer (if you do not specify a

printer, GRAPHICS defaults to the IBM® Graphics Printer):

Printer Installed Printer

COLOR1 IBM Color Printer with a black ribbon

COLOR4 IBM Color Printer with a red, green, blue, and black
ribbon

COLOR8 IBM Color Printer with a cyan, magenta, yellow, and


black ribbon

COMPACT IBM Compact Printer


COLOREPS All Epson color printers

GRAPHEPS Epson printers that support Esc * to specify bit-image


mode. This is the mode suggested for use with
Hercules® graphics

GRAPHICS 4-91
You can use the following switches with GRAPHICS:
Switch Function

/R Prints exactly what is on the monitor: black as black


and white as white. If you do not specify /R, black
prints as white and white as black. (Other colors are
not affected by this switch.)

/B Prints the background color (certain color printers


only).

/P -port Selects the parallel printer port to which you want to


send the graphics when you press Shift PrintScreen.
The port may be set to 1, 2, or 3; the default is 1.

/LCD Prints the screen image from the LCD screen of a


portable computer.

You need to enter the GRAPHICS command only once after booting
the system. To print the image you see on your screen, just press Shift
Print Screen (or PrtSc). If you have an enhanced keyboard, you need
to press only Print Screen.

If the computer is in 320x200 color graphics mode, and if the printer


type is COLOR 1 or GRAPHICS, GRAPHICS prints the screen
contents with up to four shades of gray. If the computer is in 640x200
color graphics mode, GRAPHICS prints the screen contents sideways.

To enable GRAPHICS printing, your system’s monitor must be in


graphics mode. You can enter graphics mode through an application
such as a window program or from BASIC. Text mode displays do not
copy graphically, but print from the ordinary character set.

include the GRAPHICS command in a batch file, such as


You can
AUTOEXEC.BAT. GRAPHICS increases the size of MS-DOS in
memory by approximately 2KB.

Example
To enable graphics, type the following and press Enter:

GRAPHICS

4-92 GRAPHICS
The screen displays this message:

Resident portion loaded


The following BASIC program uses the graphics screen. Once
GRAPHICS is loaded, start BASIC and enter the program.

100 SCREEN 1
110 CLS
120 FOR K = 10 TO 50 STEP 5
130 CIRCLE (100,100), K
140 NEXT K
Run the program. To print what is displayed on the screen, simply press
Shift Print Screen.

GRAPHICS 4-93
HDCACHE External

Purpose
Enhances the performance of a hard disk by storing the location and
contents of requested sectors in a reserved part of memory.

Format
[d: ] [pa ti}] HDCACHE [Cjj] [En]

Description
HDCACHE makes your hard disk work more efficiently. Each time you
request a new HDCACHE records the sector location of the in
file, file
a special part of the computer’s memory (in the cache buffer) so the next
time you request that file, MS-DOS finds it faster.

When you write (store) a file to disk, HDCACHE updates the


information in the cache buffer to reflect the file’s new location. This
may cause the disk write process to take a little longer, but you typically
read more files than you actually store.

Ifyou enter the HDCACHE command with no parameters, the


program creates a cache buffer in the standard memory area that is

64KB.

You can use these switches with HDCACHE:


Switch Function

Cn Creates a cache buffer in the standard memory, where n


is the size of the buffer in kilobytes

En Creates a cache buffer in the extended memory, where


n is the size of the buffer in kilobytes

Note that you do not need to type the / when entering these switches.

Use the C switch if you want to change the size of the cache buffer in
the standard memory area. The default size is 64KB. The buffer size can
be up to the amount left in memory, less at least 64KB.

4-94 HDCACHE
Use the E switch if you want the cache buffer to be in the extended
memory area. The maximum size for this buffer depends on the size of
the extended memory.

The cache buffer is allocated by tracks, so if you enter a size that is not a
multiple of the track HDCACHE rounds the number up to the
size,

next track size. The size of a track usually 7.5KB, which HDCACHE
is

treats as 8KB.

You can use both switches if you want to create a buffer in both
memory areas to get the most memory for the cache buffer.

In addition to the specified buffers, HDCACHE uses an additional 16


bytes per track in the standard memory area. The program leaves at
least 64KB for other programs, but if there is less than 64KB available in
memory, HDCACHE displays the following error message and then
aborts:

Too small conventional memory

After you load HDCACHE the first time, the program displays the
allocated size of each cache buffer. You can load the program only once
each time you load MS-DOS. However, you can use the command
again, without affecting the current buffers, to display the following
information:

• The size of each cache buffer

• The total number of read requests whose sectors have been read
from the cache buffer*

• The total number of read requests whose sectors have been read
from the hard disk

• The total number of write requests.*

• After displaying this information on the screen, HDCACHE resets these values to
zero.

The program also displays this message when you enter the command
subsequent times:

HDCACHE already installed

HDCACHE 4-95
Caution
Do not use HDCACHE with the IBM version of the VDISK program.
If you do, you will destroy the contents of the extended memory.

Examples
"Io create a 128KB buffer in the standard memory area, type the
following and press EntGr:

HDCACHE C128
To create a buffer that is 32KB in the extended memory area, type the
following and press Enter:

HDCACHE E32
To display information about the existing buffer(s), type the following
and press Enter:

HDCACHE

4-96 HDCACHE
HELP External

Purpose
Provides helpful information on MS-DOS commands.
Format
[d: ] [path} HELP [ command ...]

Description
Use the HELP command to ask for information on any MS-DOS
command or utility progam. This help function provides useful
information but is not intended to be a substitute for this manual.

The two programs that provide HELP information, HELECOM and


HELETXT, must be in the same directory.

Type HELP to see a menu of all the commands. Type HELP followed
by the name of one or more MS-DOS commands, each separated by a
space, to bypass the menu and display the messages for each command.
At the bottom of the menu, you see this prompt:

•‘-Select command name.


Enter to display command. Esc to Exit
Use the cursor keys to select a command. (You can select only one
command name at a time from the menu.) When command
the correct
is highlighted, press Enter. The help screen for the command appears.
If there is more than one page of text, you see the prompt PgUp on the
top of the screen. Press Page Up to display the rest of the text. After
reading the help information, press ESC to return to the menu.

If you type HELP and one or more command names on the command
line, the help information for the command appears. Press ESC to
first

see the help information for the next command. When you press ESC
after viewing the information for the last command, MS-DOS redisplays
the command prompt.

HELP 4-97
JOIN External

Purpose
Joins % drive and all its files to a directory on another drive.

Format
[d:] [path] JOIN [dl: d2:\ directory]
[d: ] [path] JOIN d:/D

Description
This command joins a drive to a directory on a different drive to create
a single directory structure. With JOIN you can refer to all directories
on a specific drive with one path name.

When using application software that does not take advantage of the
MS-DOS file handling features, you may have to change the current
drive in order to access files from a different drive. For example, to use a
separate hard disk or RAM disk for storing files, you must log on to
these drives before they can be used. Using the JOIN command
eliminates the need to change the current drive.

In the command format above, dl is the drive to be connected, or


joined, to a directory on another drive.

d2:\directory is on the second drive to be joined to the first


the directory
drive. This directory must be empty and must be in the root directory.
Also, this directory must not be the current directory and must have no
subdirectories. All subdirectories of the source directory become sub-
subdirectories in the new directory.

If d2:\directory does not already exist, it is created by JOIN on the


specified drive.

Once you join the two drives, you cannot access the first drive directly.
Use the /D switch to disconnect a join. For example, to restore the first
drive, type the following and press Enter:

JOIN d: /D
You cannot disconnect a join if it is the current directory.

4-98 JOIN
To list all drives that are currently joined, type JOIN only.

Cautions
Do not use JOIN when the drive being joined is part of a SUBST or an
ASSIGN command.
Do not use BACKUP DISKCOMIJ DISKCOPY, FORMAT,
RESTORE, or SELECT while a JOIN is in effect.

This command may not work in a network environment.

Example
Assume these directory structures exist for drives A and D:
A:\ D:\

APP1 APP2 FILES 1 FILES2


l

l l

DOCl.TXT DOC2.TXT

To use an application program located in APP1 of drive A while storing


your files in FILES 1 of drive D, you can use the JOIN command. First
copy the JOIN command to your application diskette and insert it in
drive A. Type the following and press Enter:

JOIN D: A:\DRIVED
Now, anytime you refer to the directory \DRIVED\FILES 1 on drive
A, all disk activity takes place in FILES 1 on drive D without having to
change the current drive.

If you type DIR NDRIVEDNFILES2, you see:

D0C1 TXT
D0C2 TXT
To cancel the effect of the JOIN command on drive D, type:

JOIN D: /D

JOIN 4-99
KEYB External

Purpose
Loads a different keyboard layout into memory.

Format
[d:] [path] KEYB [xx[,[^],[[d:][path]KEYBOARD.SYS]]]

Description
Use the KEYB command to replace the default keyboard layout in your
computer’s memory. This you type the characters that are in these
lets

other layouts instead of those on the default keyboard. By entering a


two-letter code in place of the xx in the command, you can select one of
the following language keyboards:

Keyboard
Country /language code KEYB conn
Australia US KEYB US
Belgium BE KEYB BE
Canada (English) US KEYB US
Canada (French) CF KEYB CF
Denmark DK KEYB DK
Finland su KEYB SU
France FR KEYB FR
Germany GR KEYB GR
Italy IT KEYB IT
Latin America LA KEYB LA
Netherlands NL KEYB NL
Norway NO KEYB NO
Portugal PO KEYB PO
Spain SP KEYB SP
Sweden sv KEYB SV
Switzerland (French) SF KEYB SF
Switzerland (German) SG KEYB SG
United Kingdom UK KEYB UK
United States US KEYB US

4-100 KEYB
Appendix C shows the layouts for these different keyboards. For some
keyboards, you need to press dead keys to add an accent or umlaut to a
character. (See Appendix C.)

To specify a particular code page (national language character set),

include the appropriate code page number in place of the nnn in the
command: 437, 850, 860, 863, or 865. See Chapter 9 and the CHCP
command in this chapter for more information on code page switching.
If you omit this number, KEYB uses the default code page.
You use the MODE command to prepare a code page required by the
new keyboard layout. The keyboard layout and code page must be
compatible. If the keyboard and display do not match, character keys
may not be translated correctly into the correct code page, and
characters may be displayed incorrectly. The following table shows the
valid keyboard/code page combinations.

Code page Keyboard


437 US, UK, FR, GR, IT, SP LA, SV, SU, NL, BE, SF,

SG
850 UK, FR, GR, IT, SP DK, NL, SU, NO, PO, SV, SF,
SG, CF, BE, LA, US
860 PO
863 CF
865 NO, DK
The KEYB command creates translation tables for each code page that
has been prepared at the time you give the KEYB command and
enables the code page you have requested. you want to use a code
If

page that is not in the list of prepared code pages, you need to prepare it

first (with MODE) and then give the KEYB command. (See the
description of MODE later in this chapter.)
Once you load a particular keyboard into memory, it remains there
until you reset or turn off the computer or until you enter the
command to return to the default keyboard. You can switch back and

KEYB 4-101
forth between the default keyboard and the alternate layout with the
following commands:

Ctrl Alt FI - returns to the default keyboard


Ctrl Alt F2 - returns to the alternate
keyboard
When a second keyboard is loaded in memory, it increases the size of
MS-DOS by 6KB.
If you type KEYB without any options, a message such as the following
appears:

Current keyboard code: FR Code page: 437


Current CON code page: 437
Thefile KEYBOARD. SYS contains tables that enable the
KEYB
command to convert scan codes to ASCII characters. The KEYB
command must be able to access this file before it can change the
keyboard layout. If KEYBOARD.SY S is not in the root directory, you
need to include its drive and pathname in the KEYB command to
specify the location of KEYBOARD.SYS.

Note
If you have created your own keyboard, specify its name in place of
KEYBOARD.SYS.

If you use another keyboard layout often, you may want to include the
KEYB command in your AUTOEXEC.BAT file.
If you use the SELECT command to format a disk, MS-DOS creates a
system disk that automatically initiates the keyboard driver you specify.

The KEYB command sets the following exit codes which may help you
perform error-detection batch processing:

0 Normal termination

1 Invalid code page, syntax, or language

2 Missing or invalid keyboard definition file

4-102 KEYB
3 KEYB could not create a keyboard table in resident memory

4 Error occurred while communicating with the CON device


5 Specified code page has not been prepared

6 KEYB could not find the translation table for the selected code
page in the resident keyboard table

Cautions
Because this command changes the keyboard layout, remember that
some keys may be in a new position or not exist at all after loading this
command. See Appendix C for the keyboard layouts.

In addition, be careful how you use application software written in U.S.


format because your keys may send different signals (codes) to your
operating system and application software.

Example
To use the German keyboard, type the following and press Enter:

KEYBGR

KEYB 4 - 103
LABEL External

Purpose
Creates, displays, changes, or deletes a volume label on a disk.

Format
[d:] [pa th~\ LABEL [ d:][volumelabel ]

Description
Use LABEL to identify your disks. The label can be up to 11 characters.

Do not use any of the following symbols as part of your disk label:

•“/MJ: < > + =;,?*!


If you do not specify a disk drive descriptor, MS-DOS assumes you are
labelling the disk in the default drive.

If you type LABEL only and do not specify a volume label, you see this
prompt:

Volume label (11 characters, Enter for none)?


To give the disk a volume label or to change an existing volume label,
type the new label and press Enter. The new label replaces the existing
one.

To delete a volume label, press Enter only. You see the prompt:

Delete current volume label (Y/N)?


Press Y to delete the label, or N to exit without deleting the label.

Cautions
Do LABEL with drives that have been assigned
not use a path name
with SUBST or another drive name with ASSIGN.
This command may not work in a network environment.

4-104 LABEL
Example
To change the volume label of the diskette in drive B to AP DATA,
type the following and press Enter:

LABEL B: AP DATA

To display or erase the volume label WS DATA from a disk in drive B,


type the following and press Enter:

LABEL B:
The screen displays the following:

Volume in drive B is WS DATA


Volume label (11 characters, Enter for none)?
Press Enter. You see the following prompt:

Delete current volume label (Y/N)?

Press Y and Enter if you want to delete the label or press N and Enter
to leave the label.

LABEL 4' 105


MKDIR Internal

Purpose
Creates (makes) a new subdirectory.

Format
MKDIR [d:]pata
MD [d:]pa£b

Description
Use MKDIR to create a subdirectory under the current directory or the
specified directory. When you are in the root directory or one of its
subdirectories, you can use MKDIR to create new subdirectories. If you
do not specify a drive, the current drive is assumed. If your path starts
with a backslash ( \ MS-DOS ), starts its directory search with the root
directory. If you omit the backslash, MS-DOS starts with the current
directory.

Subdirectory names can be up to eight characters in length and can


include all characters except a space or the following:


“ /
M ] : ! < > + = ;,?*
You can any number of subdirectories provided disk space
create is

available. The maximum length of a path name is 64 characters,


including backslashes.

A directory can include file and subdirectory names that also appear in
other directories. Therefore, files having the same name can be stored in
separate directories.

You can abbreviate MKDIR to MD.


Caution
Be careful when you create directories while an ASSIGN, JOIN, or
SUBST command is in effect.

4-106 MKDIR
Examples
To create a subdirectory called PROGRAMS in your root directory (on

the current drive), type the following and press Enter:

MKDIR \ PROGRAMS
To create a subdirectory named BASIC, under a directory named
PROGRAMS on drive B, type the following and press Enter:

MKDIR B:\PROGRAMS\BASIC
If your current directory is PROGRAMS, you only need to type:

MD BASIC

By leaving out the \ you


,
tell MS-DOS to begin at the current
directory.

MKDIR 4-107
MODE External

Purpose
Sets the way a printer, monitor, or serial port operates and prepares and
controls code page switching.

Format
Parallel printer mode:

[ d ] [pa th] MODE LPTP [ : ][ chars ] [, [ spacing] [ , [P] ] ]


Serial port mode:

[d: ] [patP]M0DE C0Mn[ baud[, [ parity]


:

[ ,[databits][,[stopbits][ , [P]]]]]

Redirecting parallel printer output:

[d: ] [pa tP] MODE LPTfl[ ]=COM^[


: : ]

Display modes:

[d: ] [path] MODE displaymode[ L] [,R] [,T]

Device code page modes:

[d: [path] MODE device CODEPAGE PREP ARE


]
=( (nnn)
[d:][path] filename)
or
[d: [path] MODE device CODEPAGE PREPARE
(Omn(,flnn...))[d:] [path] filename)
[d: ] [path] MODE device CODEPAGE SELECT=nnn

[d: [path ]M0DE device CODEPAGE REFRESH

[d: ] [path] MODE device CODEPAGE [/STATUS]

4-108 MODE
You can use the following abbreviations in the code page commands:

CP instead of CODEPAGE
PREP instead of PREPARE
SEL instead of SELECT
REF instead of REFRESH
STA instead of STATUS

Description
Use this command to set or change the following aspects of your
system’s operation:

• Parallel printer selection, character width, and vertical spacing

• Serial port selection, baud rate, parity, data length, and stop bits

• Redirection of parallel printer output through serial ports for use by


serial printers

• Monitor display format

• Preparation of one printer and monitor screen for code page


switching.

Note
For a simpler method of using the MODE command, you can run the
MENU program and select the Mode Settings option. See Chapter 5 for
instructions.

To make these configuration changes to your printer, monitor, or serial


port, enter the MODE command along with the appropriate
parameters.

To Select between printer, monitor, and serial port configurations, follow


the MODE command with a device identifier. After the identifier, you
give the parameters for the device itself.

MODE 4-109
Device Command/identifiers
Printer MODE LPTn: (parameters)

Monitor MODE displaymode (parameters)


Serial port MODE COMn: (parameters)

Printer redirect MODE LPTn: (parameter)


If you use the parameters provided by MODE often, you may want to
include the appropriate commands in your AUTOEXEC.BAT file or in
batch files for other programs that require mode setting changes.

Changing parallel printer settings with MODE


MODE offers these options for operating your parallel printer:
• Select between three logical printer devices: LPT1, LPT2, and LPT3

• Select the number of characters to print on each line, either 80


(standard) or 132 (condensed)

• Select the number of lines to print per vertical inch, either six or
eight

• Select a retry when a printer error occurs.

To change printer settings, use the following format:

MODE LPTn: [chars] [, [spacing] [, [P] ]

The n represents either 1, 2, or 3. Unless you add a special option card


to your computer system, the line printer device selection is limited to
LPT1; the other two options are not available.

Type the MODE command first. Then enter a space, the device identifier,
and a colon. After the colon, enter the number of characters per line
(80 or 132), a comma, then the number of lines you want to print per
inch (6 or 8). If you want your printer to retry printing when it
encounters an error, type another comma and P at the end of the
command (optional). Always state the first two parameters when using
[P even if you want them to remain at their default values.
]

4-110 MODE
At the end of the command line, press Enter. As MS-DOS activates
each parameter, a message appears. Once MODE is complete, the
command prompt returns.

If you type a parameter incorrectly (for example, using 95 instead of 80


for the number of characters per line), MODE sets the default value. If
you choose the P option for printer retries, you might create an endless
loop of retrying. Press Ctrl C to cancel continuous retries.

Changing serial port operation with MODE


MODE offers these options in the operation of your serial port:

• Four logical port numbers: COM1, COM2, COM3, or COM4


• Eight baud rates, from 1 10 to 9600

• Odd, even, or no parity

• A data length of seven or eight bits


• One or two stop bits

• The option to retry on errors.

The serial port device selection is limited to COM1: unless you install
other serial port option cards.

To change serial port settings, use this format:

MODE COMn: baud[, [parity] [,[datab its]


[,[stopb its] [,[?]]]]]

Type the MODE command name, a space, the device identifier, and a
colon. You must specify the COM port and baud rate. Include each of
the parameters after baud rate only if you want to change them from
the default values. Separate each parameter from the next with a
comma.

Table 4-1 shows the options for each parameter, the default value
MS-DOS assumes, and how to enter each one on the command line.

MODE 4-111
Table 4-1. MODE options
Parameter Options Entry Default
Port 1, 2, 3, or 4 COM1:, COM2:, none
COM3:, COM4:
Baud 110 150 110, 150, etc. none
300 600
1200 2400
4800 9600
19200
Parity odd, even, O, E, N E
none
Databits 7 or 8 7, 8 7
Stopbits 1 or 2 1,2 1 (2 if baud rate
is 110)
Error retry Yes or No P or blank blank

When you select the retry option, MODE becomes resident in memory.
Press Ctrl C to stop a continuing loop of retries.

Once you type the necessary parameters on your command line, press
Enter. MODE loads and then makes any setting changes to your serial
port. After each change occurs, a message appears on your screen.

You can leave a parameter out because you want the default value as
part of the setting, but you must enter a comma in its place. For
example, to change only the databits parameter and accept the default
settings for parity and stopbits, use the following format:

MODE COM#: baud, , databits,

Changing printer output direction


MODE permits you to redirect parallel printer output from one of three
logical printer devices to one of four logical serial port devices. In other
words, instead of sending printer data out through the parallel printer
port, you can direct it to your serial port for use by a serial printer or
another serial device.

4-112 MODE
MS-DOS accepts the following device identifications (logical devices) for
parallel and serial output:

Parallel printer Serial communications

LPT1: COM1:
LPT2: COM2:
LPT3: COM3:
COM4:
Unless you install special option cards to enable additional output,
devices LPT2:, LPT3:, COM2:, COM3:, and COM4: are not available.
Although they exist logically in the operating system, the physical
connections (to other printers or a second serial port) do not exist unless

you add the option cards.

To redirect printer output, use this format:

MODE devicel = device2


Substitute device numbers to use other printer or serial port
combinations.

There are many opportunities to use MODE in batch files, or separately.


For example, you may use a particular application that requires a
different setting. You need to enter the new setting and change it back
again each time you use this application. you place the application
If in

a batch file, with a MODE command before and after it, the setting
changes occur automatically.

Changing monitor display format with MODE


MODE offers these options for your monitor display:
• Choose 40- or 80-column width, in black and white, monochrome,
or color display

• Align the screen image to the left [ L ]


or right [
R ]

• Show a test pattern [


T ] to verify and adjust the screen image.

MODE 4-113
To change your monitor display, use the following format:

MODE displaymode[, L][,R][,T]


L and R are mutually exclusive.

Type the MODE command name first and enter a space. You must enter
the displaymode parameter, but the right/left alignment and test pattern
parameters are optional.

The displaymode parameter offers various screen width and color


options. You select one of the following:

Displaymode Description

40 40-column screen width


80 80-column screen width
BW40 Black and white 40-column screen
BW80 Black and white 80-column screen (default)
CO40 Color 40-column screen
CO80 Color 80-column screen (used with color monitor)
MONO Monochrome display adapter (which always has a
display width of 80 characters per line)

The standard mode is BW80. If you have a color monitor, then CO80 is

standard.

You can use the alignment parameters (L and R) to shift the screen image
one column to the left or right. To move more than one column, you
need to repeat the command for each column you want to move. If you
add the test parameter ( T ) after the L or R, a test line appears on the
screen asking if you see the leftmost or rightmost character in the line. If
you enter N the line moves one column in the appropriate direction
,

and the question appears again. When the image is aligned as you want
it, type Y. Use the test parameter with a color monitor
only. L, R, and
T are valid only with a EGA adapter.

At the end of the command line, press Ent6f. MODE loads, your
and the command prompt returns. Your screen
display format changes,
doesn’t show an example screen pattern unless you include the test
parameter.

4-114 MODE
Setting the code page
You must use the MODE command to prepare and select a code page
before you can use that keyboard layout with the device you select. Use
the mode command to:

• Prepare one or more code pages to be selected for use by your


printer or monitor.

• Select which code page to use with which device. This activates the
code page so you can use it on the designated device.

• Refresh (reselect) a code page that was deactivated because of an


error. For example, turning off the printer may cause a code page to
disappear.

• Display the current status of code page selections for a particular


device.

Be sure to read Chapter 9 for complete information on code page


switching.

Note
Ifyou do not have an EGA adapter, you will not be able to display
certain code pages on your monitor. If you do not have a printer that
supports the code page you select, you will not be able to print all

characters in that character set.

PREPARE — Before you can prepare a code page, you must have used
the DEVICE command in the CONFIG.SYS file to activate the device
driver(s) for which you want to use code page switching.

To prepare one or more code pages, use one of the following command
formats:

MODE device CP PREP=( (nnn) [d: ] \_patti] filename)


or
MODE device CP PREP=( (nnn[,nnn . .
.]
[d: ] [path] filename)

MODE 4-115
Type the MODE command, a space, the name of the device, a space,
then CP PREP (or CODEPAGE PREPARE) followed by an equal sign.
Use the first command format if you are preparing only one code page;
use the second format if you are preparing more than one.

The d:, path, and filename identify the Code Page Information file that
MS-DOS should use to prepare a code page for the device specified.

These files have the extension .CPI.

You can enter one of the following devices in the command:

CON, LPT1, LPT2, LPT3

You can include only one device in a MODE command. you want to
If

use a code page or pages on another MODE command


device, enter the
again specifying the device.

You can enter one or more of the following code page numbers in the
command:

437 United States —English


850 Multilingual
860 Portuguese
863 Canada— French
865 Nordic

To include more than one code page, list the numbers within
parentheses and separate them with commas. For example, to prepare
437, 850, and 863, you would enter the code page part of the command
as follows:

((437,850,86 3) [d:] [path] filename )


Ifyou later decide to change one of the code pages to a different one,
but want to keep the others, use a comma to represent the ones you do
not want to change. For example, to change 437 to 860, you would type
the following:

( (860, , ) [d: {path] filename)

You must enter at least one code page number in the command.

4-116 MODE
Choose one of the following filenames for the code page information
file:

EGA. CPI, 4301. CPI

Be sure to include the proper pathname so MS-DOS can find the file.

SELECT — To select the code page to be used with a particular device,


use the following command format:

MODE device CP SEL=nnn


Type MODE, a space, the name of the device (CON, LPT1, LPT2, or
LPT3), a space, CP SEL (or CODEPAGE SELECT), an equal sign,and
the number of the desired code page (437, 850, 860, 863, or 865). You
can enter only one code page at time with the SELECT parameter.
Before you can select a code page, you must have done the following:

• Used the DEVICE command in the CONFIG.SYS file to activate


the device driver(s) for which you want to use code page switching

• Used the PREPARE parameter with the MODE command to


prepare the code page.

REFRESH — To refresh (reselect) a code page that has been


deactivated, use this command format:

MODE device CP REF


Type MODE, a space, the name (CON, LPT1, LPT2,
of the device or
LPT3), a space, and CP REF (or CODEPAGE REFRESH). This
command reactivates a code page you had prepared and selected
previously but that was deactivated for one reason or another (such as if

the printer was turned off).

/STATUS — Use the /STATUS switch if you want to display the code
pages currently prepared and selected for a device:

MODE device CP /STATUS

MODE 4-117
Actually, /STATUS is optional; the following command does the same
thing:

MODE device CP

Either command displays information similar to the following:

Active codepage for device LPT1 is 850


hardware codepages:
Codepage 437
prepared codepages:
Codepage 437
Codepage 850
Codepage 860
MODE Status Codepage function completed

Examples
To set your printer to print 132 characters per line, 8 lines per inch, type
the following and press Enter:

MODE LPT1: 132,8


MODE loads, changes your printer, and the screen displays the
following:

LPT1: set for 132 chars/line


8 lines/inch vertical spacing set
The command prompt reappears.

To see the effect of the MODE command on your color monitor, set the
screen to display 40 columns wide instead of 80. Type the following and
press Enter:

MODE 40
MODE loads, changes the format of your display, then returns the
command prompt to the screen. You can see that the characters are
now twice as wide. Use the command MODE 80 to restore normal
width display.

4-118 MODE
To change the databits parameter for your serial port, type the following
and press Enter:

MODE C0M1: 9600,, 7,,

MODE reports the new configuration:


C0M1: 9600, e, 7,1,-

To redirect printer output, type the following and press Enter:

MODE LPT1: =C0M1:


MODE reports the redirection:
LPT1: redirected to C0M1

To prepare the Canada — French and Nordic code pages for the monitor
(CON) using the code page information file EGA.CPI, type the
following and press Enter:

MODE CON CP PREP=((863,865)EGA.CPI)


To select the United States code page for parallel printer LPT2, type the
following and press Enter:

MODE LPT2 CP SEL=437


To refresh a code page for your printer, type the following and press
Enter:

MODE LPT1 CP REFRESH


To display the current status of code pages for the monitor, type the
following and press Enter:

MODE CON CODEPAGE /STATUS

MODE 4-119
MORE External (filter)

Purpose
Displays long data listings one screen at a time.

Format
[d:] [path] command \
[d: ] [path] MORE

MORE < filename

Description
When you specify the MORE command, MS-DOS reads the input and
displays one screen of information at a time. The screen displays the
following message on the last line:

-- MORE —
Press any key to display the next screen of information. Repeat this
process until you have seen all the input data. MORE is useful for
looking at a list of files in a large directory or viewing a long file.

Examples
To display the file MYFILES.TXT (on the default drive) one screen at a
time, type the following and press Enter:

TYPE MYFILES.TXT |
MORE
To display the directory of files (on the default drive) one screen at a
time, type the following and press Enter:

DIR |
MORE
To display the file LONGLIST on drive A one screen at a time, type the
following and press Enter:

MORE < A: LONGLIST

4-120 MORE
NLSFUNC External

Purpose
Provides support for code page switching.

Format
[d:] [path] NLSFUNC [[d:] [path] filename]

Description
The NLSFUNC command enables support for extended country
information andlets you use the CHCP command to select a code page

(national language character set) for any device that supports code page
switching. NLSFUNC also lets you select a country information file

other than the one specified in your CONFIG.SYS file. Be sure to read
Chapter 9 for complete information about code page switching.

If you do not specify a filename after NLSFUNC, the command uses

the file defined by the COUNTRY command in your CONFIG.SYS


file. If you want to use a different country information file, include the

drive, path, and name of the file in the command.

You use the CHCP command (described in this chapter) to select a code

page for all devices defined with code page switching support. But you
must first NLSFUNC command into memory before giving the
load the
CHCP command. You may want to include the NLSFUNC command
in your AUTOEXEC.BAT file.

Examples
To enable code page switching using the country information file in

your CONFIG.SYS file, type the following and press Enter:

NLSFUNC
To enable code page switching using the country information file named
COUNTRY2.SYS in the DOS directory on drive C, type the following
and press Enter:

NLSFUNC C \D0S\C0UNTRY2 SYS


: .

NLSFUNC 4-121
PATH Internal

Purpose
Sets a search path for programs and batch files that are not in the
current directory. Once you have used this command, you can run
programs in other directories without specifying their pathnames.

Format
PATH [[<2:]patM[; [d:]path2 . .
.]]
PATH;

Description
Use PATH MS-DOS must search to
to identify the directories that
locate external commands when they are not in the current directory.
MS-DOS searches the directories in the path (in the specified order and
on any drive) until it finds the command to be executed. PATH stays in
effect until you reset the system or set another path.

This command is useful when it is part of an AUTOEXEC.BAT


most
which means that it is executed each time you boot MS-DOS. See
file,

Chapter 7 for further information.

Use the format PATH pathl ; path2 ; pathj to specify several paths
by separating each path with a semicolon. MS-DOS searches the paths
in the order you specify

Type PATH; (with a semicolon only) to set a null path, instructing


MS-DOS to search only the current directory for external commands.
Type only PATH (with no path names) to display the current path.

MS-DOS searches the specified path only for command files (those
having .COM, .EXE, and .BAT extensions) and then only when
attempting to execute them. The current directory is not changed by
this command.

4-122 PATH
Examples
To tell MS-DOS to search your \DOS\MENU directory (on drive C)
for external commands, type the following and press Enter:

PATH C:\D0S\MENU
To search this path and two others, type the following and press Enter:

PATH C : \D0S\MENU; \SPRDSHT; \BASIC\NUMBERS


To display the current path, type the following and press Enter:

PATH
If the above paths have been entered, the screen displays the following:

PATH=C \D0S\MENU; \SPRDSHT; \BASIC\NUMBERS


:

To have MS-DOS search only the current directory and not the
previously specified path or paths, type the following and press Enter:

PATH;

PATH 4-123
PRINT External

Purpose
Prints a text file (or set of files) on a printer.

Format
[d: ] [patd]PRINT [/D: device] [/E: buffersize]
[/\J: busy tick] [/Mimaxtick]
[/S: timeslice]" [/Q: q ueuesize]
[/T] [/C] [/P]
[[d:] [path] [ filename ] . .
.]

See the example section for farther information on the placement of the
switches.

Description
Use PRINT to output files to a printer while you continue other
processing with your computer. The files to be printed are stored in a
print queue.

You can use these switches with the PRINT command:


Switch Function

/D:device Specifies the print device; the default is PRN.

/B ibuffersize Sets the size in bytes of the print buffer (the default is

may enhance the


512). Increasing the value of buffer
speed of the PRINT command. The maximum size of
the print buffer depends on the amount of memory
available.

/\J:busytick Specifies the number of computer clock ticks (busy


ticks) that PRINT will wait until the printer is available;
the default is 1. If PRINT waits longer than this value,
it gives up its timeslice (/S).

/M.:maxtick Specifies the number of clock ticks that PRINT can use
to print a character. The value can be from 1 to 255
clock ticks; the default is 2.

4*124 PRINT
Switch Function

/S:timeslice Specifies the number of clock ticks for a timeslice. The


value can be from 1 to 255 timeslices; the default is 8.

/Q-.queuesize Specifies the number of files allowed in the print queue.


The value can be from 4 to 32 files; the default is 10. To
change the value, you must give the PRINT command
without any filenames, for example, PRINT /Q 32.1

/T Selects terminate mode; deletes all files in the print


queue waiting to be printed. A
message alerts you to
the deletion.

/C Selects cancelmode; suspends printing of files in the


print queue. The
specified file and all following files on
the command line are removed from the print queue
until you type a /P switch.

/P Selects print mode; enters files in the print queue. The


specified and all following files on the command line
file

are entered in the print queue until you type a /C


switch.

You can enter the /D, /B, /U, /M, /S, and /Q switches only the first

time you give the PRINT command after starting MS-DOS. Once you
set these switches, they remain in effect until you turn off or reset the
computer.

If you do not specify the device name (/D), the first time you use the
PRINT command, you see this prompt:

Name of list device [PRN]


You can specify any output list device, such as LPT1, LPT2, LPT3,
PRN, COM1, COM2, COM3, COM4, or AUX. Then press Enter.
Enter to select the default
Press just PRN device. The device you select
must be attached to your system.

The files are queued for printing in the order you enter them. Any files
in the print queue must remain unaltered on the disk in the specified
drive until printing is complete.

PRINT 4-125
You can use wildcard characters in the filenames. Also, you can specify
more than one filename, each with the appropriate switches. Each print
queue entry can contain a maximum of 64 characters, including the
drive descriptor.

Type PRINT without a file specification to display the contents of the


print queue on your screen without affecting the queue’s contents.

After a file is entered in the print queue, you can change the current
directory without affecting the print status of files in the queue.

Caution
If you have reassigned disk drive descriptors with ASSIGN, cancel the
assignments before you run PRINT.

Examples
To set the size of the print buffer to 800 bytes, type the following and
press Enter:

PRINT /B:800
To empty the print queue, type the following and press Enter:

PRINT /T

Note
Each switch affects the file before it and all the files after it until the file

before the next switch. In the last example, the /C switch affects
TEMP1.TST and the /P switch affects both TEMP2.TST and
TEMP3.TST.

To remove these three files from the print queue, type the following and
press Enter:

PRINT A TEMPI TST /C A:TEMP2.TST A TEMP3 TST


: . : .

To remove TEMP1.TST from the queue, and then add TEMP2.TST


and TEMP3.TST to the queue, type the following and press Enter:

PRINT TEMPI. TST /C TEMP2.TST /P TEMP3 TST .

4-126 PRINT
PROMPT Internal

Purpose
Changes or resets the MS-DOS command prompt.

Format
PROMPT [ string]

Description
Use PROMPT to change the MS-DOS system prompt from A) to any
Whatever you specify for the string parameter
string of characters.
becomes the command prompt until you specify a different prompt, or
reset or turn off the computer.

Type PROMPT only (without a string of characters) to reset the prompt


to the default drive identifier.

You can use the following characters in your PROMPT command to


specify special prompt information. You must precede these characters
with a dollar sign ( $ ) in the string.

Specify this
character: To get this in your prompt:
Enters a carriage return/line feed sequence
(underscore) (goes to beginning of a new line)

b Enters a character, to show piping


\
commands

d Enters the current date

e Enters an ASCII code of hex IB (used in ANSI


character sets)

g Enters the > character

h Enters a backspace; the preceding character is erased

1 Enters the ( character

n Enters the default drive

PROMPT 4*127
Specify this
character: To get this in your prompt:

p Enters the current directory of the default drive

q Enters the = character

s Enters a leading space only

t Enters the current time

v Enters the MS-DOS version number

Any other characters are ignored by PROMPT.

If your system has an ANSI.SYS driver set in CONFIG.SYS, you can


use escape sequences in your prompts.

Examples
To set the default drive letter prompt without any symbol, type the
following and press Enter:

PROMPT $n
The screen displays A (if A is the default drive).

To set the prompt to the current drive and directory followed by the >

symbol, type the following and press Enter:

PROMPT $p$g
If your current directory is WORD\WORK on the B drive, the screen
displays the following:

B:\W0RD\W0RK)
To set the prompt to include a message such as READY as well as the >

symbol, type the following and press Enter:

PROMPT READY$g
The screen displays:

READY)

4-128 PROMPT
To set a two-line prompt with the time and date, type the following and
press Enter:

PROMPT Time = $t$_Date = $d

The screen displays the following prompt with the current time and
date:

Time = 13:05:23.88
Date = Thu 3-24-88

If you have an ANSI escape sequence driver, you can set the prompts in
reverse video mode and return to normal video mode for other text.
Type the following and press Enter:

PROMPT $e[7m$n:$e[m
To reset the prompt to the default drive descriptor, type the following
and press Enter:

PROMPT
The screen displays the default command prompt, for example:

B>

PROMPT 4-129
RECOVER External

Purpose
Recovers a file or an entire disk containing bad sectors.

Format
[d: ] [path] RECOVER [d: ] [pa th] filename

[d: ] [path] RECOVER d:

Description
Use RECOVER to check individual files for damage and to reconstruct
the directory of a damaged disk. If a sector is bad, you can recover
either the file containing that sector or the entire disk. When you
recover a file, any bad sectors are deleted from the file. Recover the
entire disk if the bad sector is in the directory.

Type RECOVER filename to recover a particular file. MS-DOS reads


the file sector by sector and skips the bad sector(s). When MS-DOS
finds the bad sector, it marks it and no longer writes data to that sector.

Type RECOVER d : to recover a disk (d represents the descriptor of

the drive containing the disk). When you recover an entire disk, all

filenames change to FILEnnnn.REC (nnnn represents a sequential


number starting with 0001). The date and time change to your current
settings.

Cautions
Ifyou have reassigned disk drive descriptors with ASSIGN, cancel the
assignments before you run RECOVER. Otherwise, the program does
not work properly.

This command may not work in a network environment.

Examples
To recover the file APFILE on drive A, type the following and press

Enter:

RECOVER A: APFILE

4-130 RECOVER
The file APFILE is read sector-by-sector and bad sectors are skipped.

To recover the contents of the entire disk in drive B, type the following
and press Enter:

RECOVER B:

RECOVER 4-131
RENAME Internal

Purpose
Renames the specified file or files.

Format
RENAME [d:][path]filenamel filename2
REN [d: ] [path ] filenamel filename2

Description
Use RENAME to change the name of one or more files. You change
the name of the old file to that of the new file. You can type the
command name either as RENAME or REN.

You cannot specify a drive or path with the new filename. The file

remains on the drive and in the directory where it currently resides.

You can use the wildcard characters * and ? to rename a group of files.
When you use the ? wildcard character in the filename, the
corresponding character positions do not change.

You cannot rename a file using the name of an existing file in the
directory.

Examples
To change MYFILE.TXT to YOURHLE.DOC on the current drive,
type the following and press Enter:

REN MYFILE.TXT YOURFILE.DOC


To change the extensions of all files with an .LST extension to a .PRN
extension, keeping the same filenames, type the following and press
Enter:

REN * .LST * .PRN

To rename the file ABODE on drive B to ADOBE, type the following


and press Enter:

REN B: ABODE ?D?B?

4-132 RENAME
REPLACE External

Purpose
Selectively replaces or adds files including subdirectories.

Format
[d: ] [path] REPLACE ^path'll filename^
\_dl:
ld2 ][path][/A][/P][/R][/S][/W]

Description
Use REPLACE to replace on the target disk with files of the same
files

name from the source disk. You can also add files, copying them from
the source to the target.

Note
An easier way to use the REPLACE command is through the MENU
utility. See Chapter 5 for instructions.

In the format above, dl is the source and d2 is the target. You must
specify at least a drive, path, or filename for the source.

For the target, you can specify a drive or path, but you do not specify a
filename. If you omit the target, the specified source files replace files in
the current directory of the default drive.

Whether replacing or adding files, you can copy files to subdirectories


on the target by using the /S switch. You can use wildcards to replace
groups of similarly-named files.

You cannot use REPLACE to update hidden files or system files.

You can use the following switches with REPLACE:

Switch Function

/A Copies all files that do not exist on the target. / A only


adds files, but does not overwrite existing files. You
cannot use /A together with /S.

REPLACE 4-133
Switch Function

/P Prompts you to reply Yes or No before replacing each


file on the target.

/R Replaces files on the target that are read-only. Without


/R, read-only files cannot be overwritten.

/S Replaces files in all subdirectories on the target. You


cannot use /S and /A together.
/W Waits for you to insert a diskette before beginning to
search for source files.

REPLACE sets the following exit codes, which may help you perform
error-detection batch processing:

0 Normal termination of command

1 Command line error

2 File not found

3 Path not found

5 Access denied

8 Insufficient memory

15 Invalid drive

Examples
To replace existing files in all subdirectories on drive C with files from
drive A, type the following and press Enter:

REPLACE A:*.* C:/S


To add files from drive A to the \WORK subdirectory on drive C, type
the following and press Enter:

REPLACE A: C:\W0RK /A

4-134 REPLACE
To replace the file LONG.LST on drive B with the file on the source
diskette in drive A and have the system wait for you to insert a diskette,
type the following and press Enter

REPLACE A: LONG.LST B: /W
The screen displays the following:

Press any key to begin replacing file(s)

REPLACE 4' 135


RESTORE External

Purpose
Restores files copied with the BACKUP command.
Format
[d:] [path RESTORE '] dl [d2: ] [path] [file^aTTje] [/M]
:

[/N] [/P] [/S] [/A: date] [/B:date]


[/E: time] [L: time]

Description
Use RESTORE to restore files that have been copied with the
BACKUP command. (BACKUP creates specially-formatted files that
are not usable until you restore them with the RESTORE command.)

Note
An easier way to use the RESTORE command is through the MENU
utility. See Chapter 5 for instructions.

In the command format above, dl is the source drive, the one that
contains the BACKUP files, and d.2 is the target drive to which you
want to restore the files.

For the source, specify only the drive that contains the backup files. For
the target, you can specify a drive, path, and/or filename. If you omit
the target, the backup files are restored to the current directory of the
default drive. If you specify a path for the target, you must restore the

files to the same directory they were in when BACKUP copied them.

You can use wildcards to restore groups of similarly-named files.

You can use the following switches with RESTORE:


Switch Function

/M Restores only those files that have been modified since


the last BACKUP If you use /M with /N, /M is

ignored.

/N Restores only those files that no longer exist on the


target disk.

4-136 RESTORE
Switch. Function

/P Prompts you to reply Yes or No before restoring files


that have been changed since the last backup, or that
are marked read-only (see Al l RIB).

/S Restores files in all subdirectories beyond the specified


directory in addition to the files in the specified or
current directory. (If the specified or current directory is

the root directory, /S restores files in all subdirectories.)

/ A -.date Restores only those files that were modified on or after


the specified date.

/B -.date Restores only those files that were modified on or before


the specified date.

/E:time Restores only those files that were modified on or earlier

than the specified time.

/L:time Restores only those files that were modified on or later

than the specified time.

Note
The date and time formats depend on the COUNTRY code selected.

RESTORE prompts you to insert the source diskettes in the order they
were backed up with BACKUP If you insert the wrong diskette,
RESTORE prompts you to insert the next diskette until you insert the
correct one.

If you use wildcards in the filename or extension, RESTORE restores all

the files that match the wildcard files; then it prompts you to insert the
next diskette.

If you are sharing files, you can restore only those files that you
normally can access. If you try to restore a file that you are not
permitted to access, the screen displays the following message:

PATHNAMENFILENAME EXT .

Not able to restore at this time

RESTORE 4-137
RESTORE sets the following exit codes which may help you perform
error-detection batch processing:

0 Normal termination of command

1 No files were found to restore


3 Terminated by user

4 Terminated because of an error

Caution
Do not use RESTORE while the ASSIGN, JOIN, or SUBST
commands are in effect.

Examples
To restore all files including files in subdirectories from backup diskettes
on drive A to the hard disk (drive C), type the following and press
Enter:

RESTORE A: C:*.* /S
To restore FILEIT.DOC from a backup diskette in drive A to drive B,
type the following and press Enter:

RESTORE A: B: FILEIT.DOC
To restore files that have a .DOC extension from backup diskettes in
drive A to drive C, type the following and press Enter:

RESTORE A: C:*.D0C
To restore all files from backup diskettes in drive A to drive C, and have
the system prompt you if any files on drive C have changed since the

last BACKUP or if any files are marked read-only, type the following
and press Enter:

RESTORE A: C:/P

4 - 138 RESTORE
RMDIR Interned

Purpose
Removes (deletes) an empty subdirectory.

Format
RMDIR [d:]path
RD [d: Jpath

Description
Use RMDIR to remove an empty directory from a directory tree. The
directory must be empty except for the and .. shorthand symbols.
.

Therefore, you must delete all files before you delete the directory. (You
can do this by typing DEL * . * when you are in the directory you want
to delete.)

When you specify a path, RMDIR removes the last directory name in
the path. If you do not specify a drive, the current drive is assumed.

You cannot remove the current directory or the root ( \ ) directory.


Also, you cannot remove subdirectories that contain hidden files.

Cautions
Be careful when removing a directory while a JOIN or an ASSIGN is in
effect. You cannot remove a directory if it has been substituted
(SUBST).

Before removing a directory, it is a good idea to first issue a DIR


command for that directory to ensure that the directory does not
contain any files that you do not want to delete.

Example
To remove the \OUT subdirectory located under the ELECMAIL
directory, which is in the root directory (on the current drive), type the
following and press Enter:

RMDIR \ELECMAIL\OUT

RMDIR 4-139
SELECT External

Purpose
Formats and installs MS-DOS on a new disk with the country
information and keyboard layout you select.

Format
[d:] [path] SELECT [dl: d2:[path']'] nnn xx

Description
Use SELECT to create a system disk that configures your system for a
specificMS-DOS country and international keyboard layout. All
system disks distributed by Epson automatically configure the system for
the country of sale. This means you need to use SELECT only when

you frequently use the layout of a different country.

You can also use SELECT to format your hard disk and prepare it for
MS-DOS. At the same time, SELECT can also copy
auto-booting all

MS-DOS command files to a specified directory on the hard disk.


SELECT uses FORMAT to initialize the target disk and XCOPY to
copy all the files from the source system disk to the target disk.
SELECT also creates new CONFIG.SYS and AUTOEXEC.BAT files
on the target disk that contain the appropriate commands to correctly
boot the system.

The dl is the MS-DOS source drive and it must be either drive A or B.


You cannot use a hard disk as the source with SELECT.
you specify If

dl, you must also specify d.2, the target. If you do not specify any drive,
SELECT assumes drive A for the source disk and drive B for the target
disk. On a single drive system, you are prompted to exchange the disks
at the appropriate time.

The path is the name of the directory on the target disk in which you
want to store all MS-DOS command files. SELECT automatically
creates this directory after it formats the target disk.

4-140 SELECT
As part of the SELECT command, you must include a country and
keyboard code (shown above as nnn xx). The country code allows you to
choose how the computer handles country-dependent information. You
can choose the formats for the following types of displays (the formats in

parentheses are the standard United States formats):

• Date format (mm-dd-yy)

• Time format (hh:mm:ss)

• Currency symbol ($)

• Decimal separator ( .
).

The keyboard code allows you to choose from a variety of international


keyboard layouts, illustrated in Appendix C.

Use 001 US for nnn xx if you want to use the standard United States
format and keyboard layout. Table 4-2 lists the acceptable values of nnn
and xx.

Table 4-2. Country dependent information

United
Country USA France Germany Kingdom Italy Spain

Country code (nnn) 001 033 049 044 039 034


Keyboard code (xx) US FR GR UK IT SP
Date/time format 1 2 2 2 2 2
Currency symbol $ F DM lb. Lit Pts

Thousands separator space


Decimal separator j i i 1

Date separator — /
— / /

Time separator
Currency format 00 03 00 00 01 03
Currency decimal
places 2 2 2 2 0 2
Time format (hours) 12 24 24 24 24 24
Data list separator > » i i » \

SELECT 4*141
A CONFIG.SYS file is created on the target disk with the
COUNTRY=xxx ccc, d:\patlj\COUNTRY.SYS command. (The
ccc is the code page number.) An AUTOEXEC.BAT file is created on
the target disk with the following commands:

PATH Y; [\path; ]
KEYB xx ccc [d:\path] KEYBOARD. SYS
ECHO OFF
CLS
DATE
TIME
VER
For hard disks, the PATH command includes the target drive letter. If

the keyboard code is US, KEYBxx is not placed in the file.

The instructions below describe how to use SELECT on a diskette and


then on a hard disk.

Warning
The SELECT procedure destroys all on your destination diskette
data
or the hard disk’s MS-DOS partition.Use SELECT only on a blank
diskette or on a hard disk that does not have files stored on it.

Using SELECT on a diskette


This procedure describes how to use SELECT with two diskette drives.
Ifyou have only one diskette drive, the procedure is the same except
you must swap diskettes at the appropriate times. (Follow the system
prompts.)

1. Insert the MS-DOS diskette that contains the SELECT program in


drive A and a blank diskette in drive B.
2. At the A) prompt, type the following and press Enter:

SELECT A: B: 001 US

4-142 SELECT
The screen displays this message:

SELECT is used to install DOS the first


time. SELECT erases everything on the
specified target and then installs DOS.
Do you want to continue (Y/N)?
3. If your diskette has no files stored on it, press Y. Or press N to
cancel the procedure. you press N, the A) prompt reappears.
If If

you press Y, the system prompts you to do the following:

Insert new diskette for drive B:


and strike ENTER when ready

4. Just press Enter to format the diskette. (You already have inserted a
new diskette in drive B.) MS-DOS begins formatting the diskette.
The screen continuously displays the changing head and cylinder
numbers. Besides formatting the diskette, MS-DOS also copies the
operating system files to the disk. When the procedure is complete,
the screen displays the following:

Format complete
System transferred
The screen now displays disk space information and then displays
the following message:

Format another (Y/N)?


5. Press N and press Enter. You see this message:

Reading source file(s)...


At this point, MS-DOS copies all the files from the MS-DOS
diskette to the newly-formatted diskette. The file names appear on
the screen as they are copied to the hard disk. When all the files are
copied, the A> prompt reappears. The SELECT procedure is

complete.

SELECT 4-143
Using SELECT on a hard disk
1. Insert your system diskette containing the SELECT program in

drive A.

2. At the A> prompt, type the following and press Enter:

SELECT A: C: 001 US
The screen displays this message:

SELECT is used to install DOS the first


time. SELECT erases everything on the
specified target and then installs DOS.
Do you want to continue (Y/N)?

3. If your hard disk is new and has no files stored on the DOS
partition, press Y. Or press N to cancel the procedure. If the hard
dis k contains files, see the note at the end of these instructions.

If you pressed N, the A> prompt redisplays. If you pressed Y,


formatting does not begin immediately. You stillhave one more
chance to change your mind. The screen displays the following:

WARNING, ALL DATA ON NON-REMOVABLE DISK


DRIVE C: WILL BE LOST!
Proceed with Format (Y/N)?
4. Press Y to format the DOS partition, erasing any stored files, or
press N to cancel the procedure. Then press Enter. If you pressed
N, the A> prompt reappears. If you pressed Y, MS-DOS begins
formatting your hard disk’s DOS partition. The screen continuously
displays the changing head and cylinder numbers.

Besides formatting the hard disk partition, MS-DOS also copies the
operating system files to the hard disk. When the procedure is
complete, you see the following:

Format complete
System transferred
Volume label (11 characters, ENTER for
none)

4-144 SELECT
5. Ifyou want to label the hard disk, type a name of up to 11
characters and press Enter. If you do not want to name the hard
disk, do not enter any characters. Just press Enter. The screen first
displays disk space information and then displays the following
message:

Reading source file(s)...


At this point, MS-DOS copies all the files from the DOS diskette to
the hard disk. The file names appear on the screen as they are
copied to the hard disk.

When all the files are copied, the A> prompt reappears. The
SELECT procedure is complete.

Note
If the hard disk contains files in the DOS partition, the screen displays
this message:

Enter current Volume Label for drive C:

Enter the volume label currently assigned to drive C and press Enter. If
you do not enter the proper volume label, the screen displays this
message:

Invalid Volume ID
Format failure
The A> prompt appears on the screen. Type C : and press Enter. Then
type VOL and press Enter. The screen displays this message:

Volume in drive C is name


Note the name of the volume. Then type A : and press Enter. At this
point, return to step 2 in the instructions above
and complete the
procedure from that point. When the program prompts you for the
volume label, type the name.

SELECT 4-145
Example
To use SELECT to configure your system for use in the United
Kingdom, type the following and press Enter:

SELECT A: C: 044 UK
MS-DOS creates the CONFIG.SYS file with this information:

COUNTRY=044, 437

MS-DOS also creates the following AUTOEXEC.BAT file:


PATH \j
KEYB UK 437 C \ KEYBOARD SYS
: .

ECHO OFF
CLS
DATE
TIME
VER

4-146 SELECT
SET Internal

Purpose
Sets or displays the environment string values in memory.

Format
SET [ name= [ parameter ] ]

Description
Use SET to insert a string into the command processor’s environment
or to set one string equal to another. A copy of the entire series of
strings in the environment is made available to all commands and
applications. SET also displays the current setting of environment
strings.

SET inserts the entire string, beginning with name, into a block of
memory reserved for environment strings. Any lowercase letters in
the name are converted to uppercase letters when added to the
environment (including foreign language characters).. The remainder
of the line is inserted as typed. If the name already exists in the
environment, it is replaced with the new parameter.

If you enter SET only with no name, the current setting of environment
strings is displayed.

If you specify a name but no parameter, SET removes the current setting
of name = parameter from the environment.

Do not use SET to add the PROMPT and PATH commands to the
environment. MS-DOS automatically does this when these commands
are entered.

One of the strings in the environment is always a


COMSPEC= parameter. (MS-DOS places it in the environment when
you start or reset your system.) This parameter describes the path that
MS-DOS uses to reload the command processor when necessary.

SET 4-14 7
You can use the SET command in batch processing and define your
replaceable parameters with names instead of numbers. This eliminates
the need to change replaceable parameter names in each batch file.

Examples
To add the string PROG =\LEVEL1 to the environment, type the
following and press Enter:

SET PR0G=\LEVEL1
In the above example, when an application program receives control, it
could search the environment for the name PROG and use the supplied
parameter as the directory name to use for its files.

To remove PROG = \ LEVEL 1 from the environment, type the


following and press Enter:

SET PR0G=
To add the string ABC=xyz to other strings already in the
environment, type the following and press Enter:

SET ABC=xyz
In the above example, you can enter keywords and parameters that
have no meaning in MS-DOS, but can be found and interpreted by
applications designed to examine the environment.

4-148 SET
SHARE External

Purpose
Installs file sharing and locking protection in network situations.

Format
[d:] [path SHARE '] [/F: space] [/L:locirs]

Description
You can use the SHARE command only when networking is active.
You normally include the command in an AUTOEXEC.BAT file to
install shared files. See the manual for your networking software to learn

about shared files.

You can use these switches with SHARE:


Switch Function

/F -.space Allocates file space

/Ldocks Allocates the number of locks

Use the /F switch to allocate file space (in bytes) for the area MS-DOS
uses to record file sharing information. The space required for each
open file is the length of the full filename plus 1 1 bytes. The default
value is 2048 bytes.

The /L switch allocates the number of file locks. The default is 20 locks.

Once you use the SHARE command in an MS-DOS session, all read
and write requests are checked by MS-DOS against the allowed number
of FCBs specified in your CONFIG.SYS file. If you try to load SHARE
again, the following message is displayed:

Share Already Installed

Example
To reserve 1500 bytes for file sharing and allow for 10 locks, type the
following and press Enter:

SHARE /F:1500/L:10

SHARE 4-149
SORT External (filter)

Purpose
Sorts data from an input device and then writes it to the output device,
such as a screen, file, or printer.

Format
[d:][patii] SORT [/R ~\[( filename [> filename]] [/+n]

Description
SORT is a filter program that reads input from your keyboard (or
standard input device), sorts the data, and then writes it back to your

monitor (or standard output device).

You can use SORT to arrange a file in ASCII code order. This means
that numbers come before letters and that all uppercase letters come
before all lowercase letters. For example, Z comes before a.

You can redirect your input and output to sort the data in a file and
then write the sorted data to a new output file or system device.

You can use two switches with SORT:

Switch Function

/R Reverses the sort order; output sorts in order from Z to


A
/ +n Starts sorting in column n; SORT normally begins
sorting in column 1

The output file must be different than the input file.

Examples
To read the file UNSORT.TXT, reverse the sort, and then write the
output to a file named SORT.TXT, type the following and press Enter:

SORT /R < UNSORT. TXT) SORT.TXT

4 > 150 SORT


You can combine SORT with other commands. For example, to sort
the output of the DIR command column 14, and
starting in display
output on your screen, type the following and press Enter:

DIR |
SORT /+14
The result of this command is a directory sorted by file size (represented
in column 14).

You can add the MORE command to SORT To read your sorted
directory one screen at a time, type the following and press Enter:

DIR |
SORT /+14 !
MORE

SORT 4-151
SUBST External

Purpose
Substitutes a drive letter for a pathname.

Format
[d: ] [path] SUBST

[d:] [path ] SUBST dl: [d2:]path

[d: [path ] SUBST d: /D

Description
Use SUBST to substitute a single drive letter for an entire pathname.
This is you use application programs that do not allow
useful if

pathnames. With these programs, all disk activity must take place in
the current directory. To get around this limitation, use the SUBST
command.

The drive letters you can use with SUBST depend on the value of
LASTDRIVE in the CONFIG.SYS file. If a CONFIG.SYS file does not
exist or does not contain the LASTDRIVE parameter, the default value

is E. In this case, any letter from A to E can be used by SUBST. If you


use a lot of substitutions, increase the value of LASTDRIVE. (See
Chapter 6 for a complete description of the CONFIG.SYS file.)

Even though you can use any letter in the range, do not use the letter
assigned to an existing drive. If you do use an existing drive, the specifier
will no longer refer to the drive but to the path instead.

In the command format above, dl represents the


: letter assigned to the
pathname. must not be the same as the default drive. Specify
d2: d2:
only if the pathname is on a different drive. The pathname must start

from the root directory.

Type SUBST without any parameters to display the current


substitutions.

Use the /D switch to cancel a substitution. If more than one substitution

has been made, use SUBST d: /D to cancel each value of d:.

4-152 SUBST
Caution
Do not use ASSIGN, BACKUP DISKCOMR DISKCOPY, FDISK,
FORMAT, JOIN, LABEL, RESTORE, or SELECT while a substitution
is in effect.

Examples
Assume the following directory structure for drive D:

D:\
i

i 1

FILES 1 FILES2
i

i 1

BUSINESS PERSONAL
If you are running the application program from drive C (a hard disk), to
access the path D:\FILES1, substituting the letter E, type the following
and press Enter:

SUBST E: D:\FILES1

If you log on or refer to drive E from your application program, all

activity takes place through the path D:\FILES1.

To cancel this substitution, type the following and press Enter:

SUBST E: /D
To access the path D:\FILES2\PERSONAL, substituting the letter F,

type the following and press Enter:

SUBST F: D:\FILES2\PERS0NAL

SUBST 4-153
SYS External

Purpose
Copies the system files from the boot-up drive to the specified disk.

Format
[d : ] [path] SYS d:

Description
Use SYS MS-DOS system files from the disk in the boot-up
to transfer
drive (the one from which you loaded MS-DOS) to the diskette or hard
disk you specify. The system files are hidden and do not appear when
you give the DIR command. The SYS command can either update an
earlier version of MS-DOS on a disk or copy the system to a formatted
disk containing no files.

SYS does not transfer COMMAND.COM, the command processor.


You must use the COPY command to transfer COMMAND.COM
into the destination disk’s root directory.

You must include the drive descriptor in the command, and it must be
different than the boot-up drive. Prompts tellyou when to change
diskettes. The destination diskette must be formatted.

This command may not work in a network environment.

Example
To copy the system files from the disk in the boot-up drive to the disk in
SYS B and press
drive B, type : Enter. You see the message System
transferred.

4-154 SYS
TIME Internal

Purpose
Displays or sets the system time.

Format
TIME [hh:mm[:ss[. cc]]]

Description
Use TIME to set a new system time. The file directory then records the
time on all files when you create or modify them.

The TIME command updates the CMOS time if your computer has a
real-time clock.

To display the current system time, type TIME and press Enter. A
message similar to this appears:

Current time is 09:11:19.70


Enter new time: _
Press Enter if you do not want to change the current time. Or, enter a
different time and then press Enter. MS-DOS redisplays the command
prompt.

Enter the time using numbers only. MS-DOS uses a 24-hour clock, so
the numbers must be in the following ranges:

• hh must be from 00 to 23

• mm must be from 00 to 59
• ss must be from 00 to 59 (optional)

• cc must be from 00 to 99 (optional)

You must separate the hour and minute entries with a colon. If you
enter seconds, precede the number with a colon. If you enter
hundredths of seconds, precede the number with a period.

TIME 4-155
You can change the format of the time display with the COUNTRY
command in your CONFIG.SYS file.

Examples
To set the time for 9:30 in the morning, you can type any one of the
following:

9 : 30:00
9:30
09 30:00
:

09:30
To set the rime for 11:35 in the evening, type either of the following:

23:35
23 35:00
:

4-156 TIME
TREE External

Purpose
Displays the complete subdirectory tree structure of a disk.

Format
[d: ] [path] TREE [d:][/F]

Description
Use TREE to display the complete directory tree of a disk, and,
optionally, list all the files contained in the subdirectories.

For each directory path, TREE displays the subdirectories that branch
from it. TREE displays all files within the directory path if you use the
/F switch.

Type TREE to see the subdirectory structure of the default drive. To see
the subdirectory structure of a different drive, type TREE and the drive
descriptor.

When subdirectories are present, TREE lists them by path and


subdirectory, in the order they were created. The heading for this
display is the following:

DIRECTORY PATH LISTING


If your disk has a volume label, TREE includes the label in the heading.

If it has no label, TREE substitutes question marks on the display.


Use Ctrl S to halt the scroll of the subdirectories and files on the
screen. You can also use the MORE filter.

Examples
To see a list of subdirectories, type the following and press Enter:

TREE

TREE displays a report similar to this one:

Path: \ LEDGER

TREE 4-157
Sub-directories : ACCREC
ACCPAY
SALES
To see a list of all the files in the subdirectories, type the following and
press Enter:

TREE /F
TREE displays a report similar to this one:

Path: \ LEDGER
Sub-directories : ACCREC
ACCPAY
SALES
Files BILLS1
INVOICE. JUN
INVOICE. JUL

To send the output of the above to a printer, type the following and
press Enter:

TREE /F )PRN

4*158 TREE
TYPE Internal

Purpose
Displays the contents of a file on your screen.

Format
TYPE [d:~\[path~\ filename

Description
Use TYPE to display the contents of a file without modifying it. You
must specify a filename and you cannot use wildcard characters. The
specified file is displayed on the screen or the standard output device.

When you use TYPE, data is unformatted. Normal tabs expand and are
shown at every eighth column. Some word processors embed tabs
instead of spaces to save disk space.

The TYPE command is meaningful only with text files. If you give the
TYPE command for a binary file, you may see strange characters that
represent control characters such as bells, form feeds, and escape
sequences.

You can use the MORE command to display the file one screen at a
time, and you can press Ctrl Print Screen to print the file as it
appears.

Examples
To display a file on drive B called EPSON.TXT, type the following and
press Enter:

TYPE B: EPSON. TXT


To print a file named TICKET in the current directory while it displays
on the screen, press Ctrl P. Then type the following and press Enter:

TYPE TICKET

TYPE 4-159
VER Internal

Purpose
Displays the MS-DOS version number.

Format
VER

Description
Use the VER command to find out which version of MS-DOS you are

using. MS-DOS displays the version number on your screen.

Example
To display the version of MS-DOS you are using, type VER and press

Enter. You see a message similar to this:

MS-DOS Version 3-30

4- 160 VER
VERIFY Internal

Purpose
Turns on or off the verify function, which verifies each disk write.

Format
VERIFY [ON]
VERIFY [OFF]

Description
Use VERIFY to verify that all your files are written correctly to disk.
When you specify VERIFY ON, MS-DOS checks that the disk
controller did not err during the disk writing procedure. This command,
however, does not guarantee that the data is correct. MS-DOS normally
performs VERIFY every time you write data to a disk.

The /V switch with the COPY or XCOPY command performs the


same function as VERIFY ON.

When you set VERIFY ON, it remains in effect until you turn it off or
reset or turn off the computer. When VERIFY is on, MS-DOS takes a
little longer when writing to disk.

You can display the current setting of VERIFY by typing VERIFY, with
no parameters.

Examples
To verify that data written to disk is correctly recorded, type the
following and press Enter:

VERIFY ON
To display the current setting, type the following and press Enter:

VERIFY
If you had set VERIFY ON, the screen displays the following:

VERIFY is on

VERIFY 4-161
VOL Internal

Purpose
Displays a disk volume label.

Format
VOL [d:]

Description
Use VOL to display the volume label of the disk in drive d, if the
volume label exists. If you do not specify a disk drive descriptor, VOL
displays the volume label of the disk in the default drive.

If the disk has no label, the screen displays this message:

Volume in drive d has no label

You can use LABEL or XTREE (described in Chapter 5) to create or


rename the volume label of a disk.

Example
To see the volume label of a diskette in drive B, type the following and
press Enter:

VOL B:

The screen displays a message similar to this:

Volume in drive B is DATAFILES001

4-162 VOL
XCOPY External

Purpose
Selectively copies files and, optionally, subdirectories.

Format
[d:] [pa til] XCOPY [dl:] [path] filename
[d2: ] [pa td] filename ]
C/A] [/E] [/M] [/P] [/S] [/V] [/W]
[/D: date]

Description
Use the XCOPY command to copy:
• Individual files from one disk to another or to the same disk

• A group of files by indicating a path or using wildcard characters

• One or more files under new names.

Note
An easier way to use the XCOPY command is through the MENU
utility. See Chapter 5 for instructions.

XCOPY differs from COPY in that you can copy subdirectories and, if

necessary, create them as you copy.

Use XCOPY instead of DISKCOPY if you are copying all the files from
one disk to another that is not the same media (from a 360KB diskette
to a 1.2MB diskette, for example). Because DISKCOPY copies all the
data by tracks, it cannot copy between two disks that are not the same
format.

In the command format above, dl is the source and d2 is the target. You
must specify at least a drive, path, or filename for the source.

If you do not specify a path for the source diskette, XCOPY starts from
the current directory. The filename can be a single file or a group of files

XCOPY 4' 163


(indicated by wildcards * or ?). If you do not include a filename on the
source diskette, XCOPY assumes * . * and copies all files.

If you do not specify a path for the target copies, XCOPY copies the
files to the current directory. you do not include a filename, or if you
If

enter # . #, the target copies have the same name as the source files.

You can use the following switches with XCOPY to select exactly which
files to copy and how they should be copied:

Switch Function

/A Copies files whose archive bit is set, but does not


change the attribute of the source file.

/E When used with /S, creates subdirectories on the target


even if no files are stored in them.

/M Copies files whose archive bit is set but, unlike / A,


turns off the archive bit of the source file.

/P Prompts you to reply Yes or No before copying each


file.

/S Copies files from the source directory and from all the
subdirectories below the source directory. /S creates
subdirectories on the target as it copies files, but does
not create a subdirectory that contains no files. To do
this, use /E as well as /S.

/V Verifies that the sectors written on the target diskette


are recorded properly: /V causes XCOPY to run
slower.

/w Tells XCOPY to wait for you to insert diskettes before


beginning to search for source files.

/D -.date Copies files whose date is the same as or later than the
specified date. (Date format depends on the
COUNTRY code selected.)
You can give a file a new name with XCOPY by specifying a target
filename that is; different than the source filename.

4-164 XCOPY
You cannot use XCOPY to copy from or to the reserved device names,
CON and LPT1.
XCOPY sets the following exit codes (which you can use in error-
detection batch processing):

0 Normal completion of command

1 No files were found to copy


2 Terminated by user (Ctrl C, Ctrl BREAK, etc.)

3 General error

4 INT 24 error

Examples
To copy all the files in all the subdirectories of drive C to drive A, type
the following and press Enter:

XCOPY C:\ A:\ /S


XCOPY copies all the files, creating subdirectories as required.
If drive C contains some subdirectories with no files in them, and you
want those subdirectories to be created on drive A along with the other
subdirectories, type the following and press Enter:

XCOPY C:\ A:\ /S/E


To copy all files in the \WORK subdirectory modified on or after
March 15, 1988 to drive A, type the following and press Enter:

XCOPY C:\W0RK A :/D: 03-15-88

XCOPY 4-165
Chapter 5
Epson Menu Utilities

Introduction 5-3

MENU 5-3
Selecting options from menus 5-6
File Utilities 5-8
Backup Files 5-8
Restore Files 5-11
Replace Files 5-15
Compare Files 5-17
Change File Attributes 5-20
Copy Files/Directories 5-22

Disk Utilities 5-24


Check Disk 5-25
Disk Copy 5-26
Disk Compare 5-27
Format Disk 5-28

Mode Settings 5-30


Video Display 5-30
Printer 5-31
Serial Port 5-32
RedirectLPTn 5-34
Code Page 5-35
HELP 5-39
Enter DOS Command 5-40

SETPRINT 5-41
Options 5-42

XTREE 5-45
Using the menu 5-47
Options 5-50
DIR commands 5-52
File commands 5-60
Function keys 5-70

Epson Menu Utilities 5-1


XTREEINS 5-73
Option A— Installing XTREE for your monitor type 5-74

Option B Changing display attributes or colors 5-79

Option C Exiting XTREEINS 5-80

5-2 Epson Menu Utilities


Introduction
Epson has included these menu utilities to make MS-DOS easier to use:

• MENU provides simplified menu screens that make it easier to run


certain complex MS-DOS commands.

• SETPRINT displays a menu through which you can control your


printer’s operation and select alternate typefaces and spacing values.

• XTREE lets you manage your files and directories through a menu
of integrated MS-DOS commands.

This chapter describes how to use the MENU, SETPRINT, and XTREE
programs and also explains how to run XTREEINS if you are having
trouble displaying XTREE on your screen.

MENU
The MENU program displays a menu from which you can select any
MS-DOS command, and it provides simple menus for running certain
complex commands. To run the program, log onto the directory
containing the MENU program or enter the correct pathname and
then type MENU and press Enter. The screen displays this main menu:

EXIT
File Utilities
Disk Utilities
Mode Settings
Help
Enter DOS Command

Each option main menu (except EXIT and Enter DOS


in the
command) displays a submenu of MS-DOS functions. Use T or i to
move the highlighted cursor block to the desired option. Then press
Enter to display that submenu. Select the EXIT option when you want
to leave the menu utility.

Epson Menu Utilities 5-3


Each option in the submenus corresponds to an Epson program and/ or
an MS-DOS command. Table 5-1 shows which commands are activated
by the options in the menus.

Table 5-1. MENU commands


Submenu Epson MS-DOS
Main menu option program command
File Utilities Backup Files SETBCKUP BACKUP
Restore Files SETRSTOR RESTORE
Replace Files SETRPLCE REPLACE
Compare Files SETFC FC
Change File
Attributes SETATTR ATTRIB
Copy Files/
Directories SETXCOPY XCOPY
Disk Utilities Check Disk DU CHKDSK
Disk Copy DU DISKCOPY
Disk Compare DU DISKCOMP
Format Disk DU FORMAT
Mode Settings SETMODE MODE
Help HELP
Enter DOS anyMS-DOS
Command command

For example, if you select Backup Files from the File Utilities submenu,
MENU calls up an Epson-created program named SETBCKUE This
program then calls up and runs the MS-DOS BACKUP command, but
it does so by displaying a series of menus on the screen from which you

select options to control the BACKUP command.


This structure means you can run the BACKUP command in one of
three ways:

• Type BACKUP at the MS-DOS command prompt, with all the


appropriate parameters and switches. For instructions, see the
BACKUP command in Chapter 4.

5-4 Epson Menu Utilities


• Run the MENU program, select the File Utilities option, and then
the Backup Files option. This lets you run the BACKUP
select

program by selecting options from the menus provided by


SETBCKUE
• Type SETBCKUP at the MS-DOS command prompt. This lets you
run BACKUP through the SETBCKUP program (selecting options
from menus) without going through the MENU program.

Because of this structure,when you run the MENU


program you need
to be sure can find the appropriate Epson and MS-DOS commands
it

(programs). If you have a hard disk, it is best to store MENU


and all the
necessary programs in one directory. If you do not have a hard disk, do
one of the following:

• If your computer has a 1.2MB, 1.44MB, or a 720KB diskette drive,


store MENU and all the necessary programs on one diskette. Then
use this diskette whenever you run MENU.
• If your computer has only one or two 360KB diskette drives, use the
following PATH command before you run the MENU program:
PATH B
Then, when you run the MENU program and request an option
that requires an MS-DOS command, the screen prompts you to
insert the diskette for drive B. At this point, insert the diskette
containing the program you want to use — in drive A you have
if

only one drive or drive B if you have two — and press any key to
continue. Be sure to insert the correct diskette; otherwise, MENU
displays an error message and you will not be able to complete the
operation.

When MENU finishes using the program, the screen prompts you
to insert the diskette for drive A. If you have one drive, replace the
diskette in drive A with the diskette that contains MENU. Press
any key to continue.

Epson Menu Utilities 5-5


With this method, you need to know exactly which programs are
on which diskettes. You may want to keep a printout of the disks’
directories for reference. (You can print the directory of a disk by
pressing Ctrl P before giving the DIR command.)

If your work sessions involve a lot of disk handling, or you just want to
keep things simple, it’s a good idea to use this convenient menu
program — alone or within a batch file. You can include MENU in a
batch file just like any other MS-DOS command.

The instructionsbelow first provide general rules for selecting options


from the menus and then describe each of the MENU options
separately. If you want to learn more about a particular menu option,

see the description of the corresponding MS-DOS command in


Chapter 4.

Selecting options from menus


Although each menu offers different options, the procedure for selecting
options is the same, and each screen in the MENU program tells you
what you need to do.

The key functions for controlling a menu appear in the bottom part of
every menu screen. For example, the main menu displays the following
prompt:

i Selects Function Enter Exits Program


This tells you to press 1 to move the cursor block to the option you
want to select or press Enter to activate the selected option (Exit, in
this case).

The following message also appears on the main menu:

Use the PgUp and PgDn keys to move this Help Text
up and down one line.
Every menu screen provides help information in this bottom part of the
screen about the option currently selected by the cursor block. If there is

more text than can fit in these five lines, press PgUp to move the help
information up to display more text; then press PgDn if you want to

5-6 Epson Menu Utilities


read the previous text or to go back to the top of the help text. You can
use PgUp and PgDn on any of the submenus to read about the
selected option.

Check this part of the screen whenever you need information about the
command or what key to press.

When a submenu for a utility (such as BACKUP) is on the screen, the


name of the command is in the upper left corner, such as this:

BACKUP Utility
When a utility menu is on the screen, you often need to choose one of
two possible parameters for an option by pressing the Enter key. This
switches the selection back and forth between the first choice and the

second YES and NO, for example. When the desired choice appears,
press T or i to move the cursor block to another option.

If a particular option requires you to type in some information— the


name of a file, for example —you must type something before you can
move on to the next option. This prevents you from leaving out
information that the command needs to work properly. Press the Insert
key to turn on or off TYPEOVER mode when typing in this
information. You can use the backspace key and the Delete key to
correct text you type.

As you select options from a menu, the MS-DOS command


utility

string appears below the menu to show you how this command would
appear if you were typing it at the command prompt. For example, the
command string for a BACKUP command might look like this:
COMMAND STRING > BACKUP C:\*.* A:/S
When you want to leave the displayed menu, just keep pressing T until

the cursor block is on the EXIT option; then press Enter. You can also

press the ESC key to return to the previous menu.

Select the option you want from the main menu, then go to the
description of that function below for instructions on using it.

Epson Menu Utilities 5-7


File Utilities
When you select the File Utilities option from the main menu, the
screen displays these options:

EXIT
Backup Files
Restore Files
Replace Files
Compare Files
Change File Attributes
Copy Files/Directories

Move the cursor block to the option you want and press Enter. Then
follow the appropriate instructions below for that option.

Backup Files

The Backup Files option lets you back up (copy) files from one disk to
another —most typically, from a hard disk to diskettes —to protect your
data. This command is different from the COPY command in that it

copies the files in a condensed format that requires less storage space.
You cannot access files that have been copied with the Backup Files
option, but you can copy them back to the original disk with the
Restore Files option and then access them.

This option runs the MS-DOS BACKUP program.

5-8 Epson Menu Utilities


When you select the Backup Files option, the screen displays this menu:

EXIT
Source
Target Drive = :

NO Include Subdirectory Files


NO Include Only Modified Files
NO Add Files Without Replacing
NO Select A Starting Date
NO Select A Starting Time
NO Format The Target Disk Before Backup
NO Specify A Log File =
************* START ************BACKUP
You must first two items in
enter the appropriate information for the
this menu. The rest of the options offer a choice between or YES; NO
you can either accept the default (NO) or press Enter to change the
parameter to YES. Use the BACKUP options as follows:

Source Type the drive letter, pathname, and filename of the file or files
you want to back up. You can use wildcards to select groups of files. For
example, to back up all files on drive C in the \ LETTERS directory,
you would type:

C: \ LETTERS \ *

Target Drive —Type the letter of the drive containing the target disk
(which is usually A).

Include Subdirectory Files — If you want to include all the files in any
subdirectories that exist in the specified pathname, select YES.

Include Only Modified Files — If you want to include only those files that
have been modified since the last time BACKUP was used on this disk,
select YES.

Add Files Without Replacing—If you want to add only new files, and
not replace those already existing on the target disk, select YES.

Epson Menu Utilities 5-9


Select A Starting Date—If you want to back up all files that have been
created or modified beginning from a certain date, select YES. A small
box appears on the right side of the menu with this prompt (for the
United States):

MM-DD-YYYY
Enter the date in this format — two digits each for the month and day
and four digits for the year. (The format depends on the COUNTRY
command in your CONFIG.SYS file.) You do not enter the dashes. For
example, for June 22, 1988 you would type:

06221988
Then press Enter to move the cursor back to the large menu. If you
type an invalid date (more than 12 for the month or 31 for the day),
you must reenter the date.

Select A Starting. Time— you want to back up all files that have been
If

created or modified beginning from a certain time, select YES. A small


box appears on the right side of the menu with this prompt:

HH MM SS
: :

Enter the time in this format (two digits each for the hour, minutes, and
seconds) using the 24-hour clock, but do not type the colons. For
example, to select 9:30 a.m., you would type:

093000
To select 4:15 p.m., you would type:

161500
Then press Enter to move the cursor back to the large menu. If you
type an invalid time (more than 23 for the hour or 59 for the minutes or
seconds), the cursor does not go back to the large menu and you must
reenter the time.


Format the Target Disk Before Backup If the disk you are copying the
to has not been formatted, select YES; otherwise, leave the default
files

to NO for this option.

5*10 Epson Menu Utilities


Specify A Log File—
you want to create a file on the source disk that
If

lists the names of all the backup files, select YES. This creates a file you

can read and print like any text file. The log file is given the default
name of BACKUELOG unless you enter a different one. To change it,
enter a name consisting of up to eight characters for the name (and up
to three characters for the extension, if desired). You can store the log
file on another disk, as long as it is not the target disk. Just specify the

desired drive before the filename.

When you have made your selections, move the cursor block down to
START BACKUP and press Enter to begin the backup procedure. If
you have entered any invalid information in the menu, an error
message appears stating what is wrong. Correct the error and select the
START option again.

The screen prompts you to insert backup diskette 01 (the first diskette)

in the target drive and press any key when ready. The program copies
the files from the source disk to the target disk and displays the
filenames on the screen as they are copied.

If the first disk fills up, the screen prompts you to insert backup diskette
02. Follow the prompts on the screen until all the files have been
backed up. Then the screen prompts you to press any key to continue,
and the Backup Files menu reappears. Move the cursor block up to
EXIT and press Enter to return to the File Utilities menu.

Restore Files
Use this option when you want to restore files that have been backed
up with the Backup Files option (or the BACKUP command).

This option runs the MS-DOS RESTORE program.

Epson Menu Utilities 5-11


When you select the Restore Files option, the screen displays this menu:

EXIT
Source Drive = :

Target =
NO Include Subdirectory Files
NO Prompt Before Restoring
NO Restore Files Before A Date
NO Restore Files After A Date
NO Include Only Modified and Deleted Files
NO Include Only Files Not On The Target
NO Restore Files Later Than A Time
NO Restore Files Earlier Than A Time
********** START RESTORE
***********

You must enter the appropriate information for the first two items in
this menu. The rest of the options offer a choice between NO or YES;
you can either accept the default (NO) or press Enter to change the
parameter to YES. Use the RESTORE options as follows:

Source Drive—Type the letter of the drive containing the source disk
(the disk containing the files you want to restore to the target disk).

Target—Type the drive letter and pathname on the target disk to which
you want to restore the files from the source disk. You can use wildcards
to identify a group of files. For example, to restore the files to drive C in
the \ SALES directory, you would type:

C: \ SALES \ *

Include Subdirectory Files—If you want to include all the files in any
subdirectories that exist in the specified pathname, select YES.


Prompt Before Restoring If you want the program to ask you whether
you want to restore modified or read-only files, select YES. With this
option selected, a prompt appears before each file is copied so you can
choose whether or not to copy it.

5-12 Epson Menu Utilities


Restore Files Before A Date— If you want to restore only those files that
were modified on or before a specified date, select YES. A small box
appears on the right side of the menu with this prompt (for the United
States):

MM-DD-YYYY
Enter the date in this format —two digits each for the month and day
and four digits for the year. (The format depends on the COUNTRY
command in your CONFIG.SYS file.) You do not enter the dashes. For
example, for May 16, 1988 you would type:

05161988
Then press Enter to move the cursor back to the large menu. If you
type an invalid date (more than 12 for the month or 31 for the day),
you must reenter the date.

Restore Files After A Date— If you want to restore only those files that
were modified on or after a specified date, select YES. A small box
appears on the right side of the menu with this prompt (for the United
States):

MM-DD-YYYY
Enter the date in this format —two digits each for the month and day
and four digits for the year. (The format depends on the COUNTRY
command in your CONFIG.SYS file.) You do not enter the dashes. For
example, for June 22, 1988 you would type:

06221988
Then press Enter to move the cursor back to the large menu. If you
type an invalid date (more than 12 for the month or 31 for the day),
you must reenter the date.

Include —
Only Modified and Deleted Files If you want to include only
those files on the target disk that have been modified or deleted since
the last time BACKUP was used on this disk, select YES.

Epson Menu Utilities 5-13


Include Only Files Not On The Target—If you want to restore only
those files that exist on the source disk but not on the target— select
YES.

Restore Files Later Than A Time— If you want to restore only those files

that have been modified at or after a certain time, select YES. A small
box appears on the right side of the menu with this prompt:

HH MM SS
: :

Enter the time in this format (two digits each for the hour, minutes, and
seconds) using the 24-hour clock, but do not type the colons. For
example, to select 11:00 a.m., you would type:

110000
To select 8:30 p.m., you would type:

203000
Then press Enter to move the cursor back to the large menu. If you
type an invalid time (more than 23 for the hour or 59 for the minutes or
seconds), you must reenter it.

Restore Files Earlier Than A Time— If you want to restore only those
that have been modified at or before a certain time, select YES.
files A
small box appears on the right side of the menu with this prompt:

HH MM SS
: :

Enter the time in this format (two digits each for the hour, minutes, and
seconds) using the 24-hour clock, but do not type the colons. For
example, to select 7:30 a.m., you would type:

073000
To select 6:50 p.m., you would type:

185000
Then press Enter to move the cursor back to the large menu. If you
type an invalid time (more than 23 for the hour or 59 for the minutes or
seconds), you must reenter it.

5-14 Epson Menu Utilities


When you have made your selections, move the cursor block down to
START RESTORE and press Enter to begin. If you have entered any
invalid information in the menu, an error message appears stating what
is wrong. Correct the error and select the START option again.

The screen prompts you to insert backup diskette 01 (the first diskette)
in the source drive and press any key when ready. The program copies
the files from the source disk to the target disk and displays the
filenames on the screen as they are copied. The screen also displays the
date the files were backed up.

After all the files on the first disk have been copied, the screen prompts
you to backup diskette 02, if necessary. Follow the screen prompts
insert
until all thehave been restored. Then press any key to return to
files

the Restore Files menu. Move the cursor block up to EXIT and press
Enter to return to the File Utilities menu.

Replace Files
The Replace Files option replaces a file or group of files on the target

disk with those from the source disk that have the same name, and
displays the filenames on the screen as they are replaced. Yoh can also
add from the source disk that do not exist on the
files target disk. You
cannot replace hidden files or system files.

This option runs the MS-DOS REPLACE program.


When you select the Replace Files option, the screen displays this menu:

EXIT
Source =

Target =
NO Add Files Not On The Target
NO Prompt Before Replacing or Adding Files
NO Overwrite Read-Only Files
NO Search All Directories
NO Pause Before Beginning
*********** START REPLACE
************

Epson Menu Utilities 5-15


You must enter the appropriate information for the first two items in
thismenu. The rest of the options offer a choice between NO or YES;
you can either accept the default (NO) or press Enter to change the
parameter to YES. Use the Replace Files options as follows:

Source—Type the drive letter, pathname, and filename of the file or files
on the source disk. These will replace matching files on the target disk.
You can use wildcards to identify a group of files. For example, to select
the files from drive A in the \ LETTERS directory that have the
extension .NEW, you would type:

A: \ LETTERS NEW
Target—Type the drive letter and pathname for the files you want to be
replaced on the target disk. For example, to replace the files on drive C
in the \ LETTERS directory you would type:

C : \ LETTERS
Add Files Not On The Target—If you only want to add files from the
source disk that do not exist on the target disk, select YES. This option
adds new files but does not replace existing ones. You cannot select both
this option and the Search All Directories option; choose one or the
other.

Prompt Before Replacing or Adding Files—If you want the program to


prompt you to respond Yes or No for each file before replacing (or not
replacing) it select YES.

Overwrite Read-Only Files— If you want files on the source diskette to


replace matching files on the target disk that are set to be read-only,
select YES. (You can with the Change
set a file as read-only File
Attributes option— see below—or the ATTRIB command.)

Search All Directories—If you want the files on the source diskette to
replace matching files in all subdirectories of the target directory, select
YES. You cannot select both this option and the Add Files Not On
The Target option; choose one or the other.

Pause Before Beginning— If you want the program to pause before it

starts so you can insert the source diskette, select YES.

5-16 Epson Menu Utilities


When you have made your selections, move the cursor block down to
START REPLACE and press Enter to begin replacing files. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again.

The program replaces the files on the target disk with those from the
source disk that have the same name, and displays the filenames on the
screen as they are replaced. Then the screen prompts you to press any
key to continue, and the Replace Files menu reappears. Move the cursor
block up to EXIT and press Enter to return to the File Utilities menu.

Compare Files

Use the Compare Files option to compare the contents of two files. This
option shows you exactly what the differences are, and you can output
the results to either the screen or to another file. The files can be either
text files or binary files.

This option runs the MS-DOS FC program.

Note
If you just want to know if two files are different and are not concerned
about exactly how, you may want to use the COMP (compare)
command instead. See COMP in Chapter 4 for instructions.

Epson Menu Utilities 5-17


When you select the Compare Files option, this menu appears:

EXIT
Filenamel =
Filename2 =
NO Abbreviate the Output
NO Force a Binary Comparison
NO Ignore the Case of Letters
NO Force a DOS Text File Comparison
NO Display Line Numbers
NO Compress Tabs Only
NO Compress Tabs and Spaces
NO Reset the Internal Line Buffer
NO Specify Number of Matching Lines
YES Output to the Screen :

************ START
F C ************

You must enter the exact filenames for the first two items in this menu.
The rest of the options offer a choice between NO or YES; you can
either accept the default or press Enter to change the parameter. Use
the Compare Files options as follows:

Filenamel—Type the drive letter, pathname, and filename for the first
file.

Filename2—Type the drive letter, pathname, and filename for the


second file.

Abbreviate the Output—If you want to see only the first and last lines
of each section of text that is different, select YES.

Force a Binary Comparison—Any file with the extension .EXE, .COM,


.SYS, .OBJ, .LIB, or .BIN automatically receives a binary comparison. If
you want to force a binary comparison on another type of file, select
YES for this option.

Ignore the Case of Letters — If you want the comparison to ignore


whether letters are uppercase or lowercase, select YES.

5-18 Epson Menu Utilities


Force a DOS Text File Comparison— Any standard DOS text file
automatically receives an ASCII comparison. If you want to perform an
ASCD comparison on a system file (one with the extension .EXE,
.COM, .SYS, .OBJ, .LIB, or .BIN), select YES for this option.

Display Line Numbers—This option assigns a line number for each line
of text in the two you want to see the line numbers for the files
files. If

as they are compared, select YES. You cannot use this option if you are
comparing binary files.


Compress Tabs Only Normally, the comparison expands tabs to eight
spaces. If you want to compress each tab to only one space, select YES.

Compress Tabs and Spaces—If you want to compress both tabs and
contiguous blank spaces to a single space, select YES.

Reset the Internal Line Buffer— If the program finds more than 100 lines
in the two files that are different, it aborts the comparison. You can use
this option to define a different value for the internal line buffer. First

select YES to reset the buffer. A small box appears to the right of the
menu. Type the number of lines you want to be the maximum amount
of differing lines before the comparison is aborted, from 1 through 999.
Press Enter.

Specify Number of Matching Lines—Normally, the program expects to


find at least two same after finding a difference to
lines that are the

continue the comparison. If you want to specify a different number,


press Enter. A small box appears to the right of the menu. Type the
number (from 1 through 9) you want to be the minimum amount of
matching lines for the comparison and press Enter.

Output to the Screen — If you want the comparison to be recorded to a


file or a printer instead of on the screen, select NO. Then type a name
for the file to be created or the device name for the printer, including

the drive letter and pathname if necessary.

When you have made your selections, move the cursor block down to
START FC and press Enter to begin replacing files. If you have entered
any invalid information in the menu, an error message appears stating

what is wrong. Correct the error and select the START option again.

Epson Menu Utilities 5-19


The program compares the two files and displays information about
them on the screen (or stores the information in a file if you chose to
output to a file). Then the screen prompts you to press any key to
continue, and the Compare Files menu reappears. Move the cursor
block up to EXIT and press Enter to return to the File Utilities menu.

Change File Attributes

Use the Change File Attributes option to change the read-only attribute
or archive bit of a file or group of files. When you set a file to read-only,
can be read, but cannot be altered or deleted. The archive bit tells
it

MS-DOS if a file has been altered so commands such as BACKUP and


XCOPY know whether to copy it.

This option runs the MS-DOS ATTRIB program.


When you select the Change File Attributes option, the screen displays
this menu:

EXIT
Filename
No Change Read-Only Attribute
No Change Archive Attribute
NO Include All Subdirectory Files
******* START ATTRIB
******

Use the Change File Attributes options as follows:

Filename—Type the drive letter, pathname, and filename of the file or


whose attributes you want to change. You can use wildcards to
files

identify a group of files. For example, to on drive B in the


select all files
\ SALES directory that have the extension .87, you would type:

B : \ SALES \ . 87

Read-Only Attribute—If you want to change the read-only attribute of


the specified file or files, move the cursor to this item and press Enter.

5-20 Epson Menu Utilities


A small box appears to the right of the menu with these options:

To turn the read-only attribute on, move the cursor to Set. To turn the
attribute off, move the cursor to Cancel. Select No Change if you don’t
want to change anything. Press Enter.

Archive Attribute — If you want to change the archive attribute of the


specified file or files, move the cursor to this item and press Enter. A
small box appears to the right of the menu with these options:

To turn the read-only attribute on, move the cursor to Set. To turn the
attribute off, move the cursor to Cancel. Select No Change if you don’t
want to change anything. Press Enter.

Include All Subdirectory Files — If you want to include all files in any
subdirectories of the specified filename, select YES.

When you have made your selections, move the cursor block down to
START ATTRIB and press Enter to begin. If you have entered any
invalid information in the menu, an error message appears stating what
is wrong. Correct the error and select the START option again.
The program changes the attributes as specified, or if no change is

selected for attributes it The screen then


displays the current attributes.
prompts you to press any key to continue, and the Change File
Attributes menu reappears. Move the cursor block up to EXIT and
press Enter to return to the File Utilities menu.

Epson Menu Utilities 5-21


Copy Files/Directories
Use the Copy Files/Directories option to copy files and directories. This
is a useful way to copy groups of files within their directories, which you

cannot do with the COPY command.

This option runs the MS-DOS XCOPY program.


When you select the Copy Files/Directories option, the screen displays
this menu:

EXIT
Source
Target =
NO Copy Only Modified Files
NO Duplicate Empty Subdirectories
NO Copy Files and Turn Off Archive Attribute
NO Prompt Before Copying Each File
NO Include Files In All Subdirectories
NO Check the Copy Against the Original
NO Pause Before Starting
NO Copy Files After a Date
************** START XCOPY
**************

You must enter the exact file information for the first two items in this
menu. The rest of the options offer a choice between NO or YES; you
can either accept the default (NO) or press Enter to change the
parameter to YES. Use the Copy Files/Directories options as follows:

Source—Type the drive letter, pathname, and filename of the file or files

on the source disk you want to copy to the target disk. You can use
wildcards to identify a group of files. For example, to copy all the files

from drive C in the \ SALES directory you would type:


C: \ SALES \

5-22 Epson Menu Utilities


Target —Type the drive letter, pathname, and filename where you want
to store the copies. For example, to copy the files to the \ SALES
directory on drive B, you would type:

B: \ SALES

Copy Only Modified Files If you want to copy only those files that
have been modified, select YES. This option copies files whose archive
bit has been set, but does not turn off the archive bit of the source file.

Duplicate Empty —
If you want to copy empty
Subdirectories
subdirectories (those that do not contain any files) in addition to those
that contain files, select YES. You must also select the Include Files In
All Subdirectories option when you select this option.

Copy Files and Turn Off Archive Attribute — Like the Copy Only
Modified Files option, this option copies only those files that have been
modified, but it also turns off the archive bit on the source files. If you
want the archive bit on the source files turned off after the files have
been copied, select YES.

Prompt Before Copying Each File — If you want the program to prompt
you to respond Yes or No before it copies (or does not copy) each file,

select YES.

Include Files In All Subdirectories — If you want the program to copy


files in all subdirectories of the specified source directory (in addition to
the files in the source directory), select YES.

Check the Copy Against the Original— If you want the program to
check the copy against the source file after it copies each file, select YES.
If anything is wrong, the program copies the file again.

Pause Before Starting — If you want the program to pause before starting
the copy operation so you can swap diskettes if necessary, select YES.

Copy Files After a Date — If you want to copy only those files that were
modified on or after a certain date, select YES. A small box appears to
the right of the menu with this prompt (for the United States):

MM-DD-YYYY

Epson Menu Utilities 5-23


Enter the date in this format — two digits each for the month and day
and four digits for the year. (The format depends on the COUNTRY
command in your CONFIG.SYS file.) You do not enter the dashes. For
example, for May 28, 1988 you would type:

05281988
Then pressEntGr to move the cursor back to the large menu. If you
type an invalid date (more than 12 for the month or 31 for the day),
you must reenter the date.

When you have made your selections, move the cursor block down to
START XCOPY and press Enter to begin. If you have entered any
invalid information in the menu, an error message appears stating what
is wrong. Correct the error and select the START option again.

The program copies the files The screen then prompts you
as specified.
to press any key to continue,and the Copy Files/Directories menu
reappears. Move the cursor block up to EXIT and press Enter to return
to the File Utilities menu.

Disk Utilities

When you select the Disk Utilities option from the main menu, the
screen displays these options:

EXIT
Check Disk
Disk Copy
Disk
Compare
Format Disk

Move the cursor block to the option you want and press Enter. Then
follow the appropriate instructions below for that option.

The Disk Utilities option calls the Epson program DU. When you select
one of the options from this menu, DU runs the corresponding
MS-DOS command.

5-24 Epson Menu Utilities


Check Disk
Use the Check Disk option to check the directories, files, and file

allocation tables on the specified disk. The program displays a disk and
memory status report. This option runs the MS-DOS CHKDSK
program.

When you select the Check Disk option, the screen displays this menu:

Destination = A:
NO Correct Errors
NO Display Messages
******** START CHECK DISK ********

Use the Check Disk options as follows:

Destination Drive— Enter the letter of the drive containing the disk you
want to check. The default is A. If you want to check a particular file or
group of files to see if they are contiguous, you can specify a filename as
well. For example, to check all files in drive A with the extension .TXT,
you would type:

A:*. TXT

Correct Errors — If you want the program to recover unoccupied space


left by file fragments, select YES.

Display messages— If you want the program to display filenames and


directories while it is running, select YES.

When you have made your selections, move the cursor block down to
START CHECK DISK and press Ent0r to begin. If you have entered
any invalid information in the menu, an error message appears stating
what is wrong. Correct the error and select the START option again.

The program checks the disk and files as specified. The screen then
prompts you to press any key to continue, and the Check Disk menu
reappears. Press T to return to the Disk Utilities menu.

Epson Menu Utilities 5'25


Disk Copy
Use the Disk Copy option to make an exact copy of a diskette. This

option runs the MS-DOS DISKCOPY program. It is a good idea to

write protect your source disk before copying it so you do not

accidentally destroy any of its data. (See your User’s Guide for

instructions.)

When you select the Disk Copy option, the screen displays this menu:


Source Drive
: Destination Drive
NO Copy a Single Side
******** START DISK COPY ********

Use the Disk Copy options as follows:

Source Drive— Enter the letter of the drive containing the source disk
(the disk you want to copy).

Destination Drive—Enter the letter of the drive containing the target


you have only one diskette
disk. (If drive, enter that letter for both the
source and destination drives.)

Copy a Single Side— If you are copying to a single-sided diskette, select


YES.

When you have made your selections, move the cursor block down to

START DISK COPY and press Enter to begin. If you have entered
any invalid information in the menu, an error message appears stating
what is wrong. Correct the error and select the START option again.

Follow the screen prompts carefully to insert and swap diskettes as


necessary. Be careful not to mix up the source and target diskettes.
When the diskette has been copied, this prompt appears:

Copy another diskette (Y/N)?

If you want to copy another diskette, press Y


and Enter and then
follow the screen prompts. If not, press N and Enter. The Disk Copy
menu reappears. Press t to return to the Disk Utilities menu.

5-26 Epson Menu Utilities


Disk Compare
Use the Disk Compare option to compare the contents of one diskette
with another. This option runs the MS-DOS DISKCOMP program.
When you select the Disk Compare option, the screen displays this
menu:

: Source Drive
: Destination Drive
DOUBLE Single/Dbl Sided
9 8/9 Sectors/Trk
*** START DISK COMPARE ***

Use the Disk Compare options as follows:

Source Drive — Enter the letter of the drive containing the first of the
two diskettes you want to compare.

Destination Drive— Enter the letter of the drive containing the second
you have only one diskette drive, enter that drive
diskette. (If letter for
both the source and destination drives.)

Single/Dbl Sided — If you are comparing two 514-inch single-sided


diskettes, select SINGLE.

8/9 Sectors/Track—If you are comparing 5 ’/4-inch diskettes that were


originally formatted with eight sectors per track, select 8.

When you have made your selections, move the cursor block down to
START DISK COMPARE and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again.

Follow the screen prompts to insert and swap diskettes as necessary.


When the diskettes have been compared, this prompt appears:

Compare another diskette (Y/N)?

Epson Menu Utilities 5-27


If you want to compare more diskettes, press Y and Enter and then
follow the screen prompts. If not, press N and Enter. The Disk
Compare menu reappears. Press t to return to the Disk Utilities menu.

Format Disk
Use the Format Disk option to format a diskette or the hard disk so
MS-DOS can write to it and read it. The diskette can be a new, blank
diskette, or one that contains data you do not want to keep. For a hard
disk you may want to use the SELECT command instead because it
automatically installs MS-DOS (with the country information) on the
disk.

This option runs the MS-DOS FORMAT program.

Warning
The FORMAT program erases all data on the diskette. Be sure you do
not want to keep any files on a used diskette before you reformat it.

When you select the Format Disk option, you see this prompt:

Destination Drive
Enter the letter of the drive containing the diskette you want to format.
When you press Enter or i, the screen displays a menu such as this:

A: Destination Drive
DOUBLE Single/Double Sided
NO 8 Sectors / Track
NO Create System Disk
NO Create Volume Label
NO Create MS-DOS Area
1.2MB Media in 1.2MB Drive
NO Sectors / Track
NO Tracks
***** START DISK FORMAT *****

This menu shows all possible options; if your system configuration is

different, you may not see all of these.

5-28 Epson Menu Utilities


Use the Format Disk options as follows:

Single/Double Sided—If you are formatting a 514-inch single-sided


diskette, select SINGLE.

8 Sectors/Track— If you want to format a 514-inch diskette with eight


sectors per track, select YES.

Create System Disk—If you want to copy the MS-DOS system files to
the diskette so it will be bootable, select YES.

Create Volume Label—If you want the disk to have a volume label,
select YES. The program prompts you for the name when it is running.

Create MS-DOS Area —This option reserves space on an 8-sectored


514-inch diskette for the MS-DOS system files without creating a system
disk. If you select this option (YES), you can later copy any version of
MS-DOS to the disk with the SYS command; without the option, you
can place only version 3.3 of MS-DOS on the disk.

Media in 1.2MB Drive If you want — to format a 360KB diskette in a


1.2MB drive, select 360KB.

Sectors/Track—If you want a 1.2MB or 1.44MB diskette to be


formatted to useless than the maximum capacity allowed by a disk

YES. A small box appears to the right of the menu. Enter


drive, select
the number of sectors per track you want the diskette to be formatted
with and press Enter. For a 1.2MB diskette, nn is equal to 15, 9, or 8.
For a 1.44MB diskette, nn is equal to 18 or 9.

Tracks—If you want a 1.2MB or a 1.44MB diskette to be formatted to


use less than the maximum capacity allowed by a disk drive, select YES.
A small box appears to the right of the menu. Enter the number of
tracks you want the diskette to be formatted with and press Enter. For
a 1.2MB diskette, you can enter 40 or 80. For a 1.44MB diskette, you
can enter only 80.

When you have made your selections, move the cursor block down to
START DISK FORMAT and press Enter to begin. If you have entered
any invalid information in the menu, an error message appears stating
what is wrong. Correct the error and select the START option again.

Epson Menu Utilities 5-29


Follow the screen prompts to insert the diskette or enter a volume label,

as necessary. When the disk has been formatted, this prompt appears:

Format another (Y/N)?


If you want to format another diskette, press Y and Enter and then
follow the screen prompts. If not, press N and Enter. When the Format
Disk menu reappears, press T to return to the Disk Utilities menu.

Mode Settings
When you select the Mode Settings option from the main menu, the
screen displays these options:

EXIT
Video Display
Printer
Serial Port
Redirect LPTn
Code Page

These options let you define the operation of your printer, monitor or
serial port, and control code page switching.

Move the cursor block to the option you want and press Enter. Then
follow the appropriate instructions below for that option.

The Mode Settings option runs the MS-DOS MODE command. Any
changes you make remain in effect until you change them, or turn off

or reset the computer.

Video Display
Use the Video Display option to change the way your screen displays
text. When you select this option, the following menu appears:

BW80 Attributes
None Alignment
No Test Pattern
*** START VIDEO SETUP ****

5-30 Epson Menu Utilities


Table 5-2 shows the default and alternative values you can select for
these parameters.

Table 5-2. Video display parameters

Option Default Alternative

Attributes (black & white or color, 40 or BW80 40


80 columns of screen image width) 80
BW40
CO40
CO80
MONO
Alignment (column shift to offset screen None Right
image on monitor) Left

Test Pattern (display number pattern to No Yes


see if screen image is centered)

When you have made your selections, move the cursor block down to
START VIDEO SETUP and press Enter to begin. If you have entered
any invalid information in the menu, an error message appears stating

what is wrong. Correct the error and select the START option again.

Follow the screen prompts until the Video Display menu reappears.
Move the cursor block back up to return to the Mode Settings menu.

Printer
Use the Printer option to select the printer device and to change the
way it prints. When you select the Printer option, this menu appears:

LPT1 Printer #
132 Chars Per Line
6 Lines Per Inch
No Retry on errors
** START PRINTER SETUP ***

Epson Menu Utilities 5-31


Table 5-3 shows the default and alternative values you can select for
these parameters.

Table 5-3. Printer parameters

Option Default Alternative


Printer # (printer device number) LPT1 LPT2
LPT3
Chars Per Line (number of characters 132 80
to print)

Lines Per Inch (number of lines to 6 8


printper vertical inch)
Retry on errors (entry print when No Yes
errors occur)

Note: You can use only printer device LPT 1 unless you install additional
option cards for multiple printer ports.

When you have made your selections, move the cursor block down to
START PRINTER SETUP and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again. Follow the screen prompts until the Printer menu reappears.
Then move the cursor block back up to return to the Mode Settings
menu.

Serial Port

Use the Serial Port option to select the serial port you want to use and
to define the communication parameters. When you select the Serial
Port option, this menu appears:

C0M1Port Number
9600Baud Rate
NoneParity
8 Data Length
1 # of Stop Bits
No Retry on errors
* START SERIAL PORT SETUP *

5-32 Epson Menu Utilities


Table 5-4 shows the default and alternative values you can select for
these parameters.

Table 5-4 Serial port parameters

Option Default Alternative


Port Number (communications port C0M1 COM2
number) COM3
COM4
Baud Rate (bits transmitted per second) 9600 110
150
300
600
1200
2400
4800
19200
Parity (checking method for bits NONE ODD
transmitted) EVEN
Data Length (number of bits in each 8 7
character transmitted)
# of Stop Bits (number of bits used to 1 2
flag transmitted characters)

Retry on errors (retry when errors occur) No Yes

Note: You can use only communication port COM1 unless you install

additional option cards for multiple serial ports.

When you have made your selections, move the cursor block down to
START SERIAL PORT SETUP and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again.

Follow the screen prompts until the Serial Port menu reappears. Then
move the cursor block back up to return to the Mode Settings menu.

Epson Menu Utilities 5-33


Redirect LPTn
Use the Redirect LPTn option to redirect data from the printer port to
the serial port. When you select this option, the following menu
appears:

LPT1 Printer It
C0M1 Port Number
* START PRINT REDIRECTION *

Table 5-5 shows the default and alternative values you can select for
these parameters.

Table 5-5. Redirect LPTn parameters

Option Default Alternative


Printer # (printer
receive output)
device number to LPT1
nmm
PSMl
Port Number (communications port COM1
directing printer output)

Note: You can use only COM1 unless you install special option cards
with additional hardware input/output ports.

When you have made your selections, move the cursor block down to
START PRINT REDIRECTION and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again.

Follow the screen prompts until the Redirect LPTn menu reappears.
Then move the cursor block back up to return to the Mode Settings
menu.

5-34 Epson Menu Utilities


Code Page
MS-DOS lets you choose from five different code pages (international
character sets) so you can produce characters not available in the default
character set.

Note
Be sure to read Chapter 9 for information on code page switching
before you use the Code Page option.

Use the Code Page option to do the following:

• Prepare one or more code pages to be selected for use by your


monitor or printer.

• Select (activate) which code page to use with which device.

• Display the current status of code page selections for a particular


device.

• Refresh (reselect) a code page that was deactivated because of an


error, such as a printer malfunction.

When you select the Code Page option, this menu appears:

Prepare
Select
Status
Refresh

Move the cursor block to the option you want and press Enter. Then
follow the appropriate instructions below for that option.

Epson Menu Utilities 5-35


Prepare— Before you can prepare a code page, you must have used the
DEVICE command in the CONFIG.SYS file to activate the device
driver(s) you want to be able to use code page switching. (See Chapter 6
for instructions.)

When you select the Prepare option, this menu appears:

CON Device
Code Page List
EGA. CPI File Name
** START PREPARE SETUP **

Table 5-6 shows the default and alternative values you can select for
these parameters.

Table 5-6. Prepare code page parameters

Option Default Alternative


Device CON PRN
LPT1
LPT2
LPT3
Code Page List None 437
850
860
863
865
File Name (code page
information file) EGA.CPI 4201. CPI

When you have made your selections, move the cursor block down to
START PREPARE SETUP and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
statingwhat is wrong. Correct the error and select the START option
again.

5-36 Epson Menu Utilities


Follow the screen prompts until the Prepare menu reappears. Press T to
return to the Code Page menu.

Select — Once you have prepared a code page, you use the Select
option to activate the code page for a particular device. When you
choose the Select option, this menu appears:

CON Device
850 Code Page List
** START SELECT SETUP ***

Table 5-7 shows the default and alternative values you can select for
these parameters.

Table 5-7. Select code page parameters

Option Default Alternative


Device CON PRN
LPT1
LPT2
LPT3
Code Page List None 437
850
860
863
865

You can select only one code page per device.

When you have made your selections, move the cursor block down to
START SELECT SETUP and press Enter to begin. If you have
entered any invalid information in the menu, an error message appears
stating what is wrong. Correct the error and select the START option
again.

Follow the screen prompts until the Select menu reappears. Press t to
return to the Code Page menu.

Epson Mentl Utilities 5-37


Status — Use the Status option to display the code page status for a
particular device. When you choose the Status option, this menu
appears:

CON Device
*** CODE PAGE STATUS ****

Press Enter to display the device list:

CON
PRN
LPT1
LPT2
LPT3

Choose the device for which you want to display the code page status.
Then move the cursor block down to CODE PAGE STATUS and
pressEnter to begin. If you have selected an invalid device, an error
message appears. Correct the error and try again.

The program displays the number of the active code page currently
selected and any other prepared code pages for the device. Press any key
to return to the Status menu. Press t to return to the Code Page menu.

Refresh— Use the Refresh option to reselect a code page that has been
deactivated because of an error. When you choose the Refresh option,
this menu appears:

CON Device
*** REFRESH CODE PAGE #**

5-38 Epson Menu Utilities


Press Enter to display the device list:

CON
PRN
LPT1
LPT2
LPT3

Choose the device for which you want to refresh the code page. Then
move the cursor block down to REFRESH CODE PAGE and press

Enter to begin. you have selected an invalid


If device, an error message
appears. Correct the error and try again.

The program refreshes the code page previously selected for the device.
Press any key to return to the Refresh menu. Press T to return to the
Code Page menu.

HELP
You can use the HELP option to display onscreen instructions for any
MS-DOS command or Epson utility. HELP provides a quick way to

learn about a new command or to quickly check something about a


familiar command.

The two programs that provide HELP information, HELRCOM and


HELPTXT, must be in the same directory. Also, if you are not logged
onto the directory containing these files, you must have previously used
the PATH command to set a path for these files.

When you select the HELP option, a directory listing of all the
commands appears on the screen.

You see this prompt at the bottom of the screen:

ti->*~Select command name,


Enter to display command. Esc to Exit

Epson Menu Utilities 5-39


Use the cursor keys to select a command name. (You can select only one
command name at a time from the menu.) When the correct command
is highlighted, press Enter. The help screen for the specified command
appears.

If there is more than one page of text, you see the prompt PgUp on the
top of the screen. Press Page Up to display the rest of.the text. After
reading the help information, press Esc to return to the menu.

Enter DOS Command


Use the Enter DOS Command option to run any MS-DOS command
from the MENU program. This is useful if you want to run a command
that is not included in the list of MENU options, but you don’t want to
leave the MENU program.
To use an MS-DOS command through MENU, COMMAND.COM
must either be in the current directory or must be part of the path
specified in the PATH command.
When you select this option, a command line appears for you to type
the MS-DOS command. The screen also shows the drive you are
currently logged onto, for example:

Current Drive: C
Enter the command you want to run, including the complete pathname
if necessary, and press Enter to execute it. For example, to display a
directory of the files on drive A, you would type the following and press
Enter:

DIR A:
The screen displays a list of all the files on drive A.

After the command has been completed, the screen displays this
prompt:

Press any key


Press a key to return to the command line. When you finish using this
option, press t to return to the main menu.

5-40 Epson Menu Utilities


SETPRINT
The SETPRINT program lets you choose a variety of options for your
Epson-compatible printer. By from the menu, you can change
selecting
such items as typeface and skip over perforation.

To run the program, log onto the directory containing the SETPRINT
program or enter the correct pathname, and then type SETPRINT and
press Enter. The screen displays this main menu:

Exit Program
Initialize Printer
Send Form Feed
Send Carriage Return
off CONDENSED Mode
off EXPANDED Mode
off EMPHASIZEDMode
off ITALICS Type Face
off ELITE Type Face
off Skip-Over-Perf
off Double-Strike
off Unidirectional Printing
off Proportional Spacing
PRINT this message as a test.

Each of the menu options acts as a switch for controlling your printer.
Use i or t to move the cursor block to an option. Press Enter to
activate the function or to select the alternate function.

Be sure to turn on and properly connect your printer before beginning.

When you have made your selection, move the cursor block up to Exit
Program and press Enter. Your printer now prints according to your
choices until you change them or turn off or initialize the printer.

Epson Menu Utilities 5 >41


Remember two important points about SETPRINT:

• SETPRINT is designed to control the printing of an entire


document or file. If you want to use a particular typestyle for only
part of a document, use the print control feature of your application
program.

• Some application programs, especially word processors, may cancel


your SETPRINT settings.

Options
The menu options make it very easy to select the way your printer

operates:

ExitProgram—This is your cursor’s default position when you first run


SETPRINT. Select this option to exit the program and return to the
MS-DOS command prompt.
Initialize Printer — Select this option to send a hardware reset that clears
any commands you may have set and restores all default settings.

Send Form Feed— Select this option to send a form feed code that
advances your paper to the next top of form, which is usually the top of

the next page. This command is handy for ejecting single sheets when
you finish printing.

Send Carriage Return— Select this option to advance the paper in your
printerone line. This is convenient any time you want to move the
paper up just a few lines. (This option sends a carriage return and a line
feed.)

CONDENSED Mode— Select this option to turn on (or turn off)


condensed mode. With condensed mode printing, 132 characters appear
on each line, instead of the usual 80.

EXPANDED Mode— Select this option to turn on (or turn off)

expanded mode. Expanded mode printing creates double-wide


and headings.
characters useful for emphasis

5-42 Epson Menu Utilities


EMPHASIZED Mode— Select this option to turn on (or turn off)

emphasized mode. Emphasized mode printing uses twice as many dots


for each character, slightly offsetting them to fill in and make the image
darker.

ITALICS Type Face — Select this option to turn on (or turn off) italic

character printing.

ELITE Type Face—Select this option to turn on (or turn off) elite

character printing. Elite characters print 12 to the inch instead of 10.

Skip-Over-Perf— Select this option to enable or disable automatic skip


over paper perforations while printing. When this option is on, your
printer leaves margins at the top and bottom of each page of
continuous-form paper. Do not use this feature if your application
program provides top and bottom margins.

Double-Strike— Select this option to turn on (or turn off) double-strike


printing. Double-strike printing makes two passes on each line, giving a
darker image.

Unidirectional Printing— Select this option to enable (or disable)


unidirectional printing. Ordinarily, your printer prints in both directions
(bi-directional) to save time. When you want a more precise vertical line,
such as you might use to rule a table, unidirectional printing provides
greater accuracy.

Proportional Spacing— Select this option to enable (or disable)


proportional spacing. The width of proportional characters varies from
character to character. Therefore, a narrow letter like i receives less
space than a wide letter like W.

PRINT this message as a test —When you have made the selections you
want from the above list, you can test the appearance of their output by
using this option to print a sample line. Press Enter to print the sample
line using the options you have selected.

Epson Menu Utilities 5-43


Cautions
While you can’t damage your printer or stored data through a misuse of
SETPRINT, there are things you need to be aware of so the operation
goes smoothly.

Always be sure that your printer is on and on line before using


SETPRINT. Your setup codes do not affect the printer unless it is
connected and ready.

The SETPRINT codes are mainly for Epson-compatible dot-matrix


printers. The typeface and print mode options apply only to dot-matrix
printing; naturally, a daisy wheel cannot compress or expand its

characters. However, a daisy wheel printer can print unidirectionally,


perform double-strike, and skip over perforations, if it uses Epson-
compatible codes.

Some application programs automatically send reset codes to the printer,


which could clear any settings you make with SETPRINT. Read the
documentation for your application program to see if its codes interfere
with SETPRINT’s printer configurations and if you can disable its reset
code. If not, you can probably choose the same options through your
application program.

Once you select the configuration for your printer and exit SETPRINT,
the new configuration does not appear on the SETPRINT menu. It isn’t
possible to read the status of the printer and display it. Anytime you are
unsure of how your printer is you can print the test message to
set up,

verify it, or use the Initialize Printer option and reconfigure.

SETPRINT always directs its codes to the parallel port of your


computer. If you are using a serial printer connected to the serial port,
your printer does not receive SETPRINT’s codes unless you have
redirected LPT to the COM port. In this case, the Initialize Printer
option does not work. (See the description of the Mode Settings option
of the MENU command earlier in this chapter.)

5-44 Epson Menu Utilities


XTREE
XTREE does the work of nine MS-DOS internal commands — and it

provides several other features not available elsewhere in MS-DOS. The


MS-DOS command functions that XTREE puts into a convenient
menu format are shown in Table 5-8.

Table 5-8. XTREE command features

MS-DOS XTREE command features


commands
DIR Displays all the directories as well as the files they
contain and the file statistics

DEL Deletes files individually or in groups, by file

specification and by tagging


COPY Copies files individually or in groups, to any directory
on any disk
TYPE Displays the content of any text file

RENAME Renames files individually or in groups, by using


wildcards
MKDIR Makes new directories within your present directories

RMDIR Removes empty directories

CHDIR Changes from one directory to another instantly

VOL Displays the volume label of your disk

XTREE also offers special functions that allow you to:

• Create or change volume labels at any time, without reformatting

• Display every file on a disk, regardless of its directory

• Display the complete directory structure of a disk in a single graphic


representation

• Move a file, or files, from one directory to another on the current


disk

• Assign new names to files as they are copied

• Print the contents of a file on the printer

Epson Menu Utilities 5-45


• Rename a directory at any time, whether or not it contains files

• Display and change the attributes of any file; attributes are special
switches that you use to designate files as read-only, hidden, system,

or archived

• Display data in either ASCII or hexadecimal format

• Execute programs

• Display how much space is available on your disks

• Modify screen parameters.

Caution
Remember that XTREE is very powerful. You can erase a group of files

by merely pressing a couple of keys. If you begin an operation and then


change your mind, press F3 to cancel it.

5-46 Epson Menu Utilities


Using the menu
To run the program, log onto the directory containing the XTREE
program or enter the correct pathname, and then type XTREE and
press Enter. The screen displays a menu similar to this:

Path: \

FILE: *.*

DISK: A:

Available

Bytes: 9,216

ntSK Stat.i st.i os

APPEND .EXE FIND .EXE SUBST .EXE Total

ASSIGN .COM FORMAT .COM TESTBUG .COM Files: 30

ATTRIB .EXE GRAFTABL .COM TREE .COM Bytes: 337,015

BACKUP .COM GRAPHICS .COM XTREE .EXE Matching

CHKDSK .COM JOIN .EXE XTREEINS .DAT Files: 30

COMMAND .COM LABEL .COM XTREEINS .EXE Bytes: 337,015

COMP .COM MORE .COM Tagged

DEBUG .COM PRINT .COM Files: 0

DISKCOMP .COM RECOVER .COM Bytes: 0

DISKCOPY .COM RESTORE .COM Current Directory

EDLIN .COM SHARE .EXE \

FC .EXE SORT .EXE Bytes: 337,015

DIR Available Delete Filespec Log disk Makedir Print Rename

COMMANDS ^Showall A Tag %itag Volume execute

ti scroll RETURN file commands ALT menu FI quit F2 help

Note
If your monitor seems to flicker or shows interference (snow) in the
background when XTREE, you may want to run the
you are using
program XTREEINS to improve the display. See the XTREEINS
command in this chapter.

Epson Menu Utilities 547


This screen shows you directories and files at a glance, displays the vital
statistics of a disk, and identifies the command and control keys
available. Taking the screen a section at a time, here’s what it contains:

• Top line —The path shown here is your current path location in a

disk’s directory structure. If only a backslash ( \ ). symbol displays,


you are in the root directory.

• FILE box—This is the key to displaying files. -Only files that match
the specification shown here can appear on the screen; all others are
invisible. The wildcard characters (*.*) you first see in this box allow
all files to match, so they are all displayed.

• DISK box—This box identifies the disk you’re looking at, its label,
and the amount of space available. XTREE updates this
information every time you log onto a new drive or make a change
on a disk.

• DISK/DIRECTORY Statistics box—This box summarizes your


disk s vital statistics. When you position the cursor on a directory
name, this box displays information about the whole disk (DISK
Statistics) plus the name of the directory. When you place the cursor
on a file, this box displays information about the directory
containing the file (DIRECTORY Statistics) plus the name of the
file. XTREE updates this information each time you make a
change.

This box contains these subheadings:

—Total. The total files and bytes present on a disk or in a directory.

—Matching. The number of files and bytes on a disk or in a


directory that match the specification given in the FILE box.

—Tagged. The number of files and bytes on a disk or in a directory


that you tag with a diamond symbol. Tagging marks the files you
want a command to affect.

5-48 Epson Menu Utilities


• Directory window—The large box at the upper left shows the
directory structure of your disk. If your disk has no subdirectories
only the root directory symbol ( \ ) appears. The names of all
directories branching from the root are displayed underneath the
root, with subdirectories indented to the right. To find a particular
directory or file, begin by moving the cursor through the names on
this display.

As many as 10 directories may appear in this window at one time. If

there are more, you can scroll the cursor up or down to see them.

• Files window—The large box shows the files of


at the lower left

individual directories. The the one the cursor


current directory is

position indicates on the directory window above. Press Enter to


move the cursor into the files window in order to work with
individual files. Enter again to expand the
Press file window and
display more files. Press Enter one more time to restore the cursor
to the directory window.

This window expands or contracts, depending on the number of


files in a directory. When the directory window is present above, it

shows up to 36 files; when the display expands, can show as


it many
as 57 files. If there are more files, scroll the cursor to the upper left

or lower right to view them.

• DIR/FILE COMMANDS line—Just below the windows are two


lines that identify the XTREE command keys. The highlighted
initials of these commands represent the keys you press to use
XTREE’s many functions. The single-key commands apply to
individual or directories, while the control-key combinations
files

(such as Ctrl A) affect all tagged files.

Two sets of commands are available. The commands that apply to


directories(DIR COMMANDS) are visible when the cursor is in
the directory window, and the commands that apply to files (FILE
COMMANDS) are visible when the cursor is in the files window.

Epson Menu Utilities 5-49


For both DIR COMMANDS and FILE COMMANDS, press the
Alt key to see the Alt commands that are available. You invoke the
Alt command by holding down the Alt key and pressing one of the
specified letters. The Alt commands are either seldom used
commands or an alternate form of an existing command.
• Prompt line — This helpful reminder is constantly present at the
lower left corner of the screen. Regardless of which XTREE function
you’re using, this line identifies the keys that control the screen
display and the commands you need to complete the function.

• Function key line—This line at the lower right corner of the screen
shows the function key commands available to you.

Using this collection of displays and commands is very easy. Follow the

directions on the prompt line to move the cursor through the directory
and file displays, or try the S command to show all your disk’s files on
screen at once. Press L to log onto other drives — and watch XTREE
gather a disk’s statistics into a display showing its directory structure and
files.

Options
You can perform numerous directory and file functions with XTREE.
Before you begin any work with XTREE, always make sure that you log
onto the correct drive to work on its directories or files.

Look at the drive letter and disk label that appear in the DISK box of
the menu screen. To log onto a different drive, press L, and then press
the letter of the appropriate drive.

Remember that the specification shown in the FILE box determines


which files appear. You can work on only the files you can see, and you
can see only the files that match the specification. When you need to
limit the files shown, press F and type the new specification; then press
Enter.

5-50 Epson Menu Utilities


XTREE options fall into four groups:

• Cursor controls— to select directories and files

• Key commands —to act on directories and files

• Function key choices—to control XTREE itself

• Alt key functions — to act on directories and files.

The cursor controls * t i are shown on the prompt line at the


lower left of the screen. These keys move through the displays of
directories and files. You can also press Enter to toggle through the
windows in rotation.

The key commands come in two sets, one for directories (DIR
commands) and one for files (FILE commands). These commands
actually perform work on your disks. To use them, type the first letter of
the command (or Ctrl plus the initial). They are automatically executed
so you don’t need to press Enter. When you need to provide further
input, a prompt appears at the lower left of the screen.

The function keys are the main switches for XTREE. When you need a
helpful reminder, or when you need to start or stop execution of a
command, these keys act instantly to control the program.

The Alt key functions can be performed for the DIR commands or FILE
commands. Press Alt to see the available functions. To execute an Alt
command, hold down the Alt key and press the first letter of the
command. When you need to provide further input, you see a prompt
on the lower left side of the screen.

Epson Menu Utilities 5-51


DIR commands
Table 5-9 describes the key commands that you see when the cursor is
in the directory window. A
complete description of each command and
how it works follows the table.
Table 5-9 XTREE DIR commands
Command Access Description
name key
Available Shows available bytes
Delete Deletes empty directory other than root
directory

Execute X Executes an internal command or


AltX external utility without leaving XTREE
File display Alt F Changes the file display
Filespec Sets a new file specification in FILE box
Log disk Logs onto another disk
Makedir M Makes a new directory branching from
current directory
Print Prints directory information on the printer
Rename Renames any directory except root
directory

Show all files S Shows disk’s files on screen regardless of


directory
Ctrl S Shows all matching files that are tagged
Sort files AltS Changes the order in which files are
displayed
Tag T Tags all files in the selected directory
CtrIT Tags all files that match file specification
AltT Tags all files that match attribute settings

Untag U Untags all files in the directory


Ctrl U Untags all files that match specification
AltT Untags all files that match attribute settings,

Volume Creates or changes a volume label on


current disk
Available
Press A to see the number of bytes available on another disk. The
screen displays the following:

AVAILABLE SPACE on disk:


Press the letter representing the drive that contains the disk you
want to check. The screen displays:

nnn,nnn Bytes
press ANY KEY to continue
When you press a key, the prompt disappears and the directory
window reappears.

Delete
Press D to delete any empty directory other than the root directory.
To select a directory, place the cursor on it. When you press D, the
screen displays these prompts:

DELETE sub-directory: name


delete this directory (Y/N) ?

Press Y to delete or N to cancel the deletion. The directory window


reappears.

Execute
Press X to execute a different external command while you remain
in XTREE. XTREE logs onto your currently displayed directory
and displays the command line:

Current Path: A: \
>

Type the name of the command or program you want to run and
press Enter. For example, you can type FORMAT or CHKDSK to
format or check a disk. After thecommand or program executes,
the command line reappears. Press Enter to return to the XTREE
menu.

Epson Menu Utilities 5-53


Warning
Do not execute memory resident programs from XTREE. If you do,
XTREE does not reload after the program runs; instead, MS-DOS exits
XTREE and the A) prompt reappears. This type of exit can cause
problems in your computer’s memory. Run memory resident programs
only at the MS-DOS system prompt.

Files

Press F to set a new file specification in the FILE box (remember,

only the files thatmatch the specification appear on your screen or


can be affected by a command). When you press F, the screen
displays these prompts:

FILES specification:
enter a file spec or press RETURN for *.#
Type the new specification and press Enter, or press Enter alone to
accept the wildcards. After you enter the specification, it appears in
the FILE box and the commands reappear. The files that match the
new specification appear on your screen.

Log disk
Press L to log onto a different disk. You must log onto a disk
through XTREE before you can work on its files. When you press
L, the screen displays these prompts:

LOG DISK:
enter new default drive
Press the letter of the drive you want. XTREE logs the drive you
specify, reads the directory of that disk, and presents its file

structure.

5-54 Epson Menu Utilities


Makedir
Use this command to make a new directory. Before you press M,
however, position the cursor on the directory from which the new
directory should branch. If the root directory is the current
directory, it is identified by a backslash ( \ ). When you press M, the
screen displays the following:

MAKE sub-directory under: \ directory


as
enter new directory name
Type the name of the new directory and press Enter. The new
name adds to the file structure display and the commands reappear.

Print
Press P to print directory information on your printer. XTREE asks

you to select the type of directory data to be printed. Select one of


the following choices by keying the appropriate letter:

—Catalog of tagged files. names and


Select this option to print the
statistics of all files on the disk. The
that have been tagged
printout contains a heading for each directory on the disk that
has at least one tagged file, followed by the list of tagged files in
that directory.

—Pathnames. Select this option to print a list of all the path names
on the disk. Each path name is listed on a line by itself, and the
names are printed in the order you see them in the Directory
Window.

—Tree. Selecting this option gives you a printout of the directory


tree structure as you see it in the directory window.

For print functions, XTREE prints a heading at the top of each


page. The heading contains the name of the disk, time and date of
the printout, and the page number of the printout. XTREE assumes
that each print page is 66 lines long, which is standard for an
1 1-inch form.

You can cancel the print operation by pressing the F3 key.

Epson Menu Utilities 5-55


Rename
Use this command to rename any directory except the root
directory. Place the cursor on the directory you want to rename and
press R. The screen displays the following:

RENAME sub-directory: present name


to:
enter new directory name
Type the directory’s new name, using up to and
eight characters,
press Enter. XTREE displays the new name and the commands
reappear.

Show all files

Press S to show all your disk’s files on the screen. This command
displays every file, regardless of its directory. The files list

and you can read their path locations on the path


alphabetically,
line at thetop of the screen. You can view any files that don’t fit ori
the screen by scrolling the cursor to the upper left or lower right of
the window.

While showing all files, you are able to affect them by running other
XTREE commands. Press Enter to restore the display when you’re
done.

Tag
Press T to tag all files in a directory. To select a directory, just move
the cursor to its name and press T. A diamond symbol appears
beside all the files in the directory. Once you tag a file with this
symbol, it is subject to other XTREE commands such as copying
and deleting. Tagging allows you to define the files you are handling
as a group.

Untag
Press U to untag all files in the directory. Just move the cursor to the
directory and press U. This
removes all tags in a directory. Untag
the files when you complete an operation so you do not accidentally
affect them when executing a different operation later. This also
saves the work of untagging files individually.

5-56 Epson Menu Utilities


Volume
Press V to create or change a volume label on the disk you’re using.
This allows you to give a disk a new identification label without
using the LABEL command. When you press V, the screen
prompts:

CHANGE DISK VOLUME NAME: current name


to:
enter new volume name
Type the new name, using up to 1 1 characters; then press Enter.
The new name displays in the DISK box and the commands
reappear.

Ctrl Show all files

Press Ctrl S to display all matching files that are tagged. All
subsequent operations affect the display the same as the Show all

files command.

Ctrl Tag
Press Ctrl T to tag every file on your disk that matches the file

specification, regardless of its directory. The cursor can be on any


directory name. Diamond symbols appear next to all files, making

them subject to other XTREE commands, such as copying or


deleting.

Ctrl Untag
Press Ctrl U to untag every file on your disk that matches the file

specification, regardless of its The cursor can be on any


directory.
directory name. All the diamond symbols disappear, making the
files safe from the commands you use later.

Epson Menu Utilities 5-57


Alt eXecute
Press Alt X to execute programs and commands from XTREE. This
command is identical to the execute command with the following
important exception. When you return to XTREE, XTREE logs
back onto the current disk without updating the file structure. If
you have not added, removed, or changed any files or directories on
the logged disk, you will not have any problems. However, if you
made any changes to the logged disk, XTREE may have problems.
If you see this message:

ERROR: Disk has been changed

use the Log command to log onto the disk.

Alt file display


Press Alt F to change the format of the display in the file window.
This command displays the name, extension, size, and MS-DOS
attributes of each file, and organizes the list into two columns. All
subsequent displays in the file window new format, until
are in the

you press Alt F again. Then they are displayed with the date and
time as well. Press Alt F again to return to the three-column display.

Alt Sort files

Press Alt S to change the order in which files are displayed in the
file window. XTREE asksyou to select the sort order to use in all
subsequent displays in the file window. Select one of the following
by pressing the appropriate letter:

—Name. This is the normal sort order. Files are displayed in


alphabetical order by their names.

—Extension. XTREE displays the files in alphabetic order by their

file name extension. For example, all the *.DOC files appear
before the *.TXT files. Files with the same extension are displayed
in alphabetic order by name.

— Size. XTREE displays files ordered by their size. The largest files

appear first, followed by smaller files. Files with the same size are

ordered by name.

5-58 Epson Menu Utilities


Alt Tag
Press Alt T to tag all matching files on the disk with certain file

attributes set. The attributes of a file are four special bits that you
can switch on or off, causing the status of the file to change in
certain ways. File attributes are R/O (Read-only), Hid (Hidden), Sys
(System), and Arc (Archive):

—R/O (Read-only). When this attribute is on, the filename appears


on the directory but you can’t erase or write to the file, although
you can read it. This protects the file while keeping it visible for
reference. +R turns this attribute ON, and -R turns it OFF

—Hid (Hidden). When this attribute is on, the filename becomes


invisible on the directory, although the file is still on your disk.
You use this attribute to protect your When a file is hidden,
files.

you can’t erase it using the MS-DOS DEL or ERASE command.


XTREE, however, can always see the filename and erase it if

necessary. +H turns this attribute ON, and -H turns it OFF.

— Sys (System). When this attribute is on, the file is classified as a


system file. This causes it MS-DOS DIR
to be hidden from the
command and protects it from the DEL or ERASE command.
XTREE, however, can always see the file and erase it if necessary.
+S turns this attribute ON, and -S turns it OFF.
—Arc (Archive). When this attribute is on, XTREE marks the file.

The program interprets this mark to mean that the file was
modified since you created it. Programs that are sensitive to
modified and unmodified files may check this. XTREE allows you
to change the status of this switch. +A turns this attribute ON,
and —A turns it OFF.

When you select command, XTREE prompts you to


the Alt Tag
Type + or - followed by the attribute letter
enter a set of attributes.
(R, H, S, or A). A 4 means the attribute must be on for the file
-

to be tagged. A - means the attribute must be off.

Epson Menu Utilities 5-59


You can use any or all of the attributes for each file. For example,
type +A-R to tag all files on the disk with the A attribute on and
the R attribute off.
Alt Untag
Press Alt U to remove the tag from all files that match the attribute
setting. Enter the attributes the same way as for Alt Tag.

File commands
Table 5-10 describes the key commands that you see when the cursor is
in the files window. A complete description of each command and how
it works follows the table.

Table 5-10. XTREE FILE commands

Command K2lT
name
Attrib
mmm
A
'lift Description

Displays a file’s attributes for verification or


change; attributes include read-only,
hidden, system, and archive
Ctrl A Changes attributes of all tagged files

Copy C Copies file at cursor position


CtrIC Copies tagged files
all

Alt C Copies tagged files, duplicating


all

directories as necessary

Delete D Deletes file at cursor position


Ctrl D Deletes all tagged files

Execute X Executes external utility without exiting


Alt X XTREE
File display Alt F Changes the format of the display window
Files F Sets a new file specification in FILE box
Log L Logs onto different disk

Move M Moves the current file to another directory


Ctrl M Moves all tagged files to another directory

Print P Prints the current on the printer


file

Ctrl P Prints tagged files on the printer

5-60 Epson Menu Utilities


Table 5-10. XTREE FILE commands (continued)

’~ y
Command U»T
name
Rename
mmm
R
Description

Renames file at cursor location


Ctrl R Renames all tagged files

Sort files AltS Changes the order in which files are


displayed

Tag Tags file at cursor position


Tags all files in a directory
Tags all files that match an attribute setting

Untag Untags file at cursor position


Untags all files in directory
Untags all files that match an attribute
setting

View V Views contents of text file at cursor position

Attrib
Press A to display the attributes of a file in order to verify or change
them. When you press A, the screen displays the following:

ATTRIBUTES for file: filename mm-dd-yy hh:mm


R/0 Hid Sys Arc

enter attribute changes


You see the filename, the date and time the file was created, and the
attributes that are switched on. (If an attribute isn’t switched on, it

doesn’t appear.) The four attributes are R/O (Readonly), Hid


(Hidden), Sys (System), and Arc (Archive).

Type the attributes and press Enter. (The attributes are described
under the Alt Tag command.)

Epson Menu Utilities 5-61


For example, type +H+A and press Enter to hide and archive a file.

(You can set all four attributes at once.) When you set the

attributes, they are written to the disk directory. If you only want to
see the attributes, not change them, just press Enter. The prompt
disappears and the commands reappear.

Copy
Press C file at the cursor position. XTREE can duplicate
to copy the
the file any directory on any drive, and you can rename the file.
in
When you press C, the screen prompts you for the name of the new
file. Press Enter to use the same name or enter a new filename.

COPY file: filename as


to:
enter destination for copy ( [d:] {path} )

Type the drive and path destination for the and press Enter.
file

Now copies of the file exist at both the source and destination
locations. When copying is complete, the prompt disappears and
the commands reappear.

Delete
Press D to ielete the file at the cursor position. When you press D,
this prompt appears:

DELETE file filename :

delete this file (Y/N) ?

Press Y to delete the file or N to cancel the command. After you


select an option, the prompt disappears and the commands
reappear.

Execute
Use this command to execute a different external command while
you remain in XTREE. Move the cursor to the program you want
to run (FORMAT or CHKDSK, for example) and press X. The
command line displays:

Current Path: A: \
> command

5-62 Epson Menu Utilities


At this point, you can add parameters to the command line and
edit it, if necessary. (The function keys do not work when you are
editing the command line.) When you are ready, press Enter to
execute the command. After the program runs, the command line
reappears. Press Enter to return to the XTREE menu.

Warning
Do not execute a memory resident program from XTREE. If you do,
XTREE does not reload after the program runs; instead, MS-DOS exits
XTREE and the A) prompt reappears. This type of exit can cause
problems in your computer’s memory. Run memory resident programs
only at the A) prompt.

Files

Press F to set a new file specification in the FILE box. (Remember,


only the files that match the specification appear on your screen.)
When you press F, the screen prompts:

FILES specification:
enter a file spec or press Enter for
Type the new specification and press Enter, or press Enter alone to
use the wildcards. After you enter the specification, it appears in the
FILE box. The files on screen change to match the new
specification.

Press L to log onto a different disk. You must log onto a disk
through XTREE before you can work on its files. When you press
L, the screen displays the following:

LOG DISK:
enter new default drive
Press the letter of the drive you want. XTREE reads the directory of
the disk in the new drive, and displays its file structure.

Epson Menu Utilities 5-63


Move
Press M to move the current file to another directory. This
operation is similar to a copy followed by a delete of the original file,

except that it is faster. Also, the disk space required to hold two
copies of the file is not needed.

XTREE prompts you for a new filename. Press Enter to keep the
same name. XTREE asks you which directory is to receive the file.
You can enter any directory on the logged disk, but you may not
enter a drive descriptor. XTREE only moves files to the currently
logged disk.

Print
Press P to print the contents of the current file on your printer. If
the you wish to print does not contain text information, you
file

may see random and/ or nonsense characters appearing on the


printout.

XTREE prompts you to ready your printer. Make sure the printer is

turned on and that the paper is aligned theway you want. During
the printing of the file, you can cancel the operation by pressing F3.
After printing is complete, XTREE issues a top-of-form command to
the printer.

Rename
Press R to rename the file at the cursor position. When you press R,
the screen prompts:

RENAME file: filename


to:
enter new filename
Type the new name, using up to eight characters plus an optional
three-character extension, and press Enter. XTREE writes the new
name on your disk.

Tag
Press T to tag the file at the cursor position. This places a diamond
symbol next to the filename on screen and makes the file subject to
other XTREE multiple-file commands such as copying and deleting.

5-64 Epson Menu Utilities


Untag
Press U to untag the file at the cursor position. This removes the
diamond symbol next to the filename and protects it from other
XTREE multiple-file commands such as copying and deleting.

View
Press V to view the contents of the text file at the cursor position.
Only files containing alphanumeric (ASCII) characters can be
displayed properly on the screen. Program such as those with
files,

.COM or .EXE extensions, cannot be displayed properly unless you


use the Hex mode (described below). When you press V, the screen
displays the first page of the file. The techniques you use to move
the cursor through the text and display different parts of the file are:

—1 4 < —* Press t and 4 to scroll up and down through the text a


line at a time. Press <- or -* to scroll to the left or to the right
two columns at a time.

—Scroll speed. Press a number from 0 through 9 to scroll down


through the text continuously. Use the numeric keys 0 through 9
on the top of the keyboard (not the numeric keypad) to select the
scroll speed. Press 0 9 for the slowest speed. You
for the fastest,
can stop the scrolling by pressing any key (other than a numeric
key).

—Goto marker. Press G to go to a marker you have previously set


in your with the Set marker option (see description below). A
file

prompt asks you to enter a number from 0 through 9. Type the


number of the marker you want to go to (using the numeric keys
on the top row of your keyboard). When the marker is found,
that line appears at the top of your screen.
If you enter a number

thatyou did not previously set as a marker, the top of the


document displays on the screen.

—Hex mode. Press H to display the file in hexadecimal mode. This


is useful for displaying program files or documents created by
certain application programs. Press H again to return to ASCII
mode.

Epson Menu Utilities 5-65


—Set marker. Press S to set an invisible marker anywhere within
the displayed file. This allows you to later return directly to that
marker with the Goto marker option (see description above). A
prompt asks you to enter a number from 0 through 9 (use the
numeric keys on the top row of your keyboard). When you type
the number, it does not appear on the screen and it does not
affect the contents of your file.

—Page Up Page Down. Press Page Up to display the previous


screen page in your file. Press Page Down to display the next
screen page in the file.

—Home. Press Home to move to the beginning of the displayed


file.

—End. Press End to move to the end of the displayed file.

—Enter. Press Enter to quit viewing the file and return to the
XTREE menu.
When you are through using View, press Enter to return to the
XTREE menu.
Ctrl Attrib
Press Ctrl A to change the attributes of all tagged files in a directory.
These attributes are the same as the A command offers. When you
enter this command, the screen displays the following:

ATTRIBUTES for all tagged files

enter attribute changes


Type the attribute settings you want to affect on the tagged files and
press Enter. The cursor moves across the names of the tagged files
as the attributes for each change.

5-66 Epson Menu Utilities


Ctrl Copy
Press Ctrl C to copy all tagged files in a directory. XTREE duplicates
these files in any directory on any drive. When you use this
command, the screen displays the following:

COPY ALL TAGGED FILES


to:
enter destination for copy ( [d : ] [path] )

Type the drive and path destination for the files and press Enter.
XTREE asks one more question:

automatically replace existing files (Y/N) ?

You can either press Y, to automatically overwrite files of the same


name, or N to avoid overwriting.

Now, copies of the files exist at both the source and destination
locations. When copying is complete, the prompt disappears and
the commands reappear.

This command has an extra feature. If you are mass copying files to
a disk that becomes full, XTREE alerts you with this message:

Error: Disk Full, press ANY KEY to continue

You can replace the full disk with a new one and then press a key to
continue (you can reenter the drive and path, if desired). This
feature allows you to copy large groups of files, especially from a
hard disk, without being limited to a single destination disk.

Ctrl Delete
Press Ctrl D to delete all tagged files in a directory. When you use
this command, the screen displays the following:

DELETE ALL tagged files


confirm delete for each file (Y/N) ?

Epson Menu Utilities 5-67


Press Y if you want to double-check each file before is deleted or it

press N to delete every tagged file automatically. When you check


each deletion, the screen displays the following:

DELETE file filename :

delete this file (Y/N) ?

Press Y to delete or N to skip the file. When the deleting is

complete, the prompt disappears and the commands reappear.

Ctrl Move
Press Ctrl M to move all tagged files to another directory. The
moved files will no longer reside in the current directory.

Ctrl Print
Press Ctrl P to print on the printer the contents of all the files

currently tagged. If a file does not contain text information, you


may see random characters appearing on the printout.

XTREE prompts you to ready your printer. Make sure the printer is

turned on and the paper is aligned properly. During printing, you


can cancel the operation by pressing F3. After printing is complete,
XTREE issues a top-of-form command to the printer.

Ctrl Rename
Press Ctrl R to rename all tagged files in a directory. This command
applies the same you tag. You can’t, of
set of characters to every file

course, give every file in a directory an identical name, but you can
give them identical extensions if their names are different, or
identical names if their extensions are different. Use wildcards (*
and ?) to make substitutions to parts of the filenames. When you
use the Ctrl R command, the screen displays the following:

RENAME ALL tagged files


to:
enter wildcard file specification for rename

5-68 Epson Menu Utilities


Type the new name using wildcards for the unaffected part of the
filenames, and the specific characters that are to be substituted.
Then press Enter. For example, to change some text files from the
.DOC extension to the .TXT extension, type * . TXT. The cursor
moves across the names of the files as they change.

Ctrl Tag
Press Ctrl T to automatically tag all files in a directory. This saves
time when you want to use a multiple-file command such as Copy
on all the files of a directory. When you press Ctrl T, a
or Delete,
diamond symbol appears next to the name of each file in the
directory.

Ctrl Untag
Press Ctrl U to untag all the files in a directory. This removes the
diamond symbols next to the filenames, protecting them from other
XTREE multiple-file commands such as copying and deleting.

Alt Copy
Press Alt C to copy tagged files to another disk, duplicating any
directories that do not exist on the destination disk. Use this
command to preserve the directory structure of the source files. This
is extremely useful for performing backup operation. Alt Copy is

similar to Ctrl Copy, with the following exceptions:

• To specify the destination of the copy, enter only a drive letter. The
drive must be different from the current drive.

• When XTREE copies a file, it checks to see if the directory that


contains the file exists on the destination disk. If it does not exist,
XTREE creates the path.
• XTREE copies each tagged file to the destination disk using the
source pathname as the destination pathname.

Alt file display


F to change the format of the display in the file window.
Press Alt
This command displays the name, extension, size, and MS-DOS
attributes of each file, and organizes the list into two columns. All

Epson Menu Utilities 5-69


subsequent displays in the file window are in the new format, until
you press Alt F again. Then they are displayed with the date and
time, as well. Press Alt F again to return to the three-column
display.

Alt Sort files

Press Alt S which files are displayed in the


to change the order in
file window. XTREE you to asks
select the sort order to use in all
subsequent displays in the file window. This command is the same
as Alt Sort files in the ALT DIR commands menu.

Alt Tag
Press Alt T to tag all matching files on the disk with certain file

attributes set. File attributes are read-only, hidden, system, and


archive. This command is the same as Alt Tag in the ALT DIR
commands menu, except that only files in the directory are scanned
for matching attributes.

Alt Untag
Press Alt U
remove the tag from all files that match the attribute
to
setting. Enter the attributes the same way as for Alt Tag. This

command is the same as Alt Untag in the ALT DIR commands


menu, except only files in the directory are scanned for matching
attributes.

Function keys
At the lower right of the screen are the function keys that control
XTREE. They work as follows:

FI— Quit
Press FI to exit from XTREE at any time. This takes you out of the
program and returns you to the MS-DOS command prompt on the
default drive. When you press FI, the screen displays this prompt:

Quit XTREE and return to DOS (Y/N) ?

Press Y to exit or N to return to the XTREE menu.

5-70 Epson Menu Utilities


F2 — Help
Press F2 to display a series of screens that provide quick
explanations of XTREE windows, commands, and other helpful
information. Each Help screen page represents a section of the
XTREE menu display; each page has a number for easy reference.
When you press F2, the screen displays the following:

Path: \

XTREE Version 2.00 - HELP

(1)

(2)
(4)

(3)
(5)

(6,7)

(8) (9)

Find the number of the section you are curious about.


These are page numbers of the help screens that follow.
Use the cursor keys described below to move ahead.

T I Page Through Text, RETURN To The Program.

From here you can press i to display the HELP pages one at a time
or T to go back through them. Whenyou are through reading the
Help screens, just press Enter to menu. (HELP isn’t
restore the
available during the execution of commands.)

Epson Menu Utilities 5-71


F3 — Cancel
Press F3 to cancel any command in progress. This halts commands
and restores the command line to the screen. Sometimes there is a
delay before a command can stop. For example, during file copying
the command stops after it completes the copy of the current file.

When there is no activity to cancel, this key choice does not appear
on the screen.

F4 — Command display
Press F4 to toggle the command line display ON or OFF.
Alt FI — Quit
Press Alt FI to exit XTREE. This exit returns you to the MS-DOS
prompt, but the current directory used by MS-DOS is the same as
the last directory you selected while in XTREE.

XTREE offers two other options:

• When you type characters to specify a particular drive and path for
copying files, these characters are stored in a buffer. (A buffer is a
place in memory that stores information for later use.) Because of
this buffer, the characters reappear when you use the copy
command a second time. This makes sending files to the same or a
similar destination easier the second time. You can clear the buffer
by pressing ESC.

• As much as possible, XTREE protects against incorrect input. Many


keys that would be incorrect for a particular command are locked
out of the keyboard automatically. For example, you cannot specify
a file such as *.COM using two periods, two asterisks on the same
side of the period, or too many characters in the filename. If

XTREE is rejecting the characters you type, check to be sure that


you are entering them correctly.

There are countless ways you can put XTREE to work. All disk setup
and maintenance functions can benefit from this utility. You can add
XTREE to batch files like any other MS-DOS command— you could
even put it in an AUTOEXEC.BAT file to display a disk’s file structure
when booting up.

5-72 Epson Menu Utilities


Cautions
Witha utility as powerful and as fast as XTREE, you must always be
aware of the danger of accidentally erasing important files. For safety, be
aware of these things:

• You can cancel commands, even commands in progress, by pressing


F3. This stops any function.

• It’s wise to use Ctrl A (the attributes command) to give read-only


status to all the files in the directories. Then, in order to erase
anything, you must first deliberately remove a file’s protection.

• XTREE is limited in the number of files and directories it can


handle. XTREE checks to see if a disk has more than 180 directories
or 2800 files; if the disk does, XTREE automatically aborts.

XTREEINS
If the monitor you are using does not display clearly when you are in
XTREE, you can improve the display by running XTREEINS.
XTREEINS lets you install XTREE for your particular monitor, and
reduces flickering that sometimes appears on certain types of screens.

You can also use XTREEINS to change the screen attributes and colors
of your display if you have a color monitor.

Epson Menu Utilities 5'73


To run XTREEINS, you must have the files XTREE.EXE,
XTREEINS.EXE, and XTREEINS.DAT in the same directory. Log onto
or specify the directory that contains these files, type XTREEINS and
press Enter. The screen displays this menu:

Ifyou want to install XTREE to correct the screen image, choose option
A. If you want to change the display attributes or colors, choose option
B. Choose C when you want to exit XTREEINS. The following sections
describe these options.

Option A — Installing XTREE for your monitor type


This option you modify the monitor configuration
lets so you can
improve the image you see when you use XTREE.

You can also use this option to restore the original default values for
XTREE and cancel all the changes you made previously with

XTREEINS.

5-74 Epson Menu Utilities


When you press A, this menu displays:

* # * Select your display type * * *

A - Quick Display
This type should be selected for most configurations.
However, some monitors cannot keep up with XTREE when
it displays information, and 'snow' or flickering lines
may appear from time to time. If this is the case with
your monitor, select display type B.

B - Normal Display
This type displays the XTREE screens slower so they are
clearer.

ESC - Main Menu, no changes

Enter Option (A,B, Esc)

If you have not had any problems with the way XTREE displays on
your screen, press A to continue displaying in the Quick Display mode.
If, however, your screen image containssnow—which may happen if
you have installed a color/ graphics adapter—press B to change to the
Normal Display. The Normal Display slows down refreshing the screen
in XTREE so the image you see is clearer. To return to the main menu
without making any changes, you can press ESC any time you are in
the menu.

Note
Because the screen responds slower in Normal mode, XTREE also
responds slower to your commands.

Epson Menu Utilities 5-75


After you choose either A or B, this menu appears:

* * # Select your monitor type *##

A - Color
Some monitors may not be able to clearly display
information in color. If this is the case with your
color monitor, select monitor type B.

B - Monochrome or Composite

Enter Option (A,B)

If you have a monochrome or composite monitor, select B. If you have


a color monitor and are not having any problems with the way XTREE
displays on your screen, select A. However, if you are having display
problems with a color monitor, select B.

5-76 Epson Menu Utilities


The following screen appears:

Is there a box in the middle of the screen containing the message


"Welcome to XTREE"? (Y,N)

If you can see the box clearly, you should be able to use XTREE without
any display problems. you cannot see the image clearly, you need to
If

try installing the program again. Answer either Y for Yes or N for No.

If you prompt asks if you want to save your choices for


press Y, a
monitor type. Press Y if you do. The changes you make become the new
defaults and remain in effect until you change them again with
XTREEINS.

The main menu now appears. If you want to exit the program press
option C. (If you want to return to the original default values, see the
section called “Restoring original values” at the end of this description.)

If you press N, the main menu appears. You can either exit the program
or continue using it (XTREEINS and XTREE ignore any changes you
made).

Epson Menu Utilities 5-77


If you cannot see the box after trying both Quick and Normal mode,
follow these steps:

1. Select option A on the main menu.

2. Select option B, Normal Display, on the display type menu.

3. Select the appropriate monitor type on the monitor type menu.

4. Answer Y to the prompt asking if you can see the box (even if you
and
can’t) to the save monitor type prompt.

5. When the main menu appears again, select option B.

6. When the next screen appears, follow the instructions for changing
Keep pressing the function keys until
display attributes or colors.
you good display. Then follow the instructions to install your
get a
changes and exit the program.

^The next time you load XTREE, you should be able to see it clearly.

5-78 Epson Menu Utilities


Option B — Changing display attributes or colors
If you choose option B from the main menu, this sample screen appears
to let you modify the attributes and colors for XTREE:

MAIN SCREEN SHOW ALL SCREEN

DIR 1 DISK FILE1 FILE7 DISK


FILE2 FILE8
DIR2 STATS
STATS FILE3
DIR3
FILE4
FILE1 FILE3 FILE5
FILE6
FILE2

Copy Delete Tag execute Copy Tag A Copy ^Rename


Exception Messages

Press a function key to change the attributes/colors XTREE uses


On most computers the 2nd function key of a pair changes
the foreground attribute/color of the characters, and the 1st
function key changes the background behind the characters.
Press Esc to restore XTREE 's previous attributes/colors.
Press RETURN when finished.

F1-F2 UPPER-CASE Text for the Main Screen


F3-F4 UPPER-CASE Text for the Show All Screen
F5-F6 Lower-case Text and Borders
F7-F8 Highlight Bar
F9-F10 Exception Messages

You can now use the function keys to alter the screen attributes and
select different color you have a color monitor). If you
combinations (if

have a monochrome monitor, you can reverse the highlight/lowlight


combination. Because different monitors respond differently to the
function keys, you can find the combination you like the most by
pressing the function keys until you see the best one. (Of course, you
can always use XTREEINS again later, if you don’t like the combination
you choose.)

You can press ESC any time you are in this menu to cancel any changes
you have made and XTREEINS restores the default values.

Epson. Menu Utilities 5-79


When you are throughmaking changes, press Enter. A prompt asks if
you want to install the changes you have made. Press Y for Yes or N for
No. If you press Y, your new values remain in effect until you change
them again with XTREEINS. (If you want to return to the original
default values, see “Restoring original values” below.) If you press N,
XTREEINS ignores your changes and restores the default values. The
main menu appears on the screen.

Option C — Exiting XTREEINS


When you are through using XTREEINS, select option C from the
main menu to exit the program and return to the system prompt.

You can now load XTREE to test the changes you made. If you still

don’t like the display, you can go back into XTREEINS and make other
modifications.

Restoring original values — If you want to return to the original


default values for displaying XTREE (the ones it used before you made
any changes), follow these steps. Type XTREEINS at the command
prompt. Select the A option from the main menu, then the A option
from the display type menu, and then either A or B from the monitor
type menu (whichever you have). Answer Y to both the box prompt
and the prompt to save your changes.

On the main menu, press C to exit XTREEINS. From the command


prompt, load XTREE to check the display.

5-80 Epson Menu Utilities


Chapter 6
Configuring Your System

Defining the CONFIG.SYS File 6-2

Allocating Memory 6-3

Opening Files 6-4

Identifying Block Devices 6-5

Configuration Constraints 6-5

BREAK 6-6
BUFFERS 6-7
COUNTRY 6-8
DEVICE 6-11
FCBS 6-13
FILES 6-15
LASTDRIVE 6-16
SHELL 6-17
STACKS 6-19

Device Drivers 6-21


ANSI.SYS 6-22
DISPLAY.SYS 6-23
DRIVER.SYS 6-25
EEMM.EXE 6-28
PRINTER.SYS 6-29
VDISK.SYS 6-31

Configuring Your System 6*1


Defining the CONFIG.SYS File
When you configure your system, you instruct MS-DOS to set up your
computer according to your specific requirements. You specify your
requirements in a configuration file called CONFIG.SYS. The
CONFIG.SYS file contains configuration commands that define system
information.

The standard system information defined by MS-DOS is adequate for


running most applications. You only need to create a CONFIG.SYS file
for certain applications and system requirements. If you need to define
special system information, your software documentation will specify the
necessary information.

System information you can enter in the CONFIG.SYS file includes the
following (the name in parentheses is the configuration command):

• Extended checking of Ctrl Break or Ctrl C (BREAK)


• The number of buffers you wish to allocate in memory (BUFFERS)
• The country whose date and time format you’ll use (COUNTRY)
• Any device drivers you want to install (DEVICE)
• The number of file control blocks (FCBs) that can be open at any
one time (FCBS)

• The number of files that can be open at any one time (FILES)

• The number of drives that MS-DOS can access (LASTDRJVE)


• The name of a command processor that MS-DOS loads instead of
COMMAND.COM (SHELL)
• Dynamic use of stack frames (STACKS).

Each time you start your system, MS-DOS searches the root directory
of the current drive for the CONFIG.SYS file. If CONFIG.SYS does
not exist, MS-DOS uses default values for your system configuration.

You can create a CONFIG.SYS file with any text processor or you can
use the MS-DOS editor, EDLIN. (EDLIN is described in Chapter 8,
Programming Tools.) You can also use the COPY CON command.

6-2 Configuring Your System


Store the CONFIG.SYS file in the root directory of your system disk.
Whenever you add or change commands in the CONFIG.SYS file, you
must restart MS-DOS for the new system configuration to take effect.

Note
The SELECT command creates a CONFIG.SYS file with the
COUNTRY configuration command. If you have used the SELECT
command, you can use EDLIN or any other text processor to add
commands to the existing CONFIG.SYS file.

Allocating Memory
Your computer consists of two types of memory: random access memory
(RAM) and read-only memory (ROM).

RAM is read/ write memory, which means you can store data in RAM
from it.
as well as read information RAM is called volatile memory
because when you turn the computer off, the information stored in
RAM is erased.

ROM is memory that can be read but not written to or altered. ROM
provides permanent storage for program instructions, such as the boot
program that starts the computer and the basic input/output system
(BIOS). ROM called nonvolatile memory because the information
is

stored in ROM cannot be erased; always available to the system.


it is

The RAM that comes with your computer called standard RAM. You is

can also add expansion cards to your computer to increase the amount
of available RAM. This additional memory is called extended memory
and is located above 1MB.

MS-DOS cannot directly access extended memory. To use memory


above I MB, you must allocate the memory as a virtual (RAM) disk, a
print spooler, or a disk cache.

With this version of MS-DOS, you can also use extended memory as
expanded memory. Expanded memory is based on the expanded
memory specification (EMS) developed jointly by Lotus®, Intel®, and

Configuring Your System 6-3


Microsoft (referred to as LIM-EMS). Expanded memory lets programs
access additional RAM even though the memory is not directly
accessible by MS-DOS.

MS-DOS lets you use standard, extended, or expanded memory as a


disk drive, called a virtual disk (sometimes called a RAM disk). Virtual
disks are located in RAM
and have the access speed of internal memory.
MS-DOS can access programs or data files in a virtual disk much faster
than if the data is located on a diskette or hard disk.

Remember that any data stored in a virtual disk is erased whenever you
turn off the computer. Be sure to copy data from a virtual disk to a
physical disk on a regular basis.

If you create a virtual disk in standard RAM, the amount of memory


available to the operating system and application programs is decreased.

If you add memory expansion cards to your computer, you allocate the
additional memory using the MS-DOS device drivers VDISK.SYS and
EEMM.EXE. How you allocate the memory depends on the software
you You can run any software written to use the LIM-EMS
are using.
Your software documentation indicates if your application
specification.
uses expanded memory.

The VDISK.SYS and EEMM.EXE device drivers are described later in


this chapter.

Opening Files
You can specify the number of files that can be open at one time in your
CONFIG.SYS.

Some application programs open files with file control blocks (FCBs)
and others use file handles. MS-DOS uses the information stored in
FCBs and file handles to access the files.

You can use the FCBS or the FILES configuration command if your
application program opens a large number of files at one time. These
commands are described later in this chapter.

6-4 Configuring Your System


Identifying Block Devices
All block devices are identified by a single alphabetic character (A
through Z). Therefore, the number of block devices you can install in

your computer is limited to 26. Block devices include physical drives,


hard disk partitions, and device drivers. (The term block refers to the
way the device transfers data; all disk drives transfer data in blocks.)

MS-DOS assigns a letter to each block device, starting with A. The first

physical internal diskette drive is drive A; the second internal 'diskette


drive is B. MS-DOS always uses both A and B for diskette drives, even
if a computer has only one diskette drive.

MS-DOS assigns the letter C to the hard disk drive.


Other block devices are named in the order that they appear in your
CONFIG.SYS file. The first device is assigned the letter D you have a
if

hard disk drive (with only one partition) or the letter C if you do not

have a hard disk.

If you have formatted your hard disk with multiple MS-DOS partitions,
the device drivers are assigned letters following the partitions. For
example, your hard disk has three MS-DOS partitions, the partitions
if

are assigned the letters C, D, and E. The device drivers are assigned
letters starting with F.

When assigning device identifiers, MS-DOS first checks for internal


diskette drives and then checks the hard disk and its partitions. Then
the device drivers in the CONFIG.SYS are processed in the order they
appear in the file.

The device drivers are described later in this chapter.

Configuration Constraints
Specifying configuration parameters usually requires additional memory.
This decreases the amount of memory available for your application
programs.

Configuring Your System 6-5


BREAK Internal

Purpose
Tells MS-DOS when to check for Ctrl Break or Ctrl C.

Format
BREAK = ON
BREAK = OFF

Description
Use this configuration command to turn on or off the MS-DOS abort
current command function.

When BREAK is OFF, MS-DOS checks for Ctrl Break or Ctrl C only
when your program requests standard input, output, print, and
auxiliary operations. The default is OFF.

If BREAK is ON, MS-DOS checks for Ctrl Break or Ctrl C every time
your program accesses the system. ON improves the ability to abort
programs but slows the system. Only set BREAK to ON when you
need the extra Ctrl Break or Ctrl C checking.

6-6 Configuring Your System


BUFFERS Internal

Purpose
Sets the number of disk buffers allocated in memory.

Format
BUFFERS = nnn

Description
MS-DOS uses disk buffers to store data when reading from and writing
to disk. How many buffers you allocate depends on the type of
applications you use and the amount of memory in your computer.

For applications that randomly read and write records (such as many
BASIC and data base applications), you can speed up access time by
increasing the number of buffers. For applications that sequentially read
and write records, allocating more buffers does not increase
performance.

Each additional buffer requires 528 bytes of memory. This decreases the
amount of memory available for your application programs.

To determine how many buffers you need, run some of your application
programs with the BUFFERS command set to different values. For
applications such as word processing, set the number of buffers between
10 and 20 for best performance. If you plan to create a lot of
subdirectories, set the number to a value between 20 and 30.

You can allocate from 2 to 255 buffers with the BUFFERS command.
The default number of buffers is 2. If your computer includes a diskette
drive that reads diskettes with more than 360KB of data, then the
default is BUFFERS = 3. Memory size determines the default as follows:

RAM size Default

Greater than 128KB BUFFERS = 5

Greater than 256KB BUFFERS = 10

Greater than 512KB BUFFERS =15

Configuring Your System 6-7


COUNTRY Internal

Purpose
Selects display parameters that are country dependent, such as the date
and time format, currency symbols, and decimal separator, and activates
a code page.

Format
COUNTRY = code[, [ page][ [d:] [path] filename]]

Description
Use this command to configure your system for a specific country. All
system disks distributed by Epson automatically configure the system for
the country of sale. Therefore, only use this command when you
frequently use the layout of a different country.

In the COUNTRY command, code specifies the 3-digit country code for
a particular country or language. The page parameter specifies the code
page that you want to use for the selected country (most countries have
two code pages). The optional file specification identifies the file that
contains country-specific information.

The valid country codes and code pages are:

Country or Language Country Code Code Pages


Arabic countries 785 437
Australia 061 437, 850
Belgium 032 437, 850
Canada (English) 001 437, 850
Canada (French) 002 863, 850
Denmark 045 865, 850
Finland 358 437, 850
France 033 437, 850
Germany 049 437, 850
Hebrew 972 437
Italy 039 437, 850
Latin America 003 437, 850
Netherlands 031 437, 850

6-8 Configuring Your System


Country or Language Country Code Code Pages
Norway 047 865, 850
Portugal 351 860, 850
Spain 034 437, 850
Sweden 046 437, 850
Switzerland 041 437, 850
United Kingdom 044 437, 850
United States 001 437, 850

If you do not include the COUNTRY command in the CONFIG.SYS


MS-DOS uses these default values (and assumes that the
file,

COUNTRY.SYS file is in the root directory of the current drive):


Country code = 001
Code page = 437
Country information file = \COUNTRY.SYS

The format for this COUNTRY command would be:


COUNTRY = 001,437, \ COUNTRY. SYS

Note
MS-DOS automatically enters the COUNTRY command into a
CONFIG.SYS file when you use the SELECT command.

Examples
To set up country-dependent information for Latin America, include
the following command in your CONFIG.SYS file:
. COUNTRY = 003,437, C:\MSD0S\C0UNTRY.SYS
MS-DOS searches for the COUNTRY.SYS file in the MSDOS
directory of drive C.

"lb setup country-dependent information for the Hebrew language using


the default code page and a specific (user-supplied) country information
called HEBREW.SYS,
file include the following command in your
CONFIG.SYS file:
COUNTRY = 972,, C: HEBREW. SYS

Configuring Your System 6-9


The default code page is 437. MS-DOS searches the root directory of
drive C for the country information file.

To set up country-dependent information for French-speaking Canada,


include the following command in your CONFIG.SYS file:

COUNTRY = 002

MS-DOS uses the default code page, 863, and searches the root
directory of drive C for the COUNTRY.SYS file.

6-10 Configuring Your System


DEVICE Internal

Purpose
Installs the specified device driver during system startup.

Format
DEVICE = [d:] [path] filename [ parameters ]

Description
A device driver is a set of instructions that controls peripheral devices or
other software programs. Device drivers enable MS-DOS to
communicate properly with your peripheral devices and software
programs.

MS-DOS loads the standard device drivers that support the standard
input, output, printer, hard disk drive, and diskette drive(s). Use the
DEVICE command to replace and/or add to the standard drivers.

MS-DOS includes several useful device drivers, which are described


later in this chapter. The following are drivers:

ANSI.SYS Provides screen and keyboard control

DISPLAY.SYS Supports code page switching for the console


device (CON)

DRIVER. SYS Assigns new logical names to diskette drives

EEMM.EXE Supports expanded memory (LIM-EMS)

PRINTER.SYS Supports code page switching for PRN, LPT1,


LPT2, and LPT3

VDISK.SYS Supports virtual (RAM) disks

When you buy a new device, such as a mouse or a scanner, you may
receive device driver software. Install the device driver using the
DEVICE command in your CONFIG.SYS file. To install a new driver,
make sure the device driver file is in the directory you specify in the
DEVICE command.

Configuring Your System 6-1


Note
COUNTRY.SYS KEYBOARD.SYS are device drivers that are
and
loaded automatically by MS-DOS. Do not attempt to load either of
these drivers with the DEVICE command.

Example
To use the ANSI escape sequences described in Appendix E, include the
following command in your CONFIG.SYS file:
DEVICE = ANSI. SYS

MS-DOS searches the root directory of the default drive for the
ANSI.SYS file. If it finds the file, MS-DOS replaces all keyboard input
and screen output with the ANSI escape sequences.

6-12 Configuring Your System


FCBS Internal

Purpose
Specifies the number of file control blocks (FCBs) that can be open at
one time.

Format
FCBS = m,n

Description
FCBs are used by many application programs to create, open, read,
write, and delete files. One FCB is set up for each file that is opened.

The FCBS command is necessary only if you are using a network

system and the SHARE command. Without file sharing, MS-DOS can
set up any number of FCBs.

m is a number from 1 to 255 and specifies the total number of files that

can be used concurrently. The default value is 4.

n is a number from 0 to 255 and specifies the number of opened files

that cannot be closed by MS-DOS if a particular application attempts to


open more than m files. Only the first n files are protected from being
closed. The default value is 0.

Whenever a request is made to open more than m files, MS-DOS


checks for the oldest FCB. MS-DOS closes this file automatically unless
it is protected by the value set for n.

If the number of computers in the network system is small, the default


values of 4,0 are usually sufficient. The only restriction on the value of
m and n that m must be greater than or equal to n. However, if you
is

set m = n, MS-DOS cannot close a file a program tries to open more if

than m files.

When you use the FCBS command in your CONHG.SYS file, the
resident size of MS-DOS is increased. This means the amount of space
available to your application programs is decreased.

Configuring Your System 6-13


Example
To set the total number of FCB files that can be open at one time to 4
and to protect the first two files from being closed, include this
command in your CONFIG.SYS file:

FOBS = 4,2
In this case, if you have four open and you open another file,
files

MS-DOS closes the third file first two files that


that was opened; the
were opened are protected from this type of closure. If you try to access

the third file that is now closed, you see this message:

FCB unavailable

6-14 Configuring Your System


FILES Internal

Purpose
Sets the maximum number of files that can be open at one time.

Format
FILES = nnn

Description
This command affects only files opened and accessed with file handles.
It does not affect files opened with FCBs.

The number of files you set here depends on your installation. This is

the maximum number of open files in the entire system.

The nnn setting can be a number from 8 to 255. The default is 8.

MS-DOS automatically opens five standard files: input, output, error,


printer, and auxiliary device. These five files are included in the number
you set; therefore, if you set FILES = 10, MS-DOS can open the five
standard files and five additional files.

Ifyou run an application program that returns an error message


indicating an insufficient number of files, include the FILES command
in your CONFIG.SYS file to increase the number of files that can be
open.

Example
To allow 20 files to be open at one time, include the following command
in your CONFIG.SYS file:

FILES = 20

Configuring Your System 6-15


LASTDRIVE Internal

Purpose
Sets the last valid drive letter that MS-DOS recognizes.

Format
LASTDRIVE = x
Description
This command sets the maximum number of drives that can be
accessed by MS-DOS.

The x parameter of the alphabet. The minimum value for x


is any letter

is the letter number of physical drives installed in your


equivalent of the
computer. The maximum value is Z, which is equal to 26 drives. The
default is E.

This command is useful in a network environment and if you routinely


use the SUBST command.

Example
If your system has two diskette drives, one hard disk drive with two
MS-DOS partitions, and four virtual disks, enter this command in your
CONFIG.SYS file:

LASTDRIVE = H

6-16 Configuring Your System


SHELL Internal

Purpose
Specifies the name and location of a command processor.

Format
SHELL = [d:] [path] filename [/ switches ]

Description
Use this command to specify a top-level command processor, called a

shell, to load in place of COMMAND.COM. You can also use this


command if you store COMMAND.COM in a directory other than
the root directory of the system disk.

Whenever you boot the system with a CONFIG.SYS file that includes
the SHELL command, MS-DOS starts using the specified command
processor. This command processor interprets the commands you enter.

Be sure to specify the complete filename of the command processor if it

is not in the root directory of the disk from which you are starting the
system. If you do not include the SHELL command, the default is

COMMAND.COM.
COMSPEC is an environment variable that also specifies the command
MS-DOS uses the COMSPEC variable whenever reloads
processor. it

any transient part of the command processor. Therefore, MS-DOS sets


this variable to the file specification you enter in the SHELL command.

If you create a command processor that accepts switches, you can


include these switches (such as /C or /P)on the SHELL command line.

If you are identifying the location of COMMAND.COM, you can also

include the /C, /E, and /P switches.

Remember that the MS-DOS commands and batch processor


internal
reside in COMMAND.COM. If you create a command processor, these
functions are available only if you duplicate them in the new command
processor.

Configuring Your System 6-17


Example
If you store COMMAND.COM in a subdirectory called MSDOS on
drive C and you want to allocate up to 3000 bytes for the environment
table, place this command in your CONFIG.SYS file:
SHELL = C:\MSD0S\C0MAND.C0M /P /E:3000

6-18 Configuring Your System


STACKS Internal

Purpose
Sets the number of available stack frames and their size.

Format
STACKS = m,n

Description
MS-DOS When a
uses stack frames to process hardware interrupts.
hardware interrupt occurs, MS-DOS allocates one free stack frame to
process the interrupt. When the interrupt is complete, MS-DOS releases
the stack frame.

The number of stack frames, m, can be from 0 to 64. The size of the
stack frames, n, can be from 0 to 512 bytes.

If you set STACKS = 0, 0, MS-DOS does not dynamically allocate


stack frames.

If you do not include the STACKS command in your CONFIG.SYS


file, the default for 8086- and 8088-based computers is:

STACKS =0,0
For all other computers, the default is:

STACKS = 9,128

If you have a large number of devices installed in your computer, you


may experience errors due to hardware interrupts. You would see this

message:

Fatal: Internal Stack Failure, System Halted

If you see this message, increase the number of stack frames, which
allows the system to process more hardware interrupts. Normally, you’ll
want to increase the number of stack frames rather than increase the
size of the individual frames.

Configuring Your System 6-19


Allocating additional stack space decreases the amount of memory
available to your application programs. Therefore, only change stack
allocations if necessary.

Example
To allocate eight stacks of 512 bytes each for hardware interrupt
handling, include this command in your CONFIG.SYS file:

STACKS = 8,512

6-20 Configuring Your System


Device Drivers
A device driver is a set of instructions that acts as a liaison between
MS-DOS and any other software program or peripheral device you are
using. Device drivers enable MS-DOS to communicate properly with
your monitor, keyboard, disk drive(s), and other devices.

You install device drivers in your CONFIG.SYS file to customize and


optimize your system. The following device drivers are available with
this version of MS-DOS:

ANSLSYS
DISPLAY.SYS
DRIVER.SYS
EEMM.EXE
PRINTER.SYS
VDISK.SYS

Configuring Your System 6-21


ANSLSYS External

Purpose
Provides screen and keyboard control.

Format
DEVICE = [d:] [path] ANSI. SYS

Description
You can use the ANSI.SYS device driver to control cursor movement,
erase all or part of the screen, change the screen display, and reassign
key functions. These changes are defined by character strings called
escape sequences.

The ANSLSYS device driver contains the escape sequences required by


some application programs to control keyboard and screen operation.
The ANSI escape sequences are described in Appendix E.

6-22 Configuring Your System


DISPLAY.SYS External

Purpose
Supports code page switching for the console device (CON).

Format
DEVICE = [ d[pa th] DISPLAY SYS
:
.

C0N[ :] = ( type, [, [hwcp] [, 21] ]

DEVICE = [d: ] [path] DISPLAY. SYS


CON [ :
]
= type, [ [hwcp] [ (n, ) ] ]

Description
You need to use this device driver only if you want to do code page
switching on your console device.

Ifyou have the proper supporting hardware, you can install this device
driver to switchbetween prepared code pages for your console. See
Chapter 9, Code Page Switching, for more information about using this
device driver to support code page switching.

You specify the following parameters:

Parameter Description

type Display adapter. Valid values:

MONO (monochrome display adapter)


CGA (color graphics adapter)
EGA (enhanced graphics adapter)
LCD (liquid crystal display)
hwcp Hardware code page built into the display adapter.
Valid values:

437 United States


850 Multilingual
860 Portugal
863 French Canada
865 Norway

Configuring Your System 6-23


Parameter Description

n Number (from 0 to 12) of additional code pages you


want to use. MONOand CGA
do not support code
page switching; therefore, n must be zero. For EGA and
LCD, n defaults to 1.

m Number (from 0 to 2) of subfonts supported for each


code page. MONO and CGA do not support other
fonts; therefore m must be zero. For EGA, the default is

2. For LCD, the default is 1.

Example
To set up code page switching an EGA display adapter with a
for

built-in hardware code page of 437 and the ability to add two more code
pages, enter this command in your CONFIG.SYS file:
DEVICE = C:\DOS\DISPLAY.SYS CON: = (EGA, 437, 2)

6-24 Configuring Your System


DRIVER.SYS External

Purpose
Assigns new logical names to diskette drives.

Format
DEVICE = [d:] [path] DRIVER. SYS /D:ddd [/T ttt] :

C/S :ss] [/H:i3i3] [/C] [/N] [/F:f]

Description
Use this device driver to assign new logical names to your diskette drives
or to add external diskette drives to your computer.

DRIVER.SYS lets you access and use a disk device by referencing a


logical drive letter.

With DRTVER.SYS in your CONFIG.SYS file, you can copy files from
one drive to the same drive when the system has more than one diskette
drive. Without DRIVER.SYS, MS-DOS automatically copies files to the
second drive.

Switch Function

/D ddd
: Specifies the physical drive number. physical drive A
has a value of 0 through 255. Numbers 0 to 127
identify diskette drives and 128 to 255 identify hard
disk drives. The first physical diskette drive is 0 and it is

referenced as drive A from the command prompt. The


second physical diskette drive is 1. To specify a third

physical diskette drive, which must be external, use 2.

The first physical hard disk is 128, the second hard disk
is 129, and so forth.

/T ttt
: Specifies the number of tracks per side (1-999). The
default is 80 tracks per side.

/S SS
: Specifies the number of sectors per track (1-99). The
default is 9 sectors per track.

Configuring Your System 6-25


/H hh: Specifies the maximum number of heads (1-99). The
default is 2 heads.

/C Specifies that changeline (door lock) support is required


(only for computer models that support diskette
changeline).

/N Specifies the physical drive is a non-removable block


device such as a hard disk.

/F f : Specifies the device type. Valid values are:

0 = 160/180KB or 320/360KB diskette drive


1 = 1.2MB diskette drive
2 = 720KB diskette drive
5 = hard disk
7 = 1.44MB diskette drive

The default is 2.

When you specify additional physical drives with DRTVER.SYS, include


LASTDRTVE = x in your CONFIG.SYS file (x must be a letter from E
to Z). See the LASTDRIVE command in this chapter.

Examples
To copy from an internal 1.2MB diskette drive to the same internal
drive, use DEVICE = DRTVER.SYS with these switches:

DEVICE = DRIVER. SYS /D:0 /T:80 /S:15 /H:2 /C


/F:l

This assigns the logical drive letter D to the first diskette drive. It can
now be referenced as drive A and drive D. In this example, your
computer has two internal diskette drives (the first one is 1.2MB) and
one hard disk.

6-26 Configuring Your System


You can now copy a file ONEFILE) from a diskette in drive A to
(called
another diskette in drive A (referenced as drive D), using the COPY
command in the following manner:

COPY A: ONEFILE D:
To set up a logical drive letter of D for a 720KB external diskette drive
on a computer with one internal diskette drive and a hard disk, use
DEVICE = DRTVER.SYS with this format:

DEVICE = DRIVER. SYS /D:2


To be able to copy from a 720KB external diskette to the same drive, use
DEVICE = DRTVER.SYS with the above format, but include it twice
in the CONFIG.SYS file (the diskette drive can now be referenced as
drive D and drive E):
DEVICE = DRIVER. SYS /D:2
DEVICE = DRIVER. SYS /D:2

Configuring Your System 6-27


EEMM.EXE External

Purpose
Supports expanded memory on 80386-based computers.

Format
DEVICE = [d:] [path] EEMM.EXE

Description
This device driver lets you use the extended memory on your
80386-based computer as expanded memory. This expanded memory
supports all the functions of LIM-EMS, Version 3.20.

When MS-DOS encounters this configuration command in your


CONFIG.SYS, it allocates all available extended memory to expanded
memory. Therefore, make sure this command follows any other
configuration commands that use extended memory.

Only install this device driver if you have an application program that
uses expanded memory (EMS).

If you want to expanded memory, the


install a virtual disk in

EEMM.EXE command must precede the VDISK.SYS command.

Note
Do not attempt to execute this EEMM.EXE device driver as a command.
Only enter EEMM.EXE as a device driver in your CONFIG.SYS file.

Example
To install virtual disks (1024KB each) in both extended and expanded
memory, include the following commands in your CONFIG.SYS file:

DEVICE = VDISK.SYS 1024 /E


DEVICE = EEMM.EXE
DEVICE = VDISK.SYS 1024 /A

The VDISK.SYS device driver is described later in this chapter.

6-28 Configuring Your System


PRINTER.SYS External

Purpose
Supports code page switching for parallel printers.

Format
DEVICE = [d:] [pa t£] PRINTER. SYS LPT*( : )
=
(type[,lhwcp2l,n^)

Description
You need to use this device driver only if you want to do code page
switching on your parallel printer (LPT1, LPT2, or LPT3).

Ifyou have the proper supporting hardware, you can install this device
between prepared code pages for your printer. See
driver to switch
Chapter 9, Code Page Switching, for more information about using this
device driver to support code page switching.

You specify the following parameters:

Parameter Description

LPTx Printer device. Valid values:

LPT1
LPT2
LPT3
(You can substitute PRN for LPT1)
type Printer. Valid values:

4201 (IBM Proprinter II Model 4201)

5202 (Quietwriter III Model 5202)

Configuring Your System 6-29


Parameter Description

hwcp Hardware code page built into the printer. Valid values:

437 United States


850 Multilingual
860 Portugal
863 French Canada
865 Norway

n Number (from 0 to 12) of additional code pages you


want to use. This number is hardware dependent.

Example
To up code page switching for a printer that emulates the IBM
set

ProprinterII Model 4201, such as the Epson FX-286™, and that has a

hardware code page of 437 built-in and the capability to access one
more code page, enter this command in your CONFIG.SYS file:

DEVICE = C:\MSDOS\PRINTER.SYS LPT1: =


(4201, 437,1)

6-30 Configuring Your System


VDISK.SYS External

Purpose
Supports virtual (RAM) disks.

Format
DEVICE = [d: ] [path] VDISK.SYS [cap] [sec] [dir] [/A]
C/E]

Description
VDISK.SYS sets up an area in RAM memory that can be used to
simulate the operations of a real disk drive. This area, once established,
is commonly referred to as a virtual disk or a RAM disk.
The advantage of using a virtual disk is speed. Because RAM memory
can be accessed quickly by the computer, all disk read/ write operations
are performed many times faster than using an actual disk. However,
the contents of RAM memory are lost each time your computer is reset
or turned off.

You can customize your virtual disk by including parameters on the


command line for virtual disk size, sector size, and number of directory
entries. If you have extended memory installed in your computer, you

can use the /E switch to create a virtual disk in memory at or above


1MB. If you have installed the EEMM.EXE device driver or added
hardware that supports expanded memory, you can use the /A switch
to create the virtual disk in expanded memory.

The parameter cap represents the size of the virtual disk in kilobytes.
The range is from 1 to the amount of memory available on your
computer. If you don’t specify a cap value, the default of 64KB is

assigned, subject to the following conditions:

• Ifyou specify an unacceptable value for cap (less than 16 or greater


than available memory), the default value of 64KB is assigned.

Configuring Your System 6-31


• VDISK always leaves at least 64KB of RAM memory for use by the
system. Therefore, if you specify a value that would cause less than
this amount to be set aside, VDISK automatically decreases its own
size accordingly.

• If you have installed more than one virtual disk in the

CONFIG.SYS file and a subsequent DEVICE = VDISK.SYS


command finds less than 64KB of memory left, VDISK does not
install the extra virtual disk. You see an error message.

The parameter sec selects the sector size in bytes. Valid sizes are 128,

256, or 512. If you omit a size or enter an incorrect size, the default
value of 128 is assigned.

When MS-DOS reads a disk, it always reads a minimum of one sector.


If you intend to save a lot of small files (less than 128 bytes) to the
virtual disk, use a value of 128 for sec. If you are saving large files (more
than 512 bytes) to the virtual disk, use a value of 512 to speed up disk
access.

The parameter dir specifies the number of directory entries recognized

by the virtual disk. Acceptable values are from 2 to 1024. If you do not
specify dir, a default value of 64 is assigned.

VDISK modifies the value for dir as it is loaded. VDISK automatically


selects the correct number of directories that fill a sector. Each directory
entry uses 32 bytes. Therefore, if you choose a sector size of 128 bytes,

the number of directories are always a multiple of 4, regardless of the


value used for dir. For 256 sectors, the multiple is 8 and for 512 sectors is

16.

/A allows you to use VDISK with expanded memory (LIM-EMS).


Expanded memory an option for your computer. Once installed,
is it

allows your computer to access more than 640KB of memory. You


cannot use / A with /E.

/E allows you to use VDISK with extended memory. Extended memory


is an option for your computer. Once installed, it allows your computer

to access memory at and beyond 1MB. You cannot use /E with / A.

6-32 Configuring Your System


Once you place a DEVICE = VDISK.SYS command in the

CONFIG.SYS file, you see messages similar to these each time you turn
on or reset your computer:

RAMDrive Version 1.16 virtual disk x:


Disk size: xxxk
Sector size: xxx bytes
Allocation unit: x sectors
Directory entries: xx
These messages are displayed before the date and time prompts.

To configure your system with more than one virtual disk, simply add
the required number of DEVICE = VDISK.SYS commands to your

CONHG.SYS file. The only limit to the number of drives you can
install is the amount of RAM memory available.

Example
To install a virtual disk of 160KB capacity with 512 sectors and 64
directories in standard memory, place the following command in

CONHG.SYS:
DEVICE = VDISK.SYS 160 512 64

Configuring Your System 6-33


Chapter 7

Batch Processing Commands


Creating Batch Files 7-2

Using an AUTOEXEC.BAT File 7-4

Using Replaceable Parameters 7-5

Using Environment Variables 7-7

Using the Batch Processing Commands 7-8

CALL 7-9
ECHO 7-10
FOR 7-12
GOTO 7-14
IF 7-15
PAUSE 7-17
REM 7-19
SHIFT 7-20

Batch Processing Commands 7*1


Creating Batch Files
You may find yourself typing the same sequence of commands over and
over- to perform some task. With MS-DOS you can put this command
sequence into a special file called a batch file. You can then run the
sequence of commands by simply typing the name of the batch file.
MS-DOS executes the commands in a batch file just as if you had typed
each command from the keyboard.

You can create a batch file using a text editor, such as EDLIN, or using
the COPY command, as shown here. When you create a batch file, you
must include an extension of .BAT. When you run the batch file, you
type the filename only; you don’t type the file extension.

To create a batch file to format and check a new disk, follow these steps:

1. Type the following command and press Enter:

COPY CON CHECKNEW.BAT


This command tells MS-DOS to copy the information from the
keyboard to the file CHECKNEW.BAT.
2. Type the following lines, pressing Enter after each line:

REM This is a file to format and


REM check new disks.
REM It is named CHECKNEW.BAT.
PAUSE Insert new disk in drive B :

FORMAT B: /V
CHKDSK B:

REM and PAUSE are batch file commands described later in this
chapter.

3. After typing the last line, press Ctrl Z followed by Enter to save
the batch file. MS-DOS displays the following message:

lFile(s) copied

7-2 Batch Processing Commands


4. To execute the file, type the following command and press Enter:

CHECKNEW
MS-DOS executes the commands in sequence just as if you typed
each line as an individual command.

Remember the following things about batch files:

• You must name each batch file with an extension of .BAT.

• To execute a batch file, you type only the filename and not the
extension.

• If you press Ctrl C while a batch file is running, MS-DOS asks you
to confirm that you want to terminate the batch process.

• you remove a diskette that contains a batch file being processed,


If

MS-DOS prompts you to reinsert the diskette so that it can


continue processing the file.

• You can specify the name of another batch file as the last command
in a batch file. MS-DOS will then execute the next batch file after it

executes all the commands in the first batch.

• You can use any of the redirection symbols ( < > ) in a batch file. !

For more information on using these symbols, see Chapter 3, Using


MS-DOS Commands.
• MS-DOS ignores any line in a batch file that starts with a
colon ( : ). Therefore, you can use the colon to add comment lines

to your batch file.

• You may use an @ character preceding a command in a batch file

to prevent the command line from displaying on the screen.

• Changing the directory or drive affects subsequent commands in

the batch file.

• Setting environment strings affects subsequent commands in the


batch file.

• Do not use internal command names for batch files.

Batch Processing Commands 7-3


• If you use an external command name for a batch file, be sure to

store the batch file in a different directory than where the MS-DOS
command is located. Otherwise, you will not be able to execute the
batch file.

Using an AUTOEXEC.BAT File


An AUTOEXEC.BAT file lets you execute specific MS-DOS
commands when you start MS-DOS. This is useful when
automatically
you want to run a specific application or set certain system parameters
each time you start your computer.

When you start MS-DOS searches the root directory of


your computer,
the default disk drive for a AUTOEXEC.BAT If it finds an
file named
AUTOEXEC.BAT file, MS-DOS immediately processes bypassing it,

the date and time prompts. (If MS-DOS does not find an
AUTOEXEC.BAT file, then it displays the date and time prompts.)
Because MS-DOS does not prompt you for a current date and time if
you start with an AUTOEXEC.BAT file, it’s a good idea to add these
two commands to your AUTOEXEC.BAT file. MS-DOS needs this
information to keep your directories current. See Chapter 4,
Alphabetical List of MS-DOS Commands, for more information on the
date and time commands.

An AUTOEXEC.BAT file can help you use MS-DOS more efficiently.


You can set the date and time, set a path and any other system options
you use, change the system prompt, and start executing an application
program.

For example, to automatically up your system and load the


set XTREE
utility each time you start MS-DOS, you could create an
AUTOEXEC.BAT file following these steps:
1. Type the following command and then press Enter:

COPY CON AUTOEXEC.BAT

7-4 Batch Processing Commands


This command MS-DOS to copy the information from the
tells

keyboard to the AUTOEXEC.BAT file. You must store the


AUTOEXEC.BAT file in the root directory of your MS-DOS
system disk.

2. Now type the following lines pressing Enter after each line:

DATE
TIME
PATH = C:\;C:\MSD0S;A:\
PROMPT [$P]
CLS
XTREE
3. After the last line, press Ctrl Z followed by Enter to copy these
lines to the AUTOEXEC.BAT file.
When you start your computer with this AUTOEXEC.BAT file,
MS-DOS automatically performs the following tasks:
1. Asks you to enter the date and time.

2. Sets your command search path.

3. Sets your system prompt to the current drive and directory with
brackets.

4. Clears the screen.

5. Loads the XTREE utility.


include any MS-DOS command or
You can series of commands in an
AUTOEXEC.BAT file.

Using Replaceable Parameters


Replaceable parameters let you run batch files with different sets of data.
You specify the replaceable parameters in your batch file and then enter
the actual data on the command line when you execute the batch file.

The replaceable parameters are %0 through %9.

Batch Processing Commands 7-5


For example, you can create a batch file that sorts a file based on a
specific string of characters. Then each time you run the batch file, you
can specify a different file and/ or a different string of characters.

Follow these steps:

1. Type the following command and press Enter:

COPY CON SORTER BAT .

2. Type the following command lines pressing Enter after each line:

TYPE %2 !
FIND "%1" > 13
TYPE %3 !
SORT > PRN
DEL %3
3. Assume the following file, named CUSTOMER, exists on drive A:

SHORES, BETTY NORTH


MOYNIHAN, ANN SOUTH
KRAIG, HEIDY NORTH
MARTIN, PETE EAST
LENNON, PAT SOUTH
EVANS, RICK NORTH
4. To print an alphabetical list of the customers in the north, type the
following command line followed by Enter:

SORTER NORTH A: CUSTOMER TEMP.FIL


The output on the printer looks like this:

EVANS, RICK NORTH


KRAIG, HEIDY NORTH
SHORES, BETTY NORTH
The result is the same as if you had typed each of the following
commands:

TYPE A: CUSTOMER FIND "NORTH" ! > TEMP.FIL


TYPE TEMP.FIL SORT > PRN !

DEL TEMP.FIL

7-6 Batch Processing Commands


Remember these things when using replaceable parameters:

• You can specify up to 10 replaceable parameters (%0-%9). To use


more than 10, use the SHIFT command described later in this
chapter.

• MS-DOS always replaces the %0 parameter with the drive (if

specified) and the filename of the batch file. (In the above example,
%0 is SORTER.)
• If a filename or parameter in the batch file has a percent sign in it,

you must type the percent sign twice. For example, to specify the file

ABC%.DAT, you must type ABC%%.DAT

Using Environment Variables


You can also access environment variables with replaceable parameters
in a batch file. You enter the parameter with a percent sign before and
after the name of the environment variable, such as %FILE%.

For example, to create a batch file that moves a file you want to delete
into a separate directory, follow these steps:

1. Type the following command followed by Enter:

COPY CON MYDEL.BAT


2. Type the following commands, pressing Enter after each line:

ECHO OFF
ECHO Before using this batch file,
ECHO you must specify the directory.
ECHO At the MS-DOS prompt, type:
ECHO SET DELDIR = directory
ECHO Press Ctrl C to exit if you
ECHO need to set DELDIR.
PAUSE
COPY %1 ^DELDIR#
DEL %1
DIR /W #DELDIR$
ECHO Complete

Batch Processing Commands 7-7


3. After the last line, press Ctrl Z and then Enter.

4. For MYDEL.BAT to work, you must create your delete directory.


To create the DELETED directory, type the following command
and press Enter:

MD \DELETED
5. Use the SET command to specify a directory named DELETED:

SET DELDIR = \DELETED


6. To move the file REPORTIO.SLS to the delete directory, type the

following command and press Enter:

MYDEL REPORTIO.SLS
MS-DOS automatically replaces the %DELDIR% parameter with
the directory named DELETED.

Using the Batch Processing Commands


The batch processing commands described in the remainder of this
chapter add power and flexibility to your batch files. You can execute
any of these batch processing commands from the MS-DOS command
prompt. These commands are called batch processing commands
because they are most commonly used in batch files, and because they
affect batch file operations.

7-8 Batch Processing Commands


CALL Internal

Purpose
Allows one batch file to call another batch file without ending the first

batch file.

Format
CALL [d:]lpath~\ filename [ arguments ]

Description
You can use this command to execute one batch file from another batch
file. MS-DOS executes the specified batch file and then returns to the
calling batch file.

Use the arguments parameter to specify any arguments, such as


by the batch file being called.
replaceable parameters, required

You can specify the CALL command on any line of a batch file.
The file that you call must be a batch file (that is, it must have a .BAT
extension).

A batch file can call itself. Be careful that the batch file eventually
terminates.

Note
Do not use piping or redirection with the CALL command.

Example
Tire following sequence of commands sends control to the ERRFORM
batch file if an error occurs when you format the diskette in drive A:

ECHO OFF
FORMAT A: /S
IF ERRORLEVEL 1 CALL ERRFORM
ECHO End of batch file
After the ERRFORM batch file is executed, control returns to the
ECHO command that follows the CALL statement.

Batch Processing Commands 7-9


ECHO Internal

Purpose
Turns on and off command echoes on your screen.

Format
ECHO [ON]
ECHO [OFF]
ECHO [ message ]

Description
Use ECHO to control the display of batch file commands on the
screen. Normally, MS-DOS displays, or echoes, commands in a batch
file while they are executing. When you turn on or reset the system,
ECHO is on.

Type ECHO OFF to turn this feature off. Type ECHO ON to turn it back
on.

You can display the current setting of the command by typing ECHO
without the ON or OFF parameter.
If you are using a batch file, you can type ECHO message to display
messages during the execution. These messages are displayed on the
standard output device regardless of the ECHO setting.
Thiscommand does not. affect the messages that are produced during
command execution.

Examples
Include ECHO in a batch file such as this one:
ECHO OFF
REM Command display off
TREE B:
ECHO ON
TREE B:

7-10 Batch Processing Commands


When this batch file executes, the screen displays ECHO OFF but does
not display the REM or TREE command. As TREE executes, the
output of the TREE command displays. When ECHO is back on, the
second TREE command displays. Then, as before, the output of the
TREE command displays.

To turn ECHO off without displaying the command, type:


ECHO OFF

Batch Processing Commands 7 -11


FOR Internal

Purpose
Performs a single repetitive operation on a set of files, devices, or system
parameters.

Format
FOR %%o IN set DO command

Description
Use the FOR command to repeat certain batch operations for each item
in a list. The format of this command means FOR each item IN a set of
items DO the specified command.

The parameters are:

• c can be any character (except the numbers 0 through 9 to avoid


confusion with the %01 —
%9 batch replaceable parameters)
• set is either a filename or a list of possible values

• command is any MS-DOS command.


The %%c variable applies sequentially to each item in the parameter,
and then the command evaluates each item. If a member in the set of
items an expression with an asterisk (*) or a question mark (?), then
is

the variable is set to each matching pattern from disk. You can only use
• or ? in one item in the set; FOR ignores any other item in the set.

You must include two percent signs (%%) so that after batch parameter
(%0-%9) done, one percent sign (%) remains. If you enter
processing is

only one percent sign, such as %f, it appears as an error (bad parameter
reference). MS-DOS discards the %f, which makes it unavailable when
you execute FOR. However, if you use FOR outside a batch file, you
only need to type one percent sign.

Examples
To assemble all files with the extension .ASM, type:

FOR %%f IN (*.ASM) DO MASM %%f

7-12 Batch Processing Commands


To list all files in the SALES directory, type:

FOR %%f IN (LEDGER/SALES) DO REM

Batch Processing Commands 7-13


GOTO Internal

Purpose
Jumps to a labelled line within the same batch file.

Format
GOTO label

Description
Use this command to skip to another location in your batch file.

MS-DOS starts executing commands from that location. MS-DOS


executes the command on the line following the label.

you use this command to skip over an unwanted portion of


Typically,
commands, or to return to a line in order to repeat commands.

If you do not define the specified label in the batch file, MS-DOS
displays the error message Label not found and terminates the
batch file.

You define a label using the colon as the first character on a line
followed by the label name (-.label). MS-DOS ignores the remainder of
the line following the colon except when searching for a label. In this
way, you can also use the colon to enter comments in your batch file.

Example
The following sequence of commands sends control to the END
statement only if no errors occur when you format the diskette in
drive A:

:BEGIN
ECHO OFF
FORMAT A: /S
IF NOT ERRORLEVEL 1 GOTO END
ECHO AN ERROR OCCURRED DURING FORMATTING.
:END
ECHO END OF BATCH FILE.

7-14 Batch Processing Commands


IF Internal

Purpose
Executes a second command depending on whether a specified
condition is true or false.

Format
IF condition command

Description
Use this command to test for some logical condition (such as an error in
a previous program or the existence of a file), and then to execute
another command depending on the results of the test. You can enter
any valid MS-DOS command. The condition parameter is one of the
following:

Condition parameter Result

ERRORLEVEL number This condition is true only if the previously


executed program had an exit code number
that is the same or higher than this number.

stringl == string2 This condition is true only if stringl and


string2 are identical after parameter
substitution (do not enter embedded
delimiters in strings).

EXIST filename This condition is true only if filename exists.

NOT condition This condition is true only if condition is

false.

Examples
To display a message based on whether or not the file called 620.TXT
exists, type the following and press Enter:

IF NOT EXIST 620. TXT ECHO Can't find file

Batch Processing Commands 7- 15


If the file does not exist, MS-DOS displays the message:

ECHO Can't find file

To link to another file based on the exit code of a previous program,


type the following and press Enter:

IF NOT ERRORLEVEL 3 LINK % 1 ,,;

If the previously executed program did not have an exit code of three or
higher, then link the file identified by the first replaceable parameter.

To transfer control based on a replaceable parameter, type:

IF %1 = = QUIT GOTO END

If the first replaceable parameter is QUIT, then transfer control to END.

7-16 Batch Processing Commands


PAUSE Internal

Purpose
Suspends execution of the batch file.

Format
PAUSE [ comment ]

Description
Use PAUSE to suspend the execution of your batch file until you press
any key. Use this command in your batch file when you need to change
diskettes or perform some other action.

When MS-DOS finds a PAUSE command, you see the prompt:

Strike a key when ready . . .

After you perform the desired function, press any key to continue.

Use the comment parameter in your PAUSE command to display a


message on the screen during program suspension. If ECHO is on, your
comment displays before the MS-DOS message instructing you to strike
a key when ready.

You can terminate a batch job at any time. Just press Ctrl C. You see
the prompt:

Terminate batch job (Y/N)? _

Press N to continue processing your batch file. Press Y to stop execution


of the remainder of your batch. The command prompt displays.

Batch Processing Commands 7-17


Example
Type the following sequence of commands in your batch file. A pause
occurs before MS-DOS displays the directory on drive B. This allows
you to insert a new diskette in drive B.

DIR A:
ECHO Display the directory of drive B next
PAUSE
DIR B:

7-18 Batch Processing Commands


REM Internal

Purpose
Adds remarks to batch files.

Format
REM [comment]

Description
Use this command to add comment lines in a batch file.

The only punctuation you can use in the comment are spaces, tabs, and
commas.

Note
If ECHO is off, the REM comment is not displayed.

Example
You can enter the following sequence of commands in your batch file:

REM This file checks new disks


REM It is named NEWDISK.BAT
PAUSE Insert new disk in drive B
FORMAT B:/S
DIR B:
CHKDSK B:

The remark lines tell you what the file does and gives the name of the
file.

Batch Processing Commands 7-19


SHIFT Internal

Purpose
Enables more than 10 replaceable parameters within a batch file.

Format
SHIFT

Description
Use this command to shift batch file parameters up one place. SHIFT
makes it easier for a batch file to process a list of parameters that can
vary in number. SHIFT changes the replaceable parameters by shifting
up each value for %0 through %9.

Example
If your data file parameters are:

X =
%i = y
%2 = z
%3 -% 9 are empty

Then a SHIFT command produces the following:

*0 = y
%i = z
%2-%9 are empty

If you more than 10 parameters on a command line, those that


give
appear %9 move one at a time into %9 when you enter successive
after

SHIFT commands.

7-20 Batch Processing Commands


Chapter 8
Programming Tools
Introduction 8-2

DEBUG 8-3

EDLIN 8-23

EXE2BIN 8-43

LINK 8-45

Programming Tools 8-1


Introduction
This chapter describes the MS-DOS commands you use when you start
writing your own programs. The following commands are programming
tools:

Command Description

DEBUG Monitors and modifies the actual content of computer


memory
EDLIN Creates and edits text files

EXE2BIN Converts executable (.EXE) files to binary format


LINK Combines object code program modules into executable
programs.

You can use the EDLIN editor to create any text files, including your
system files such as AUTOEXEC.BAT and CONFIG.SYS.
Normally, the DEBUG, EXE2BIN, and LINK commands are used only
by experienced programmers.

8-2 Programming Tools


DEBUG External

Purpose
Monitors and modifies the actual content of computer memory.

Format
[d;] [path]DEBUG [[d:] [path] filename]

Description
Use DEBUG to debug programs. This utility allows you to test binary
and executable object files. Additionally, you can alter the contents of
files and disks (this is called patching) as well as change CPU registers.

With DEBUG, you do not have to reassemble a file to make minor


changes. To make use of DEBUG, you need to be familiar with
programming and the use of debugging tools.

You can use these two control codes with the DEBUG commands:
• Ctrl C aborts operation of a DEBUG command.
• Ctrl S halts the scrolling of the display. You can restart the display
by pressing any key other than Ctrl C or Ctrl S.

Starting DEBUG—You can start DEBUG in one of two ways.


The first way to start DEBUG is to load DEBUG and then enter a
specific filename.

1. At the command prompt, type the following and press Enter:

DEBUG
The DEBUG program loads and presents you with a hyphen (-)
prompt.

2. Use the Name (N) command along with the filename, and include
the appropriate parameters. At the hyphen prompt, type the
following and press Enter.

N filename parameters

Programming Tools 8-3


For example:

N TESTFILE.EXE /D

3. Now you can execute commands to act on memory, files, .registers,

or disk sectors, and to load and save files.

The second way to start DEBUG is to load DEBUG and the specified

file in one step.

1. At the command prompt, type the following and press Enter (you
do not use the N command when you start DEBUG in this
manner):

DEBUG filename parameters


For example:

DEBUG TESTFILE.EXE /D
This loads both the file TESTFILE and the double-precision
routines for the /D parameter. It’s important to use such a
parameter because the file is different if you do not give the /D
parameter command.

2. Now you can execute commands to act on memory, files, registers,

or disk sectors, and to load and save files.

When DEBUG loads a file into memory, it starts at address 0100


hexadecimal in the lowest available segment. It also loads the number of
bytes placed in memory into the BX:CX registers.

Remember these two points when using DEBUG with files:


• When working with a .COM or .EXE file, if you try to modify the
program header below address 5C, DEBUG terminates.
• Do not attempt to restart you see the message
a program after

Program terminated normally. Use the N and L


commands (see Table 8-1) to reload the program and then rerun it.

8-4 Programming Tools


DEBUG command format— Each DEBUG command you use is a
which you follow with one or more parameters. The
single letter
DEBUG commands and their parameters are shown in Table 8-1. The
standard MS-DOS control and editing function keys apply while using
DEBUG and you can use either upper- or lowercase commands.
DEBUG commands and parameters
Table 8-1.

Commands and parameters Function


A [address] Assemble
C range address Compare
D [range] Dump
E address [list] Enter
F range list Fill

G [ = address [address . .
.]] Go
H value value Hex
I value Input
L [address [drive record record]] Load
M range address Move
N filename [filename] Name
O value byte Output
P Proceed
Q Quit
R [register-name] Register
S range list Search
T = address] [value]
[ Trace
U [range] Unassemble
W [address [drive record record ]] Write

All DEBUG commands accept parameters, with the exception of the


Quit command. You need not separate parameters with delimiters
(spaces or commas), but you must enter a delimiter between two
consecutive hex values. The following examples are equivalent:

dcs:100 110
d cs 100 110
:

d,cs:100,110

Programming Tools 8-5


When a format error occurs in a DEBUG command, DEBUG reprints
thecommand line and displays a second line containing an arrow,
which pinpoints the error. For example:

dcs:100 cs:110
A
error
You can use the following command parameters with DEBUG:
address
This is a two-part designation consisting of either an alphabetic
segment register designation or a 4-digit segment address, plus an
offset value. If you omit the segment designation or segment
address, DEBUG uses the default. DS is the default for all

commands except G, L, T, U, and W, for which the default is CS.


All numeric values are hexadecimal. For example:

100
CS:0100
04BA:0100
You must enter a colon between a segment designation (whether
numeric or alphabetic) and an offset value.

byte
This is a 2-digit hexadecimal value that DEBUG places in or reads
from an address or register.

drive
This is a 1-digit hexadecimal value identifying the drive a file loads
from or writes to. The valid values are: 0 = A:, 1 = B:, 2 = C:,
3 = D:, and so forth.

list

This is a series of strings or byte values, which must be the last

parameter on the command line. For example:

ecs 100 42 45 52 54 4l
:

f cs 100 IFF 42 45 52 54 4l
:

8-6 Programming Tools


range
This parameter has two forms:

• Address address refers to two addresses.

• L value where value is the number


Address of bytes the
command is to operate on, and L80 is the default. Do not use
this form if another hex value follows the range because
DEBUG interprets the hex value as the second address of the
range.

These examples are legal:

CS:100 110
CS 100 L 10
:

CS 100
:

This example is illegal and produces an error:

CS 100 CS 100
: :

A
error
The limit for range is 10000 hex. To specify a value of 10000
hex, type 0000 (or only 0).

record
This is a 1- to 3-digit hexadecimal value, which you use to indicate
the logical record number on the disk and the number of disk
sectors you want to write or load. Logical records correspond to
sectors. However, their numbering differs because they represent the
entire disk space.

Programming Tools 8-7


string

This any number of characters you enclose in quotation marks.


is

Quotation marks can be either single ( ) or double ( ” ). If you


require quotation marks to delimit within a string, you can use two
sets of quotation marks or a combination. For example, the

following strings are legal:

'This "string" is okay.'


'This ''string 1
'
is okay.'
"This 'string' is okay."
"This ""string"" is okay."

These strings are illegal:

'This 'string' is not okay.'


"This "string" is not okay."

DEBUG uses the ASCII values of the characters in the string as a


list of byte values, which means abc is the same as 61 62 63.

value
This is a hexadecimal value of up to 4 digits. Use this parameter to
specify a port number or the number of times a command repeats
its function.

DEBUG commands —The remainder of this section summarizes the


DEBUG commands and their uses.
A (Assemble)
Assembles 8088 mnemonics into memory.

Format: A [address]

Use this command to assemble 8088 mnemonics directly into memory at


address. Enter data as hexadecimal values after mnemonics on separate

lines. You must be familiar with assembly language programming to use


this command.

If DEBUG detects a format error, it points out the error and redisplays
the current assembly address.

8-8 Programming Tools


C (Compare)
Compares portions of memory.

Format: C range address

Use this command to compare the portion of memory you specify in

range to another portion of the same size beginning at address. Nothing


displays if the two areas of memory are identical; otherwise, the
difference displays with the addresses bracketing the different bytes.

For example, both of these commands compare the blc ck of memory


from $100 to $1FF with the block of memory from $300 to $3FF:

C100, IFF 300


C100L100 300

D (Dump)
Displays a portion of memory.

Format: D[ range']

Use this command to display the contents of the region of memory you
specify in range. If you omit range, DEBUG displays 128 bytes starting at
the first address (DS:100) after the address displayed by the previous
Dump command.
The Dump display contains two portions. Each byte is shown in

hexadecimal on the left. The ASCII representation of the byte appears


on the right and identifies nonprinting characters with a period. Each
display line shows 16 bytes with a hyphen between the eighth and ninth
bytes and begins on a 16-byte boundary.

Programming Tools 8-9


An example of this display is shown below:

•d

0A63:0100 B9 2C 00 BE 20 00 8A 14-B4 02 CD 21 46 E2 F7 CD 9,.>...4.M!FbwM


0A63:01 10 20 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0A63:0120 54 68 69 73 20 69 73 20-61 20 74 65 73 74 20 66 This is a test f

0A63:0130 69 6C 65 20 66 6F 72 20-75 73 65 20 77 69 74 68 ile for use with

0A63:0140 20 44 45 42 55 47 2E 0D-0A 0A 0A 07 00 00 00 00 DEBUG


0A63:0150 20 20 74 68 65 20 20 66-69 6C 65 00 08 73 70 65 the file..spe

0A63:0160 63 69 66 69 63 61 74 69-6F 6E 20 20 77 69 6C 6C cification will

0A63:0170 20 6E 65 65 64 20 74 6F-20 62 65 20 63 68 61 6E need to be chan

E (Enter)
Enters a value into memory.

Format: E address [ list ]


Use this command to enter byte values into memory at the address you
specify. The values in list replace the contents of one or more bytes
beginning at address; in the event of an error, no byte values change.

If you omit list, DEBUG displays the specified address and its contents.
It then repeats the address on the next and waits
line for your input.
You can respond in one of the following ways:

• Replace the value of this address by typing a new value.

• Advance to the next byte by pressing the space bar.

• Return to the preceding byte by typing a hyphen (-).

• Terminate the command by pressing Enter.

For example, the command E 100 01 02 changes the byte at location


100 to 01 and the byte at location 101 to 02.

8-10 Programming Tools


F (Fill)

Enters values into memory.

Format: F range list


Use this command to fill the addresses in the range with the values in
the list. For example, if you type the following command:

F04BA:100 L 100 42 45 52 54 4l
DEBUG fills memory locations from 04BA:100 to 04BA:1FF with the
values in the list until all bytes are filled.

G (Go)
Allows you to execute a program at an address you specify.

Format: G [= addressl [ address . .


.]]

Use this command to execute the program currently in memory at


addressl. If you don’t specify the optional address parameters, the
program executes normally.

Use the = addressl parameter to run the program from a particular


address. Use the other optional addresses to set breakpoints.

H (Hex)
Displays the sum and difference of two hexadecimal values.

Format: H value value


Use this command to display the sum and difference of the two values.
First, DEBUG adds the two parameters; then it subtracts the second
parameter from the first. The results display on one line: first the sum,
then the difference. For example, type H19F 10A. DEBUG performs
the calculations and displays the results:

02A9 0095

Programming Tools 8-11


I (Input)
Displays a value.

Format: I value

Use this command to input and display one byte from the port you
specify in value. You can specify a 16-bit port address.

L (Load)
Loads a file into memory.

Format: L [address [ drive record number]]

Usethis command to load a file into memory. After the file loads, the

BX:CX registers contain the number of bytes read. You must name the
file with the N command. DEBUG formats a filename in a file control
block at CS:5C.

Ifyou type the L command without any parameters, DEBUG loads the
filespecified by the N command into memory beginning at address
CS: 100 and sets the BX:CX registers to the number of bytes read. If you
type the L command and include an address parameter, loading begins
at the memory address you specify.

If you type all the parameters, absolute logical disk sectors load, not a
file. The records are taken from the drive you specify. DEBUG begins
loading with the first record and continues until the number of sectors
you specify in the number parameter load.

For example, to load the file TEST1.COM after DEBUG loads, type
the following commands:

-NTEST1.COM
-L
The N command names the file to load and then the L command
carries out the actual loading process.

To load the boot sector of a diskette in drive A at address CS:100, type


the following command:

-L, 100, 0,0,1

8-12 Programming Tools


M (Move)
Moves a block of memory to a new location.

Format: M range address

Use this command to move the block of memory from range to the
location beginning at the address. This command copies data from one
area into another and writes over the new addresses.

However, this command first moves addresses that cou.d be overwritten.


Overlapping moves (that is, where part of the block overlaps some of
the current addresses) always occur without loss of data.

Moves from higher addresses to lower addresses begin at the block’s


lowest address and work toward the highest. Moves from lower
addresses to higher addresses begin at the block’s highest address and
work toward the lowest. If the addresses in the block being moved will

not have new data written to them, the original data remains.

For example, type MCS 100 110 CS 500 DEBUG


: : • first moves
address CS:110 to address CS-.510, then CS:10F to CS:50F, and so on
until CS:100 moves to CS:500. Use the D command to see the results
of the move: D CS 500 : -

N (Name)
Assigns new filenames.

Format: N filename [ filename . .


.]

Use this command to set filenames to perform two functions:

• You can use the Name command to assign a filename for a later
Load or Write command. Thus, if you start DEBUG without
naming a file, then you must use the N command before you can
load a file.

• You can use the Name command to assign filename parameters to


the file that DEBUG is going to affect. For example, you can specify
a set of data files that you want a program file to use.

Programming Tools 8-13


These two functions may overlap. For example, the following set of
DEBUG commands name, load, and then execute the file FILE1.EXE.
-NFILE1.EXE
-L
-G
If the file requires that you add some data files as parameters, you can
use the Name command in the form:

-NFILE1.EXE ONE. DAT TWO. DAT


-L
-G
You can also specify these data files using the N command after loading
FILE1.EXE:

-NFILE1.EXE
-L
-N0NE.DAT TWO. DAT
-G
Although the Go command causes FILE1.EXE to execute as if you
typed ONE DAT and TWO DAT at the MS-DOS command level, this
. .

can cause problems you enter a Write command. If you execute a


if

Write command at this point, it saves FILE1.EXE the file you intend —
to debug — with the name ONE.DAT. To avoid this result, always
execute a Name command before either a Load or a Write command.

O (Output)
Outputs a value.

Format: 0 value byte

Use this command to send the byte you specify to -the output port you
identify in value. A 16-bit port address is allowed.

8-14 Programming Tools


P (Proceed)
Traces a program.

Format: P

Use this command to trace aprogram while it executes so you can see
the contents of all registersand flags next to the decoded instruction.
Interrupts, subroutine calls, repeat-string instructions, and loop
instructions are treated as a single operation. (To trace individual steps,
use the Trace command.) Control is returned to the instruction
immediately after the called routine. This is extremely useful in tracing
across system calls and procedures.

Q (Quit)
Exits DEBUG.
Format: Q
Use this command, which has no parameters, to exit DEBUG and
return to the command level without saving the file currently in
operation.

R (Register)
Displays or alters the contents of CPU registers.
Format: R \_register-name~\
Use this command to display the contents of one or more CPU
registers. If you do not type a register-name the R command dumps the
,

register save area and displays the contents of all registers and flags.

If you type a register-name, the 16-bit value of that register appears in hex
and a colon appears as a prompt. You can type a value to change the
register, or press Enter to leave the register unchanged.

The only valid register names are the following:

AX DX SI ES IP
BX SP DI SS PC
CX BP DS CS F

IP and PC both refer to the Instruction Pointer.

Programming Tools 8-15


Any other entry for register-name results in a BR Error (bad register).

If you enter F as the register-name, DEBUG displays each flag with a


two-character alphabetic code. To alter any flag, type the opposite two-
letter code. You can either set or clear the flags.

The flags and their codes for SET and CLEAR are:

Flag name Set Clear

Overflow OV NV
Direction DN Decrement UP Increment
Interrupt El Enabled DI Disabled
Sign NG Negative PL Plus
Zero ZR NZ
Auxiliary Carry AC NA
Parity PE Even PO Odd
Carry CY NC
S (Search)
Searches for a value.

Format: S range list


Use this command to search the range for the list of bytes. The list may
contain one or more bytes, (separate each one with a space or comma).
If the list contains more than one byte, only the address of the first byte
is returned.

For example, if you type SCS 100 110 4l,


: DEBUG displays a
response similar to this:

04BA:0104
04BA 010D :

T (Trace)
Traces a program.

Format: T [ =address ] [ value ]

8-16 Programming Tools


Use this command to trace a program while it executes so you can see
the contents of all registers and flags next to the decoded instruction.
The optional = address parameter starts tracing at address. The optional
value parameter sets the number of steps you want to trace. If you don’t
specify a value, one step is traced.

The T command uses the trap flag of the 8088 microprocessor, which
means you may also trace instructions stored in ROM.
U (Unassemble)
Converts memory into assembly language mnemonics.

Format: U [ range ]
Use this command to convert the bytes in memory to the
corresponding source statements, showing addresses, byte values, and
mnemonics. You must be familiar with assembly language mnemonics to
understand the output from this command.

W (Write)
Writes a file.

Format: W [ address [ drive record number]]


Use this command to write the debugged file to a disk file. If you use the
W command without parameters, BX:CX must already be set to the
number of bytes to be written; the file begins writing from CS:100. If

you use the W command with just an address, then the file begins
writing at that address. If you use a G or T command, BX:CX must be
reset before using the Write command without parameters. Note that if

a file isloaded and modified, the name, length, and starting address are
all set correctly to save the modified file (as long as the length has not
changed).

You must name the file to be written either when loading DEBUG or
with the N command. In both cases, DEBUG lists the filename in a file
control block at CS:5C.

Programming Tools 8-17


If you type the W command with parameters, the write begins from the
memory address and to the drive you specify. DEBUG writes the file
beginning at the logical record number specified by record, and
continues to write the file until the number of sectors specified in the
number parameter have been written.

Warning
Writing to absolute sectors is extremely dangerous. This process
bypasses the file management portion of MS-DOS.

Example
The following example shows how you can use DEBUG to load and
alter a file and then re-save it on disk. This procedure is commonly

called patching a file. This example makes use of a sample file,

TESTBUG.COM, included on one of your MS-DOS disks. To try the

examples in this section, copy DEBUG.COM and TESTBUG.COM


onto a working disk. Do not write-protect this disk because the
examples include the command to write the altered file to the disk.

Follow these steps to alter a file using DEBUG:


1. Start DEBUG by typing DEBUG and pressing Enter.

2. Name the file to be examined or altered with the Name command.

3. Load the file with the Load command.

4. Examine the file in memory with the Dump and Unassemble


commands.

5. Alter the file with the Edit, Fill, and Assemble commands.

6. Test the program by running parts of it under the control of the Go


command.

7. If necessary, rename the file with the Name command.

8. Put the file back on to the disk with the Write command.

8-18 Programming Tools


Preparing to alter the file — Before altering the sample file, run it to
see what it does. At the command prompt, type TESTBUG and press
Enter. A message prints, the cursor moves down three lines, and the
computer beeps.

Now start DEBUG. To load TESTBUG.COM at the same time as


DEBUG, type DEBUG TESTBUG COM and press Enter. .

Examining the file—TESTBUG.COM is a short file, 50H bytes long.


DEBUG always loads the file you specify starting at 100H in the current
segment. To display the area of memory containing the file, type
D 1(210 L50 and press Enter. You see the following:

0A63:0100 B9 2 C 00 BE 20 01 8A 14- B4 02 CD 21 46 E2 F7 CD 9,.>...4.M!FbwM


0A63.-0110 20 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
0A63:0120 54 68 69 73 20 69 73 20-61 20 74 65 73 74 20 66 This is a test f

0A63.-0130 69 6C 65 20 66 6F 72 20-75 73 65 20 77 69 74 68 ile for use with


0A63:0140 20 44 45 42 55 47 2E 0D-0A 0A 0A 07 00 00 00 00 DEBUG

The first parameter tells DEBUG where to start the dump. The
parameter following the L is the number of bytes to display. The first
two lines of the display consist of the program to print the message and
do not mean anything in this form. The message itself starts on the
third line; you can read it in the block at the right of the screen.

The memory address (in these examples, 0A63) varies depending on


where MS-DOS loads DEBUGinto memory.

To display the program in a more readable form, use the Unassemble


command. Type U 100 l4F and press Enter. You see the program
scroll by on your screen in the following format:

0A63:0146 2E CS:
0A63:0147 0D0A0A OR AX,0A0A
0A63:014A 0A07 OR AL,[BX]
0A63:014C 0000 ADD [BX + SI],AL
0A63:014E 0000 ADD [BX + SILAL,

Programming Tools 8-19


This time the second parameter is the address where DEBUG stops
unassembling. With most commands like this, you can use either
method to tell DEBUG how much of the file to process. The program
displays using assembly language mnemonics. Where the program ends
(after the eighth line), the unassembled codes stop making sense. To see
just the working part of the program, type U 100 L10 and press

Enter.

The other thing you often need to display when you are using DEBUG
is the condition of the registers and flags of the CPU. The Register
command lets you display and alter the register contents. To see the
contents of all the registers and flags, type R and press Enter. You see:

AX -0000 BX = 0000 CX = 0256 DX = 0000 SP = FFFE BP =0000 SI =0000 DI = 0000

DS=0A63 ES = 0A63 SS=0A63 CS=0A63 IP =0100 NV UP El PL NZ NA PO NC


0A63:0100 B92C00 MOV C.X002C

The most important CX and BX in the top row, and IP in


registers are

the second row. When you save a CX and BX tell DEBUG how
file,

much to save. The IP register indicates where DEBUG looks for the
next instruction to execute. The DS, ES, SS, and CS registers vary
depending on where in memory DEBUG loads. The assembly language
mnemonics on the last line are the instructions to which the IP register
is currently pointing.

8-20 Programming Tools


Running the program—The last instruction in the display produced
by the U command starts at 10FH. Because the IP register currently
points to the start of the program at 100H, you can run it using the
Go
command by typing G 10F and pressing Enter. After the message is
printed, you see the registers again:

AX =0000 BX =0000 CX=0000 DX=0007 SP = FFFE BP=0000 SI=014C DI = 0000


DS = 0A63 ES = 0A63 SS = 0A63 CS=0A63 IP=0100 NV UP El PL NZ NA PO NC
0A63:010F CD20 INT 20

Now you can see that DX


contains the value 7, the character that made
the beep, and SI contains 14C, the address of the character after the
beep. Similarly, IP is now 10F, the address of the next instruction
to be
performed. To reset the IP register ready to run it again, type RIP and
press Enter; then type 100 and press Enter.


Altering the program To alter the program to display a shorter
message, followed by just a carriage return and a line feed, you need
to
change the program by putting in the new message, editing in the
carriage return and line-feed codes, and changing the byte
containing
the length of the message. (If you look at the dump from the Dump
command, this is located at address 10 1H.) To change the message to
This is a test message, you must alter bytes starting at 12FH. To edit text
in this way, put it in single quotes. Type E 12F '
message and '
press
Enter.

Ifyou dump the program again with the D command, you see the
altered message.The byte following the end of the new message is at
location 137H. To put in the carriage return and line feed codes, type
E 136 and press Ent6T. DEBUG responds with:

0A63:0136 72.

Programming Tools 8-21


The byte displayed is the current value stored; 72H is the code for an r.

Type the new value, 0D (carriage return), and press the spacebar to

display the next byte. Type 0A (line feed), then press EntSI". The screen

shows the following:

0A63:0136 72. 0D 20. 0A


The total length of the message is now 18H, so you can delete the rest

of the message by typing E 101 and pressing Enter. Type 18 and press
Enter.

You can now try the program using the Go command. (Reset the IP

register afterwards as described above.)

Another command for changing the program is the Fill


useful
command. Use this command to fill an area of memory with a
particular byte or pattern of characters. The following two commands
overwrite the new message with the letter A (character code 41H) and
the pattern az. They also show the two ways of giving the range to fill.
Press Enter after each command. Use the D command after each fill to
examine the results.

-F 120 135 41
-F 120 L16 'az'
Writing the file to disk—When you finish correcting the program,
reset the IP register to the beginning of the program using the R
command. Then set the CX register to tell DEBUG how many bytes to

save. The program is still 50H bytes long, so type R CX and press
Enter. You see CX 0000. Type 50 and press Enter.

Use the R command alone to check that the registers are set correctly,

including the BX register, which must contain 0.

If you want to program a new name, use the Name


give the altered
command. You can save the file by typing W and pressing Enter. You
see the following message:

Writing 0050 bytes

To leave DEBUG, type Q and press Enter.

8-22 Programming Tools


EDLIN External

Purpose
Creates and edits text files for your system.

Format
[d:] [pa thi] EDLIN [d:] [path] filename [/B]

Description
The EDLIN utility is a line editing program that
comes complete with
its own subcommands. You can use EDLIN
to create, change, and
display files, whether they are source programs like a BASIC program or
text files you create using a word processor.

EDLIN is useful only when you want to edit files that are in ASCII
format. This is true of some word-processing and GW-BASIC files.
EDLIN is of limited use with other types of files.

Use the /B switch when editing files that may have end-of-file characters
in the text. The /B switch tells EDLIN to ignore Ctrl Z (1AH).

You can use EDLIN to perform the following functions:

• Create new source files and save them (you can even create a
BASIC program with EDLIN)
• Update existing files and save both the updated and original files

• Delete, edit, insert, and display lines or characters

• Search for, delete, or replace text within one or more lines.

When you create or edit text in files, EDLIN divides the text into lines.
Each line can contain as many as 253 characters. EDLIN displays line
numbers during the editing process but does not actually record them in
the file. EDLIN automatically renumbers lines in the file when you
insert or delete text.

Programming Tools 8-23


Starting EDLIN —To create a new file, type EDLIN followed by the
name of the file you wish to create. The following message and prompt
appear:

New file
*

Notice that the EDLIN prompt is an asterisk (*).

You can now type lines of text into the file. To begin entering text, use

the I command to insert lines. (The I command is explained later in this


chapter.)

To edit an existing file, type EDLIN and the name of the file you want
to edit. EDLIN loads the file into memory and displays this message on
your screen:

End of input file


*

You can then edit the file using the EDLIN commands.

If the file is too large to be loaded into memory, EDLIN loads lines of
the file until memory is three-quarters full; then it displays the *

prompt. You can then edit the portion of the file in memory.

To edit the remainder of the file, you must first save the edited lines.
EDLIN then loads the unedited from disk into memory. Use the
lines

Write and Append commands for this procedure.

When you complete the editing session, you can save the original and
the updated (new) file to disk using the End command. The original
filename now includes a .BAK extension, and the new file has the
filename and extension you originally specified with the EDLIN
command. Do not erase any previous .BAK files until the end of the
editing session or until you require extra disk space.

8-24 Programming Tools


Warning
Do not try to edit a file with an extension of .BAK because FPT IN
assumes that any .BAK file is a backup file. If you find it necessary to
edit such a file, rename the file with another extension (using the
MS-DOS RENAME command), then start EDLIN and specify the new
filename.

When editing a new file or an existing one with EDLIN, remember that
it is acceptable to use path names along with the filename. For example,
typing EDLIN \WORDPROC\PERSONAL\RESUME TXT . allows you
to edit RESUME.TXT in the subdirectory PERSONAL.
Command information—Table 8-2 provides a summary of the
EDLIN commands.
Table 8-2. EDLIN commands
Command Function
line Edits line number
A Appends lines
C Copies lines
D Deletes lines
E Ends editing; saves all changes
I Inserts lines
L Lists lines
M Moves lines
P Inserts page breaks
Q Quits editing; does not save changes
R Replaces lines
S Searches text
T Transfers text
W Writes lines

Several EDLIN commands accept one or more options. The effect of an


option varies, depending on the command you are using. The
command options are shown on the following page.

Programming Tools 8*25


line

This option indicates a line number that you type. You can enter a
comma or a space to separate line numbers from other line
numbers, other options, and from the command.

You can specify line in one of four ways:

• Type any whole number less than 65534. If you specify a number
greater than the largest existing line number, then EDLIN assumes
you mean the line after the last existing line number.

• Type a period (.) to indicate the current line number. The current
line is the last line edited. An asterisk (*) between the line number
and the first character appears on your screen to mark the current
line.

• Type a pound sign (#) to indicate the line after the last line number
in the file. This has the same effect as specifying a number larger

than the last line number in the file.

• Press Enter without any line specifiers to direct EDLIN to use the
default value for the command.
7

The question mark option directs EDLIN to ask if a correct string


has been found when using the Search and Replace commands.
Before continuing, EDLEN waits for you to enter either a Y or

Enter for a Yes response, or any other key for a No response.


string

The string option represents text you want to find or replace, or the
replacement text. Use the string option only with the Search and
Replace commands. You must press Ctrl Z or Enter to end each
string. Do not leave spaces between strings or between a string and
its command letter, unless you want to include those spaces as part

of the string.

8-26 Programming Tools


Special editing features —There are several special features that
enhance the EDLIN editing commands:

• You can reference line numbers relative to the current line. Use a

minus sign (-) with a number to indicate lines before the current
line. Use a plus sign (+) with a number to indicate lines after the
current line. For example, the command -10,+10L lists 10 lines
before the current line, the current line, and 10 lines after the
current line.

• You can issue multiple commands on one command line. When


issuing a command to edit a single line using a line number, you
must use a semicolon to separate commands on the line. Otherwise,
one command may follow another without any special separators.
In the case of a Search or Replace command, you can end the string
by a Ctrl Z instead of Enter. For example, the command line
15;-5,+5L edits line 15 and then displays lines 10 through 20 on
the screen.

To search for This string and then display 5 lines before and 5 lines
after the line containing the matched string, type SThis String
and press Ctrl Z; then type -5 , +5L.

• You can type EDLIN commands with or without a space between


the line number and command. For example, to delete line 6, the
command 6D is the same as 6 D
• Press Ctrl V while in the insert mode to insert control characters
into text. Ctrl V you type is
indicates that the next uppercase letter
a control character. You can also use a control character in any of
the string arguments of Search and Replace. For example, to find
the first occurrence of Ctrl Z, type S, press Ctrl V, and type Z.

To replace all occurrences of Ctrl Z in a file with the End command,


type R, press Ctrl V, type Z, press Ctrl Z, and type End.
To insert a Ctrl V into the text, press Ctrl V and type V.

Programming Tools 8-27


• Ctrl Z normally indicates end-of-file. If you use Ctrl Z characters
elsewhere in a file, it is necessary to tell EDLIN that these do not
mean end-of-file. This is done by using the optional /B switch when
entering EDLIN. In this way, EDLIN ignores all Ctrl Z characters
and shows the entire file.

EDLIN also makes use of the special editing keys. See Chapter 1 for a
complete description of how to use these keys for editing.

EDLIN commands—This section provides an alphabetical list of all

EDLIN commands and examples of how to use them.

A (Append)
Adds data to a file.

Format: [fl]A

Use this command to append, or add, a specific number of lines (n) from
disk to the you are editing in memory. EDLIN adds these
file lines at the
end of the lines currently in memory.

This command is meaningful only if the file you are editing is too large
to fit into memory.

To edit the remainder of the


file that does not fit into memory, you must

you have already edited to disk. After this is done,


write the lines that
you can load unedited lines from disk into memory with the Append
command. Refer to the Write command in this section for information
on how to write edited lines to disk.

If you do not number of lines to append, EDLIN appends


specify the
lines until available memory is three-quarters full. No action is taken if
available memory is already three-quarters full. Once the last line of the
file is read, you see the message End of input file.

Examples: After you save edited lines to disk with the Write command,
type 20A at the * prompt to append the next 20 lines to memory.

8-28 Programming Tools


C (Copy)
Copies lines of text.

Format: [begline] [, endline ,~\line[ , counfr]C


Use this command to copy a range of lines ( begline to endline) to a
specific line number. You can copy the lines as many times as you like by
using the count option.

If you do not specify count , EDLIN copies the lines once. If you omit
begline or endline, the current line is the default. After the copy, the file

is renumbered automatically.

If the line numbers overlap, the message Entry error displays. For
example, typing 3*20, 15C produces this error message.

Ifyou want to place text within other text, specify the line before the
linewhere you want the copied text to appear. In other words, the
copied text is inserted after the line you specify.

Examples: Assume that the following file exists and is ready for you to
edit:

1:This is a sample file


2:used to show copying lines.
3: See what happens when you use
4: the (C)opy command
5: to copy text in the file

Type 1 , 5 , 6C to copy this entire block of text. The result is:

1: This is a sample file


2: used to show copying lines.
3: See what happens when you use
4: the (C)opy command
5: to copy text in the file
6: This is a sample file
7: used to show copying lines.
8: See what happens when you use
9: the (C)opy command
10: to copy text in the file

Type 1, 5 , 6, 2C to make two copies of the lines.

Programming Tools 8-29


D (Delete)
Deletes lines of text.

Format: •[begline'] [,endline']D

Use this command to delete a range of lines from a file.

Ifyou omit begline, it defaults to the current line (the line with the
To delete begline only, omit endline. After the deletion, the line
asterisk).

immediately following the deleted section becomes the current line with
the same line number as the original begline.

Examples: Assume that the following file exists and is ready for you to
edit:

1: This is a sample file


2: used to show dynamic line numbers
3: See what happens when you use
4: Delete and Insert

25: (the D and I commands)


26: to edit the text
27:* in your file
Type 5 , 24D to delete lines 5 through 24. The result is the following:

1: This is a sample file


2: used to show dynamic line numbers
3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)
6: to edit the text
7:*in your file

8-30 Programming Tools


Type 6D to delete this single line. The result is the following:

1: This is a sample file


2: used to show dynamic line numbers
3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)
6:*in your file
Next, to change the current line to 3, 3 at the asterisk and then
type
press Enter. Press Enter again to the ED LIN prompt.

Type , 6D to delete the lines from the current line, which is now 3, to

line 6. The result is the following:

1: This is a sample file


2: used to show dynamic line numbers
3:*in your file
Notice that the lines are automatically renumbered.

E (End)
Exits EDLIN.

Format: E

Use this command to save the edited file on disk, rename the original
input file to filename .BAK, and then exit EDLIN. If you originated this
file during the editing session, EDLIN does not create a .BAK file.

The E command has no options. Therefore, you cannot indicate the


drive where you want to save the file E command. You must
using the
select the drive where you want to save the when you start the editing
file

session. If you did not specify a drive, then EDLIN saves the file on the
default drive. You can copy the file to a different drive using the

MS-DOS COPY command.


You must be sure that the disk contains enough free space for the entire

file. If the disk does not contain enough free space, the disk writing
process aborts and parts of the edited file are lost.

Programming Tools 8-31


After executing the E command, the MS-DOS prompt is displayed. You
can use the MS-DOS DIR command to check the status of the saved
file.

I (Insert)

Inserts text.

Format: [line]

Use this command to insert text immediately before the specified line. If
you do not specify line, new lines are inserted before the current line. If
line is any number larger than the last line number, or if you use a

pound sign (#) to specify line, the inserted lines append to the end of the
file. In this case, the last inserted line becomes the current line.

If you are creating a new file, you must enter the I command before you
can type (insert) text. Text begins with line number 1 and successive line
numbers appear automatically each time you press Enter.

EDLIN remains in insert mode until you press Ctrl C. After the insert
is complete and you exit insert mode, the line immediately following the
inserted lines becomes the current line. All line numbers following the
inserted section are incremented by the number of inserted lines.

Examples: Assume that the following file exists and is ready for you to
edit:

1: This is a sample file


2: used to show dynamic line numbers.
3: See what happens when you use
4: Delete and Insert
5: to exit text
6: and remember lines
7:*in your file
Type 5 1 to insert text before a specific line (in this case, line 5) that is

not the current line.

8-32 Programming Tools


EDLIN displays a blank line with the number 5 and an asterisk, and
waits for you to insert text.

Now, type (the D and I commands) as the text for line 5. When line
number 6 appears, press Ctrl C to end the insertion.

Type L to list the entire file. You see the following:

1: This is a sample file


2: used to show dynamic line' numbers.
3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)
6:*to edit text
7: and renumber lines
8: in your file

Type I only to insert text immediately before the current line.

To exit insert mode, press Ctrl C once again.


You can type §1 or 201 to append new lines to the end of the sample
file.

Both formats tell EDLIN to start appending after the last line. In the
second case, 20 is larger than the last line number that exists in the file,

so EDLIN starts appending after the last line number.

L (List)
Displays text.

Format: \_begline'] [ , endline ] L


Use this command to list, or display, a range of lines including the two
lines you specify. If you omit either begline or endline, EDLIN uses default
values.

Programming Tools 8-33


If you omit begline, the display starts 1 1 lines before the current line and
ends with endline. You must enter the beginning comma to indicate the
default option:

, endline L
If you omit endline the screen displays 23 lines starting with begline:

begline L
If you omit both parameters, 23 lines are displayed. These include the
1 1 lines before the current line, the current line, and the 1 1 lines after. If
there are fewer than 1 1 lines before the current line, more than 1 1 lines
after the current line are displayed to make a total of 23.

Examples: Assume that the following file exists and is ready for you to
edit:

1 This is a sample file


2 used to show dynamic line numbers
3 See what happens when you use
4 Delete and Insert
5 (the D and I commands)

15 *The current line contains an asterisk.

26: to edit text


27: in your file.

Type 2 , 5L to list a range of lines without reference to the current line.

The result is the following:

2: used to show dynamic line numbers


3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)

8-34 Programming Tools


Type , 26L to list a range of lines beginning with the current line. The
result is the following:

15 :*The current line contains an asterisk.

26: to edit text

Type L to list a range of text centered around the current line.

M (Move)
Moves text to a new location.

Format: [begline][, endline, ]lineM


Use this command to move a block of text to another location in the
file. The lines renumber according to the direction of the move. If the
line numbers overlap, EDLIN displays the message Entry error.
Examples: Type , +25 100M to move text from the current line plus
25 lines to line 100. Type 20,30, 100M to move lines 20 through 30 to
line 100.

P (Page)
Pages through text.

Format: [begline] [, endline] P


Use this command to page through a file 23 lines at a time. If you omit
begline, that number defaults to the current line plus 1. If you omit
endline, the 23 lines following begline display. The new current line
becomes the last line displayed.

Examples: Type P to display the 23 lines following the current line.

Type 5P to display the 23 lines following line 5.

Programming Tools 8-35


Q (Quit)
Ends EDLIN.

Format: Q
Use this command to quit the editing session without saving any editing
changes you have made. You exit EDLIN, and the default drive prompt
appears.

Because using this command has drastic effects, EDLIN prompts you to

make sure that you don’t want to save the changes. Press Y if you want
to quit the editing session. Press N or any other character (except Y) if
you want to continue the editing session.

Warning
When you start this command, EDLIN erases the .BAK file associated

with the specified filename. If you reply Y to the abort message, the
previous .BAK file no longer exists.

Remember to use the E command to make permanent changes to the


file.

Examples: To quit the editing session, type Q and press Enter.

You see the message:

Abort edit (Y/N)?

Type Y and then press Enter to abort the file.

R (Replace)
Replaces text.

Format: [begline] l, endline] [l]RstringlC\r\ Zstring2

Use this command to replace all occurrences of a string of text in the


specified range with a different string of text or blanks. After you type
Rstringl, press Ctrl Z and then type String2.

8-36 Programming Tools


EDLIN finds each occurrence of stringl and replaces it with string2.
EDLIN displays each line in which a replacement occurs. If a line
contains two or more replacements of stringl with string, the line is

displayed once for each occurrence. When EDLIN replaces all

occurrences of stringl with string2 the R command terminates and the


asterisk prompt is displayed.

When you give a second string as a replacement, you must separate


stringl from with a Ctrl Z. You must also end string2 with a
string2

Ctrl Z and Enter combination or with a single Enter.

If you omit stringl Replace takes the old stringl as its value. If there isn’t
a prior stringl, the replacement process terminates immediately. If you
omit string2, you can press Enter to end stringl.

If you omit begline in the range argument, then begline defaults to the
line after the current line. If you omit endline, # is the default. This is the
same as begline/. Remember, # indicates the line after the last line of the
file.

If you end stringl with Ctrl Z and there is no string2, an empty


string
becomes the new replace string. For example, type Rstring2 and
press Ctrl Z and Enter to delete occurrences of stringl. But if you type
Rstringl and press Enter and then type R and press Enter, EDLIN
replaces stringl with the old string2, and the old stringl with the old
Note that old refers
string2, respectively. to a string previously specified
in a Search and Replace command.

Ifyou use the question mark (?) option, the Replace command stops at
each line with a string that matches stringl, displays the line with string2
in place, and then displays 0 . K . ? as the prompt.

Ifyou press Y or Enter, then string2 replaces stringl, and EDLIN finds
the next occurrence of stringl. Again, the 0 . K . ? prompt displays. This
process continues until the end of the range or until the end of the file.

After finding the last occurrence of stringl, EDLIN displays the asterisk
prompt.

Programming Tools 8-37


If you any key other than Y or Enter after the 0 . K . ? prompt,
press
stringl does not change and Replace goes to the next occurrence of

stringl (even if stringl occurs more than once in a line). EDLIN replaces

each occurrence of stringl individually and the 0 . K . ? prompt displays


before each replacement. In this way, you can select each stringl
replacement, and prevent unwanted substitutions.

Examples: Assume that the following file exists and is ready for you to
edit:

l:*This is a sample file


2: used to show dynamic line numbers
3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)
6: to edit text
7: in your file.
8: The insert command can place new lines
9: in the file; there's no problem
10: because the line numbers are dynamic;
11: they'll go all the way to 65533.

To replace all occurrences of and with or in a specified range, type


2 , 12Rand and press Ctrl Z. Then type or and press Enter. The
result is the following:

4: Delete or Insert
5: (the D or I commands)
5:#(the D or I commors)
8: the insert commor can place new lines

Perhaps there are some unwanted substitutions. To avoid these and to


confirm each replacement, you can use the same original file with a
slightly different command.

8-38 Programming Tools


In the next example, only certain occurrences of and with or can be
made. To force the O.K.? prompt, type 2, 12?Rand and press Ctrl Z.
Then type or and press Enter. The result is:

4: Delete or Insert
O.K.? Y
5: (The D or I commands)
O.K.? Y
5: (The D or I commors)
O.K.? N
8: The insert commor can place new lines
O.K. ? N
*

Now, type the List command (L) to see the result of all these changes.
You should see the unchanged lines and the new ones.

S (Search)
Searches for a string of text.

Format: [begline] [, endline'] [?]Sstring

Use this command to search the specified range of lines for the specified
string of text. You must press Enter to end the string.

The first line that matches string displays and becomes the current line.
If you do not specify the question mark option, the Search command
terminates when it finds a match. If it cannot find a match, you see the
message Not found.
Ifyou include the question mark option (?) in the command, EDLIN
displays the first line with a matching string and the 0 . K . ? prompt is
displayed.

If you press either Y or Enter, the line becomes the current line and the
search terminates. If you press any other key, the search continues.

Programming Tools 8-39


If you omit begline, it defaults to the line after the current line. If you
omit endline, it # (the line after last line of the file), which
defaults to is

the same as begline, #Sstring. If you omit string, Search takes the old
string if there is one. (Note that old refers to a string specified in a
previous Search or Replace command.) If an old string does not exist,

the command terminates immediately.

Examples: Assume that the following file exists and is ready for you to
edit:

1: This is a sample file


2: used to show dynamic line numbers
3: See what happens when you use
4: Delete and Insert
5: (the D and I commands)
6: to edit text
7: in your file.
8: The insert command can place new lines
9: in the file; there's no problem
10 : because the line numbers are dynamic;
11: they'll go all the way to 65533.
To search for the first occurrence of the string and between lines 2 and
12 inclusive, type 2, 12Sand and press Enter. The following line
appears:

4: Delete and Insert


To find the next and type , 12Sand and press Enter. The search then
continues from the line after the current line (line 4), because you did
not specify the first line. The result is the following:

5: (the D and I commands)

To search for several occurrences of the string and, type l?Sand and
press Enter. The result is:

4: Delete and Insert

O.K.?

8-40 Programming Tools


If you press any key (except Y or Enter), the search continues, so press
N here. You see the following:

5: (the D and I commands)


O.K.?

Now press Y to terminate the search. You see the EDLIN * prompt.

To search for string XYZ without the verification (O.K.?), type SXYZ .

EDI IN reports a match and continues to search for the same string
when you type the S command with no options. This is because string
defaults to any string previously specified in a Replace or Search
command.

T (Transfer)
Moves text into the current file.

Format: [line]!: filename

Use this command to insert, or merge, the contents of filename into the
you are currently editing at the line you specify. If you omit line,
file

EDLIN uses the current line.

This command you want to place the contents of a file into


is useful if

another file or into the text you are typing. The text inserts at the line
number you specify in line and the lines automatically renumber.

Examples: Type TNEW TXT . to insert text from a file called NEW.TXT
at the current line.

Type 100TINS.DOC to insert the text from INS.DOC starting from


line 100.

W (Write)
Writes text to disk.

Format: [ 22 ] W

Use this command to write a specific number of lines (n) to disk from
the lines that you are editing in memory. EDLIN writes the lines to the
disk beginning with line number 1.

Programming Tools 841


This command is meaningful only if the file you are editing is too large
to fit into memory. When you start EDLIN to edit a file, EDLIN reads
linesfrom the file until memory is three-quarters full. To edit the
remainder of your file, you must write edited lines in memory to disk.
Then, use the Append command to load additional unedited lines from
disk into memory.

If you do not specify n, EDLIN writes lines until one-quarter of memory


is available. If available memory is already greater than one-quarter, no
action is taken. All lines renumber, so that the first remaining line
becomes line number 1.

Examples: Type 100W to save the first 100 lines of text to disk.

8-42 Programming Tools


EXE2BIN External

Purpose
Converts .EXE files to .BIN files.

Format
[d: ] [path'] EXE2BIN [d:] [path] filename
[d: ] path ] filename ]

Description
Use this command only if you want to convert your executable (.EXE)
files to binary format. This conversion saves disk space and provides
faster program loading.

The first file you name is the input file. If you do not specify an
extension, it defaults to .EXE.

If you do not specify a drive, this command uses the drive of the input
file. If you do not specify an output filename, the command uses the
input filename. If you do not specify a filename extension in the output
filename, the new file takes the extension .BIN.

To execute the new .BIN file, you need to rename it with an extension
of .COM.

The input file must be in a valid .EXE format as produced by the LINK
command. The resident, or actual code, and data part of the file must
be less than 64K. There must be no STACK segment.

Two kinds of conversions are possible, depending on whether or not


the .EXE file contains a specified initial Code Segment and Instruction
Pointer (CS:IP).

Programming Tools 8-43


• If the .EXE file does not contain a specified CS:IE a pure binary
conversion takes place. If segment fixes are necessary (that is, the
program contains instructions requiring segment relocation),
prompts appear asking for the fixup value. This value is the absolute
segment where the program is to load. The resulting program is
usable only when loaded at the absolute memory address specified
by a user application. If not, the command processor is not capable
of properly loading the program.

• If you specify CS:IP as 0000: 100H, this command runs the file as
a .COM file with the location pointer set at 100H by the assembler
statement ORG; the first 100H bytes of the file delete. You cannot
provide segment fixups because .COM files must be segment
relocatable. Once the conversion is complete, you may rename the
resulting file with a .COM extension. Then, the command
processor can load and execute the program in the same way as
the .COM programs supplied on your MS-DOS system diskettes.

8-44 Programming Tools


LINK External

Purpose
Combines object code program modules.

Format
[d:] [pa th] LINK [filename[ , filename . .
.]
[/ switch . . .]]

[d: ] [path] LINK @ [d: ] [path'] filename

Description
The MS-DOS LINK utility is a program that does the following:

• Combines produced object modules into one relocatable


separately
load module, which is a program you can run

• Searches library files for definitions of unresolved external references

• Resolves external cross-references

• Produces a listing that shows both the resolution of external


references and error messages.

When you write a program, you write it in source code, either in a high-
level programming language such as BASIC or in assembly language. If
you use a high-level language, your source code passes through a
compiler. you use assembly language, the source code passes through
If

an assembler. Both the compiler and the assembler produce object


modules.

The object modules must then pass through a linking process to


produce a language that the computer can understand directly. Machine
language is the form your computer requires in order to run programs.

You may wish to link, or combine, several programs and run them
together. LINK enables you to do this. LINK combines several object

modules into one relocatable load module, which is then given the .EXE
extension.

Programming Tools 8-45


Your programs may contain symbols (called external references), which
are defined in other object modules. As it combines modules, LINK
makes sure that all external references between object modules are
defined. LINK can search several library files for definitions of any
external references that are not defined in the object modules. LINK
produces a List file that shows resolved external references and also
displays any error messages.

LINK uses available memory as much as possible. When no mem _>ry is


available, LINK creates VM.TMPJ which is a temporary disk file on the
default drive.

The following figure illustrates the various parts of the LINK operation:

8-46 Programming Tools


Ifyou are writing and compiling programs in assembly language, you
need to understand how this language divides memory into segments,
classes, and groups. The following figure illustrates this division of

memory.

Shaded area = a group (64k bytes addressable)

In this illustration, the divisions may be:

Segment Segment Class


Name Name
Segment 1 PROG.l CODE
Segment 2 PROG.2 CODE
Segment 12 PROG.3 DATA
Segments 1,2, and 12 have different segment names but may or may
not have the same segment class name. Segments 1,2, and 12 form a
group.

Each segment has a name and a class name. LINK loads all segments
into memory by class name from the first segment it encounters to the
last. All segments with the same class load into memory contiguously.

A group is a collection of segments that fit within a 64KB area of


memory. The segments do not need to be contiguous to form a group.
The address of any group is the lowest address of the first segment in
the group. LINK analyzes the groups and references the segments by
their addresses in memory. A program may consist of one or more
groups.

Programming Tools 8-47


When you write assembly language programs, you can assign the group
and class names in your program. In high-level languages, such as
BASIC, COBOL, FORTRAN, and Pascal, the compiler names groups
and classes automatically.

Files used by LINK—You can direct LINK to use general files. You
can do the following:

® Work with one or more input file

• Produce one or two output files

• Create a temporary disk file

• Search up to eight library files.

You use the standard specification when specifying files in LINK. Be


sure to include the drive and path if necessary.

If you don’t specify a file extension for the input, or object file, LINK
recognizes the following default extensions:

.OBJ Object
.LIB Library

LINK appends the following default extensions to the Run and List
output files:

•EXE Run
.MAP List

You cannot change these extensions.

LINK uses available memory first. If your files create an output file that
exceeds available memory, LINK creates a temporary file. It names this
file VM.TMP and puts it on the disk in the default drive. If LINK
creates VM.TMP this message appears:
VM.TMP has been created.
Do not change disk in drive, d:

8-48 Programming Tools


Once this message appears, you must not remove the disk from the
you do, the operation of
default drive until the link session ends. If
LINK is unpredictable and LINK may display the following error
message:

Unexpected end of file on VM.TMP


During the link process, LINK prompts you for the name of a Run file:

Run File:
LINK writes the contents of VM.TMP to this file. VM.TMP is a

working file only and LINK deletes it at the end of the linking session. If
you do not care to save the contents of VM.TMP, do not enter a
filename for the Run File prompt.

Warning
Do not use VM.TMP as a filename for any file. If you do and LINK
requires a temporary file, LINK deletes any existing VM.TMP file to
create a new file.

Starting LINK—To start LINK; you must enter the LINK command
and its parameters. You do this in one of three ways:

• You can type LINK only and then enter the parameters in response
to individual prompts. Type LINK and press Enter.

• You can type theLINK command and all its parameters on the
command line. Type LINK filenames [/ switches'] and press

Enter.

You can also further define this format as:

LINK object-list , run file, list file,


lib-listl/switch .] . .

In this format, object-list is a list of object modules, which you


separate with plus signs, runfile is the name of the file to receive the
executable output, listfile is the name of the file to receive the listing.

lib-list is a list of library modules you want to search, /switch refers

Programming Tools 8-49


to optional switches, which you can place following any of the
response entries (just before any of the commas or after the lib-list,

as shown).

To select the default for a parameter, simply type a second comma


with no spaces between the two commas.

This format of the LINK command can easily fill up the command
line. You can press Ctrl J to move the cursor to the beginning of a
new line without actually terminating the line. After you type all

parameters, press Enter.

• You can create a response file that contains all the necessary
parameters. Then type LINK and the name of the response file on
the command line. Type LINK @ filename and press Enter.

When specifying LINK commands, you can use the plus sign (+), the
semicolon (;), and Ctrl C to control the link process.
• You can use the plus sign (+) as well as blanks to separate filenames.
You can extend the response to the Object Modules and
also
Libraries prompts using the plus sign. With a large number of
responses, type a plus sign and
Enter at the end of the line.
press
LINK repeats either the Object
Modules or Libraries prompt and
you can continue to type responses. Once you enter all the modules
to link and libraries to search, be sure to end the response line with
a module name (not with a plus sign) followed by Enter.

• Use a semicolon (;) to select default responses.

• Use Ctrl C at any time to abort the link session. If you type an
erroneous response, such as an incorrect filename, you must press
Ctrl C to exit and then restart LINK. If you make an error before
you press Enter, you can backspace to delete the erroneous
characters on that line only.

After you enter the last parameter and press Enter, LINK begins the
linking process. When it’s complete, LINK exits to the operating system.
When you see the command prompt, you know that the LINK process
was successful. If the link session is unsuccessful, an appropriate error
message appears.

8-50 Programming Tools


LINK Parameters —This section describes the parameters LINK
requires for operation.

Object module — The first parameter must be the name of the object
module. The prompt you see is the following:

Object Modules [.OBJ]:


Type a list of the object modules you want to link. LINK assumes that
the filename extension isone of your object modules has any
.OBJ. If

other filename extension, you must enter the extension.

Remember that LINK loads segments into classes as it encounters them.


Therefore, enter the object modules in the order in which you want
LINK to read them.

Separate the object modules by blank spaces or plus signs (+). If a plus
sign is the last character you type, the prompt reappears. There
is no

default; you must enter a response.

Run file— The next parameter is the name of the Run File. The prompt
you see is:

Run File [Object-filename.EXE]:


Type if you want to create a file for storing the executable
a filename
object code that results from the link session. All Run files receive
the filename extension .EXE, even if you specify an extension other
than .EXE.

If you don’t type a response to the Run


File prompt, LINK uses the first
filename typed in response to the Object Modules prompt as the Run
filename.

List file — The third parameter is the name of the List file. The prompt
you see is:

List File [NUL.MAP]

Thisfile contains an entry for each segment in the input (object) modules.
Each entry shows the addressing in the Run file.

If you don’t enter a List filename, LINK does not create a map file.

Programming Tools 8-51


Libraries —The last parameter is name of the library files you want
the
LINK to search for external references. The prompt you see is:

Libraries [.LIB]:

You can enter up to eight library filenames. You must create the library

files with a library utility. LINK assumes that the filename extension
is .LIB for library files. If you press Enter only, LINK searches all files

with the .LIB extension.

Separate the library filenames with a blank space or a plus sign (+). If a

plus sign is the last character you type, the prompt reappears.

LINK searches your library files in the order you list them to resolve
external references. When it finds the module that defines the external
symbol, LINK processes that module as another object module.

If LINK cannot find a library file on the disk in the specified disk drive,

you see a message instructing you to type a new drive letter:

Cannot find library < library-name >


Type new drive letter:

LINK switches—You can specify switches to control various LINK


functions. You type the switches after each parameter, regardless of how
you enter the parameters. If you type more than one switch at the end of

a parameter, you must precede each switch with a forward slash (/).

You can abbreviate all the switches. The only restriction is that an

abbreviation must be sequential from the first letter through the last letter

you type; you cannot have gaps or transpositions. For example, legal and
illegal abbreviations for the DS ALLOC A H switch include: 1

Legal Illegal

/D /DSL
/DS /DAL
/DSA /DLC
/DSALLOCA /DSALLOCT
The remainder of this section describes the switches you can use with
LINK.

8-52 Programming Tools


/CPARMAXALLOC:n
This switch sets the maximum number of 16-byte paragraphs that will be
program when it is loaded into memory by MS-DOS.
allocated for this (n

can be any number from 1 to 65535.)

LINK normally allocates 65535 paragraphs, which represents all

addressable memory. Use this switch to free additional space in memory


for other programs.

/DOSSEG
Use this switch to tell LINK to arrange all segments in the executable file

according to these rules:

• All segments with the class name CODE are placed at the beginning
of the executable file.

• All other segments that do not belong to the group DGROUP are
placed immediately after the CODE segments.
• All segments that belong to the group DGROUP are placed at the
end of the file.

/DSALLOCATE
Use this switch to tell LINK to load all data at the high end of the data
segment. Otherwise, LINK loads all data at the low end of the data
segment. At DS pointer is set to the lowest possible address
runtime, the
in order to use the entireDS segment. Use of the /DSALLOCATE
switch in combination with a low default load (that the /HIGH switch is,

is not used) permits the user application to dynamically allocate any


available memory below the area specifically allocated with DGroup, yet
to remain addressable by the same DS pointer. Pascal and FORTRAN
programs need this dynamic allocation.

Note
Your application program may dynamically up to 64KB (or the
allocate

amount of memory
actual available) less the amount allocated with
DGroup.

Programming Tools 8-53


/EXEPACK
Use this switch to pack executable files. LINK removes sequences of
repeated bytes (typically NULs) and optimizes the load-time relocation
table before creating the executable file.

Packed executable files may be smaller and load faster than other files.

Programs that have a large number of load-time relocatiohs (about ^00 or


more) and long streams of repeated characters will usually be shorter if

packed. Other programs may not be shorter. You cannot use the
Microsoft Symbolic Debug Utility (SYMDEB) with packed files.

/HELP
Use this switch to view a list of the available options on your screen. Do
not include a filename when using this switch.

/HIGH
This switch places the Run file as high as possible in memory. Otherwise,
LINK places the Run file as low as possible.

Note
Do not use the /HIGH switch with Pascal or FORTRAN programs.

/LINENUMBERS
This switch includes line numbers and addresses to identify the source

statements from the input modules in the List file. Otherwise, the List file

does not include line numbers.

Note
Not all compilers produce object modules that contain line number
information. In these cases, of course, LINK cannot include line numbers.

/MAP
This switch lists all global symbols defined in the input modules. If /MAP
is not given, LINK only lists errors (including undefined globals).

LINK lists the symbols alphabetically at the end of the List file. For each
symbol, LINK lists its value and its segment:offset location in the Run file.

8-54 Programming Tools


/NODEFAULT
This switch (which is short for NODEFAULT LIBRARY SEARCH)
prohibits a search of the default libraries in the object modules. For
example, if you are linking object modules in Pascal, and specify the

/NODEFAULT switch, LINK does not automatically search the library


named PASCAL.LIB to resolve external references.

/NOGROUP
Use this switch (which is short for NO GROUP ASSOCIATION) to
ignore groups associations when assigning addresses to data and code
items.

Note
This switch exists strictly for compatibility with older versions of
FORTRAN and Pascal (Microsoft versions 3. 13 or earlier or any IBM
version prior to 2.0). Only use this option to link with object files or
libraries produced by these compilers.

/NOIGNORE
This switch (which is short for NO IGNORE CASE) tells LINK to
recognize the difference between upper- and lowercase characters. With
this switch, LINK treats TWO, two, and Two as different symbols.

Typically, you use this switch with object files created by high-level

language compilers.

/OVERLAYINTERRUPTrn
Use this switch to set the interrupt number of the overlay loading routine
to n (n can be a value from 0 to 255). This overrides the normal overlay
interrupt number of 03FH.

Only use you are linking with a run-time module from a


this switch if

language compiler that supports overlays. Do not use interrupt numbers


that conflict with the standard MS-DOS interrupts.

Programming Tools 8-55


/PAUSE
LINK pauses during the session when it encounters this switch. Normally,
LINK performs the linking session from beginning to end without
stopping. This switch allows you to change disks before LINK outputs the
Run (.EXE) file.

When LINK encounters the /PAUSE switch, you see the message:

About to generate .EXE file


Change disks <hit any key)
LINK resumes processing when you press any key.

Note
Do not remove the disk to receive the List file, or the disk containing the
VM.TMP file, if one was created.

/SEGMENTS™
Use this switch to process no more than n segments per program (n can
be any number from 1 to 1024). If LINK encounters more than n
segments, you see an error message and LINK stops. This switch overrides
the default limit of 128 segments.

/STACK
Use this switch to specify the size of stack to be created. The format is:

/STACK: number)

where number represents any positive numeric value (in hexadecimal) up


to 65536 bytes. If you type a value from 1 to 511, LINK uses 512.

If you do not specify the /STACK switch, LINK calculates the necessary
stack size automatically. All compilers and assemblers should provide
information in the object modules that allow the LINK program to
compute the required stack size.

8-56 Programming Tools


At least one object module must contain a stack allocation statement. If

not, LINK displays the message:

WARNING: NO STACK SEGMENT

LINK Processing— LINK creates an executable file by concatenating a


program’s code and data segments according to the instructions in the
ori gin al source files. These concatenated segments form an executable
image that is copied directly into memory when you run the program.
The order in which LINK copies segments to the executable file defines

the order in which the executable file is loaded into memory.

You can tell LINK how to link a program’s segments using directives that
define group associations, classes, and align and combine types. These
directives define the order and relative starting addresses of all segments
in a program. These directives, which are defined in your object modules,
work in addition to any LINK switches you provide on the LINK
command line.

Aligning Segments —LINK uses a segment’s align type to set the starting
address for the segment. The align types are byte, word, paragraph, and
page,which represent address boundaries that are multiples of 1, 2, 16,

and 256 respectively. The default align type is paragraph.

When LINK encounters a segment, it checks the align type before


copying the segment to the executable file. If the align type is word,
paragraph, or page, LINK checks the executable image to see if the last

byte copied ends at an appropriate boundary. If it does not, LINK pads


the image with extra NUL bytes.
LINK computes a starting address for each segment in a program. The
starting address is based on a segment’s align type and on the size of the
segments already copied to the executable file. The address consists of an
offset and a frame number, which specifies the address of the first

paragraph in memory that contains one or more bytes of the segment.

Programming Tools 8-57


A frame number is always a multiple of 16 (a paragraph address), and the
offset is the number of bytes from the start of the paragraph to the first

byte in the segment. For byte and word align types, the offset may be
nonzero; for paragraph and page align types, the offset is always zero. The
frame number of a segment is the first five hexadecimal digits of the start
address specified for the segments.

LINK copies segments to the executable file in the same order that it

encounters them in the object files. LINK maintains this order


throughout the program unless it encounters two or more segments with

the same class name. Segments with identical class names belong to the
same class type and are ordered contiguously.

Combining Segments — LINK uses combine types to determine whether or


not to combine two or more segments with the same name. Combine
types are public, stack, common, memory, at, and private.

LINK automatically combines public combine types with any other


segments that have the same name and same class. When combining
segments, LINK makes sure that the segments are contiguous and that all

addresses in the segments can be accessed using an offset from the same
frame address. The result is the same as if the segments were defined as a
whole in the source file.

LINK preserves each segment’s align type. Even though the segments are
combined into one large segment, the code and data in the segments
retain their original align type. If the combined segments exceed 64KB,
LINK displays an error message.

LINK out the same combine operations for stack combine types as
carries
for public segments. The only difference for stack combine types is that
LINK copies an initial stack-pointer value to the executable file. This
stack-pointer value is the offset to the end of the first stack segment (or
combined stack segment) that LINK encounters.

If you use the stack type for stack segments, you do not need to give
instructions to load the segment into the SS register.

8-58 Programming Tools


LINK combines common combine types automatically with any other
segments with the same name and same class. When combining common
segments, LINK places the start of each segment at the same address,
creating a series of overlapping segments. The result is a single segment no
larger than the largest of the combined segments.

LINK treats segments with memory combine types exactly like segments
with public combine types. This combine type is available for
compatibility with linkers that support a separate combine type for
memory segments.

A segment has a private combine type only if no explicit combine type is

defined for it in the source file. LINK does not combine private segments.

Processing Groups —Groups permit noncontiguous segments that do not


belong to the same class to be addressable relative to the same frame
address. When LINK encounters a group, it adjusts all memory references
to items in the group so that they are relative to the same frame address.

Segments in a group need not be contiguous, belong to the same class, or


have the same combine type. The only requirement is that all segments in
a group fit within 64KB of memory. LINK may encounter a fixup-
overflow error if all segments in a group do not fit within 64KB of
memory.

Groups do not affect the order in which segments are loaded. For
segments to be contiguous, you must use class names and enter object
files in the correct order. LINK may even place segments that do not
belong to a group in the same 64KB of memory.

LINK Fixups—Once LINK knows the starting address of each segment


in a program and establishes all segment combinations and groups, it can
fix up any unresolved references to labels and variables. To fix up
unresolved references, LINK computes an appropriate offset and segment
address and replaces the temporary values (generated by the assembler)
with the new values.

LINK processes fixups for four different references: short, near self-relative,
near segment-relative, and long.

Programming Tools 8-59


The size of the value to be computed for the fixup depends on the type of
reference. If LINK discovers an error in the anticipated size of a reference,
it displays a fixup-overflow message. This type of error can occur if a

program attempts to reach an instruction in a segment that has a


different frame address or if the segments in a group do not fit within a
single 64KB block of memory.

A short reference occurs in JMP instructions that attempt to pass control


to labeled instructions in the same segment or group. The target

instruction must be no more than 128 bytes from the point of reference.
LINK computes a signed, 8-bit number for the JMP instruction and
displays an error message if the target instruction belongs to a different
segment or group (has a different frame address) or if the target is more
than 128 bytes from the point of reference.

A near self-relative reference occurs in instructions that access data


relative to the same segment or group. LINK computes a 16-bit offset for

this reference and displays an error message if the data are not in the
same segment or group.

A near segment-relative reference occurs in instructions that attempt to


access data in a specified segment or group or data that is relative to a

specified segment register. LINK computes a 16-bit offset for this reference
and displays an error message if either of the following conditions exists:

• The offset of the target within the specified frame is greater than
64KB or less than 0.

• The beginning of the frame of the target is not addressable.

A long reference occurs in CALL instructions that attempt to access an


instruction in another segment or group. LINK computes a 16-bit frame
address and a 16-bit offset for this reference and displays an error message
if either of the following conditions exists:

• The computed offset is greater than 64KB or less than 0.

• The beginning of the frame of the target is not addressable.

For a complete description of the LINK process, see the Microsoft Macro
Assembler Reference Manual.

8-60 Programming Tools


Examples
When you type LINK only on the command line, you can respond to the
prompts as follows:

Line prompt Your response

Object Modules [.OBJ] PGM1 TEXT TABLE +


and press Enter
Ob j ect Modules [.OBJ]: PGM2 TABLE2
and press Enter
Run File [PGM1.EXE] PGM3 and press Enter
List File [NUL.MAP] : PGM3 /MAP and press Enter
Libraries [.LIB] LIB2 and press Enter
When you enter LINK and all its parameters on one line, you might type:

LINK TEXT+TABLE/P/M, , PGMLIST, COBLIB LIB .

This command line causes LINK to load the object modules, TEXTOBJ
and TABLE.OBJ. LINK then pauses as a result of the /P switch. When
you press any key, the object modules link and the /MAP switch
produces a global symbol map. The Run file defaults to TEXTEXE,
PGMLISTMAP becomes the name of the List file, and LINK searches
the library file COBLIB.LIB.

To use a response file with the LINK command, you must first create and
save the file to disk. Your response file may look like this:

TEXT TABLE PARAM


/PAUSE/MAP
PGMLIST
COBLIB.LIB
This response file tells LINK to load the three object modules named
TEXT, TABLE, and PARAM. LINK pauses before producing a global
symbol map to permit you to swap disks. When you press any key, the
output filenames become TEXT.EXE and PMGLIST.MAE Then LINK
searches the library file COBLIB.LIB and uses the default settings for the
switches.

Programming Tools 8-61


This example shows you the type of information that appears on your
screen during a LINK session. In response to the MS-DOS prompt, type
LINK.

Enter your responses when you see these line prompts:

Line prompt Your response

Ob J ect Modules [ . OB J] : 10 SYSINIT


*

Run File [10. EXE]: Enter


List File [NUL.MAP] : 10 /MAP
Libraries [.LIB]: Enter

By specifying /MAR you get both an alphabetical listing and a


chronological listing of global symbols.

Once LINK locates all libraries, it displays a map of segments in order of


appearance in the load module. The list might look like this:

Start Stop Length Name


00000H 009ECH 09EDH CODE
009F0H 01166H 0777H SYSINITSEG
The information in the Start and Stop columns shows the 20-bit hex
address of each segment relative to location zero. Location zero is the
beginning of the load module.

Because you used the /MAP switch, LINK displays the global symbols by
name and value. For example:

ADDRESS PUBLICS BY NAME


009F 0012
:
BUFFERS
009F:0005 CURRENT DOS LOCATION
009F 0011
:
DEFAULT DRIVE
009F 000B
:
DEVICE LIST
009F.-0013 FILES
009F:0009 FINAL DOS LOCATION
009F:000F MEMORY SIZE
009F 0000
:
SYSINIT

8-62 Programming Tools


ADDRESS PUBLICS BY VALUE
009F:0000 SYSINIT
009F:0005 CURRENT DOS LOCATION
009F 0009 :
FINAL DOS LOCATION
009F:000B DEVICE LIST
009F 000F :
MEMORY SIZE
009F 0011 :
DEFAULT DRIVE
009F 0012 :
BUFFERS
009F 0013 :
FILES

You could modify this example in the following ways:

• You can redirect output to the printer by responding PRN to the List
File prompt.

• You can use the /LINE switch to produce a listing of all line numbers
for all modules. (Note that the /LINE switch may generate a large
volume of output.)

• You can press Enter in response to the Libraries prompt to perform


an automatic library search.

Programming Tools 8-63


Chapter 9
Code Page Switching
Introduction 9-2

Using Code Page Switching 9-4

Setting Up Your System for Code Page Switching 9-6

Switching Between Code Pages 9-8

Code Page Switching 9-1


Introduction
Code page switching lets your computer use various character sets. If
you live in the United States and use only the English character set, you
do not need to use this feature. If you live outside the United States or
work with other languages, you may want to use this feature to select
different character sets.

A character set consists of certain letters, numbers, and symbols that are
used for typing, displaying, and printing. Your computer comes with a
built-in character set called a code page. Code page switching provides
additional character sets that your computer can use.

Each code page, which is identified by a number, contains one character


set of 256 characters. The following code pages are available with
MS-DOS 3.3:

Code Page Country or


Number Language
437 United States (English)
850 Multilingual
860 Portuguese
863 Canada (French)
865 Nordic (Norwegian and Danish)

See Appendix D, Code Page Tables, for illustrations of the exact letters,

numbers, and symbols in each of these code pages.

Code page 850, which is new with MS-DOS 3.3, contains all the
characters for most European and North and South American
countries. This code page provides additional characters that may be
useful. The countries with languages that are supported by code page
850 include Australia, Belgium, Canada (English), Canada (French),
Denmark, Finland, France, Germany, Italy, Latin America,
Netherlands, Norway, Portugal, Spain, Sweden, Switzerland (French),
Switzerland (German), the United Kingdom, and the United States
(English).

9-2 Code Page Switching


The following table shows the old code pages and the new code pages
assigned to each country or language:

OH New
Country or Code Code
Language Page Page

Arabic countries 437


Australia 437 850
Belgium 437 850
Canada (English) 437 850
Canada (French) 863 850
Denmark 865 850
Finland 437 850
France 437 850
Germany 437 850
Hebrew 437
Italy 437 850
Latin America 437 850
Netherlands 437 850
Norway 865 850
Portugal 860 850
Spain 437 850
Sweden 437 850
Switzerland (French) 437 850
Switzerland (German) 437 850
United Kingdom 437 850
United States 437 850

Ifa file is created using a particular code page, it must be viewed in that
code page. Because multiple code pages now exist, you may need to
view existing files created with the old code page as well as new files
created with the new 850 code page. In this case, you need to use code
page switching.

Code Page Switching 9-3


Using Code Page Switching
To use code page switching, you must have an EGA monitor and a
printer that comes with the required code pages built-in or that allows
downloading of character sets from your computer.

Code page switching requires several MS-DOS commands and files and
isused by several commands. Your MS-DOS startup diskette includes
two code page information (CPI) files that contain data required to
prepare and select code pages:

• EGA.CPI contains code page information related to your EGA


monitor

• 4201. CPI contains code page information related to the IBM


Proprinter II Model 4201 and any printers
printer that emulate the

4201 printer, such as the Epson FX-286™ printer.

You use the following MS-DOS commands to prepare and change the
code pages:

CHCP Changes or displays the current code page. You must


install the NLSFUNC command before you use this
command.

NLSFUNC Installs support for code page switching. This


command uses the country information provided by
the specified file or by the COUNTRY. SYS file (or
any other country file you specify with the
COUNTRY configuration command).
KEYB keyboard layout and a code page for your
Specifies a
keyboard. See Appendix C, International Keyboard
Layouts, for the possible keyboard layouts.

SELECT Creates a system disk that configures your computer


for a specific country and keyboard layout. This
command creates an AUTOEXEC.BAT file with the
KEYB command and a CONFIG.SYS file with the
COUNTRY command.

9-4 Code Page Switching


COUNTRY Specifies country-dependent display parameters (such
as date and time formats) and activates the default or
new code page for the specified country. You enter this
command in your CONFIG.SYS file.

DEVICE = DISPLAYS YS
Installs the DISPLAY.SYS device driver, which sets the
hardware code page for your monitor. You enter this
command in your CONFIG.SYS file.

DEVICE=PRINTER.SYS
Installs the PRINTER. SYS device driver, which sets
the hardware code page for the specified printer. You
can enter one or more of these device drivers in your
CONFIG.SYS file.
MODE CODEPAGE PREPARE
Prepares one or more code pages for use with a specific
The device must be previously defined with
device. a
DEVICE command in your CONFIG.SYS file.
MODE CODEPAGE SELECT
Selects a prepared code page for a specific device. The
device and code page must be previously prepared
with the MODE CODEPAGE PREPARE command.
MODE CODEPAGE/STATUS
Displays the code pages currently prepared and
selected for a device. The device and code page must
be previously prepared with the MODE CODEPAGE
PREPARE command.
MODE CODEPAGE REFRESH
Reselects a code page that was deactivated because of a
hardware error. You may need to use this command to
restore a code page to a printer that was turned off by
mistake.

Code Page Switching 9-5


The following commands are affected by the setting of the code page:

GRAFTABL Provides for displaying graphics characters with


decimal values above 127 for a specific code page.
These characters can be displayed when your
computer is in graphics mode.

SORT Sorts data based on the active code page.

Setting Up Your System for Code Page Switching


To up your computer to use a character set other than the United
set

States characterset, you need to create a CONFIG.SYS file, and

optionally, an AUTOEXEC.BAT file. After you create these files, you


must restart MS-DOS to enable the new information.

In your CONFIG.SYS file, include the following commands:

COUNTRY Use this command to define your country code, code


page, and country file with country-specific
information.

The code page you specify with this command is the


default code page whenever you start the system with
this CONFIG.SYS file.
This command sets up country and code page
information for your system only. You must also install

this type of information for each device attached to


your computer.

To use the German language with code page 850, enter


the following command in your CONFIG.SYS file:
COUNTRY = 049, 850

DEVICE Use this command to set up code page information for


your console and printers. The device drivers specify
the device type, the hardware code page, and the
maximum number of code pages.

9-6 Code Page Switching


Ifyou have an EGA monitor, an Epson FX-286
printer, and an IBM Proprinter II Model 4201, your
DEVICE commands might look like this:

DEVICE=DISPLAY SYS C0N= (EGA, 437, 2)


.

DEVICE=PRINTER SYS PRN= ( 4201 ,437,1)


.

DEVICE=PRINTER SYS LPT2= (4201,437,2)


.

The commands you enter in an AUTOEXEC.BAT file are executed


automatically when you turn on or reset your computer. In your
AUTOEXEC.BAT file, you can include the following commands:

NLSFUNC Installs support for code page switching. Include this


command in your AUTOEXEC.BAT file to ensure
that code page switching is installed each time you
turn on or reset your computer:

NLSFUNC COUNTRY. SYS


KEYB Loads keyboard support and a code page for a specific
country or language.

To set up your keyboard for the German language


with code page 850, enter this command in your
AUTOEXEC.BAT file:
KEYB GR, 850
MODE CODEPAGE PREPARE
Prepares one or more code pages for use with the
device(s) you specified with a DEVICE command in
your CONFIG.SYS file.

The number of code pages you prepare for a device"


depends on the number of code pages you specified in
the DEVICE command.

Code Page Switching 9-7


If you an EGA monitor, an Epson FX-286
installed

printer,and an IBM Proprinter II Model 4201 in your


CONFIG.SYS file, you might prepare them for code
page switching with these commands:

MODE CON CP PREP=((850)EGA.CPI)


MODE PRN CP PREP=((850)4201.CPI)
MODE LPT2 CP PREP=( (850)4201.CPI)
Ifyou do not enter these commands in an AUTOEXEC.BAT file, you
must execute the necessary commands each time you want to perform
code page switching.

Switching Between Code Pages


Once you have installed code page switching for your system and
devices, you use two commands to switch between code pages: CHCP
and MODE.
CHCP Selects a code page at the system level. When you use
the COUNTRY command, MS-DOS automatically
assigns two code pages to your country and selects one
of them. To switch to the other code page assigned to
your country, use the CHCP command.
To activate code page 850 at the system level for all

installed devices, enter the following command:

CHCP 850
MODE CODEPAGE SELECT
Selects a code page for a specific device. You must have
prepared the device with the MODE CODEPAGE
PREPARE command.
To activate code page 850 for the CON device, enter
the following command:

MODE CON CP SEL = 850

9-8 Code Page Switching


MODE CODEPAGE REFRESH
Reselects a code page that was deactivated because of a
hardware error. You may need to use this command to
restore a code page to a printer that was turned off by
mistake. You must prepare the code page again and
then use this command.

To reselect your printer, enter the following command:

MODE PRN CP PREP=((437)4201.CPI)


MODE PRN CP REF

Code Page Switching 9-9


A
Appendix
Command Quick Reference
Introduction A-2

List of Commands A-2

Configuration Commands A- 16
Device drivers A- 17

Command Quick Reference A-1


Introduction
This appendix provides an alphabetical summary of all MS-DOS
commands. Each command includes a brief description of the
command’s function and its format. Use this list as a quick reminder,
not as a full reference for each command. See Chapters 4 through 8 for
complete descriptions.

The word Batch in parentheses identifies batch processing commands,


which are described in Chapter 7. DEBUG, EDLIN, EXE2BIN, and
LINK are programming tools described in Chapter 8. The other
commands are described in detail in Chapters 4 and 5.

The configuration commands are summarized in a separate section at


the end of this appendix. You can enter these commands only in a
CONFIG.SYS file, which is described in Chapter 6.

commands are those that reside on your system diskettes and


External
memory when called. Internal commands are already in
are loaded into
memory and do not show on your directory.

List of Commands
APPEND
External command to set a search path for data files. With the /X
switch, also sets a path for executable files.

First time:

[d: [path] APPEND [d: ]path[; [d: ]path . . .]


[d: [path] APPEND [/X] [/E]

If APPEND has already been loaded:

APPEND [d:]path[;[d:]path. . .]
APPEND [;]

ASSIGN
External command to assign a new letter to a drive specification.

[d:][path] ASSIGN [dl=d2...]

A-2 Command Quick Reference


ATTRIB
External command to set, display, or remove the read-only attribute or
archive bit for a file or group of files. Also available through MENU.

[d:] [path] ATTRIB [±R][±A] [d:][path] filename [/S]

BACKUP
External command to back up (copy) one or more files from one disk to
another in a special, condensed format.

[d: ] [path] BACKUP dl:[path][filename] d2:[/S][/A]


[/F][/M][/D: date][/T: time]
[/L [: [ d :] [path] filename ]

BREAK
Internal command to enable or disable the Ctrl C function.
BREAK [ON]
BREAK [OFF]

CALL (Batch)
Internal command used in batch processing to call one batch file from
another.

CALL [d:] [path] filename [ arguments ]

CHCP
Internal command to display or change the current code page (character
set).

CHCP [JIM]

CHDIR
Internal command to change or display the current directory.

CHDIR [ d:][path ]
CD [ d:][path ]

Command Quick Reference 3


CHKDSK
External command to check the directories, and file allocation
files,

tables on the specified disk and produce a disk and memory status
report. Also available through MENU.

[d:] [path] CHKDSK [d:] [path] filename [/F] [/V]

CLS
Internal command to clear the monitor screen.

CLS

COMMAND
External command to load a secondary command processor.

[d: [path] COMMAND [d:] [path] [CTTY-dev]


[/C command ] [/Ermirmn] [/P]

COMP
External command to compare the contents of one file or group of files
to another.

[d:] [path]C0MP [d:] [path] [ filename


[d: [path] [filename]

COPY
Internalcommand to copy one or more files to the same or another disk
and optionally rename or merge them.

COPY [d:] [path] filename [d:] [path] [filename]


[/A] [/B] [/V]
COPY [d:] [path] filename +
[[d:] [path] filename .] . .

[d:][path]filename[/k] [/B] [/V]


COPY [d: ] [path] filename +,

A-4 Command Quick Reference


CITY
Internal command to change the input/output device.

CTTY device

DATE
Internal command to set or display system date.

DATE [mm-dd-yy]
DATE [dd-mm-yy]
DATE [ yy-mm-dd

DEBUG
External utility for debugging machine language programs.

[d:] [path]DEBUG [[d:] [path] filename]

DEL
Internal command to delete files.

DEL [ d :
[path] filename

DIR
Internal command to list the files in a directory.

DIR [d:] [path] [filename] [/?] [/W]

DISKCOMP
External command to compare the contents of two diskettes. Also
available through MENU.
[d: [path ] DISKCOMP [dl: [d2:]][/l] [/8]

DISKCOPY
External command to copy whole diskettes. Also available through
MENU.

[d:] [path ] DISKCOPY [dl:[d2:]][/ 1]

Command Quick Reference A-5


ECHO (Batch)
Internal command used in batch processing to control the display of
batch file commands on the screen.

ECHO [ON]
ECHO [OFF]
ECHO [ message ]

EDLIN
External utility for creating and editing text files.

[d:] [path] EDLIN [d:][path] filename [/B]

ERASE
Internal command to erase files.

ERASE [d: ] [path] filename

EXE2BIN
External utility for converting .EXE files to .BIN files.

[d: ] [path]EXE2BIN [d:] [path'] filename


[d: ] [path] filename ]

EXIT
Internal command to exit the command processor and return to an
application program.

EXIT

FASTOPEN
External command to speed up access to frequently used files and
directories on a hard disk.

[d:] [path ] FASTOPEN d:[=nnn] ...

A-6 Command Quick Reference


FC
External command to compare files on your disk. Also available
through MENU.
[d:][path]FC [/A][/B][/C][/L][/N][/T][/W][/LB n]
[/n] [d:][path]filenamel
[ d ] [path] filename2
:

FDISK
External command to create one or more partitions on a hard disk,

[d:] [path] FDISK

FIND
External command (called a filter) to locate a specified text string within
one or more files.

[d:] [path] FIND [/C][/N][/V] "string "


[ [<d: ] [path'] filename . .
.]

FOR (Batch)
Internal command used in batch processing to repeat certain batch
operations for each item on a list. The format means FOR each item IN
a set of items DO the specified command.
FOR %%c IN set DO command

FORMAT
External command to format disks to accept MS-DOS files. Also
available through MENU.
[d: ] [path ] FORMAT [d: ] [/B] [/S] [/V] [/l] [/4]
[/8][/N:nn][/T:nn]

GOTO (Batch)
Internal command used in batch processing to jump to another labelled
line within the same batch file.

GOTO label

Command Quick Reference A-7


GRAFTABL
External command to load a graphics table into memory to enable
display of graphics characters in color/ graphics mode. Can include a
code page number to access an international character set.

[d: ] [path] GRAFTABL [iim] [/STATUS]

GRAPH24
External command to enable printing of CGA screen graphics on a
24-pin or laser printer.

[d:] [pa th]GRAPH24 [/R]

GRAPHICS
External command to enable printing of CGA screen graphics on the
specified printer.

[d: ][path] GRAPHICS [prin ter] [/R] [/B] [/P = port] [/LCD]

HDCACHE
External command to store the location and contents of requested
sectors of the hard disk in a reserved part of memory.

[d: [path] HDCACHE [Cr] [E ri]

HELP
External command to provide information onall MS-DOS commands

and utility programs. Also available through MENU.

[d: [path] HELP [ command . . ]

IF (Batch)
command used in batch processing to execute
Internal a second
command depending on whether a specified condition is true or false.

IF condition command

A-8 Command Quick Reference


JOIN
External command to connect a drive to a directory on another drive.
Omit all parameters to display all joins in effect.

[d:][pa£h] JOIN [dl: d2:\directory']


[d:] [path] JOIN d: /D

KEYB
External command to load a keyboard layout into memory.

[d: ][patii] KEYB [xx [ , [nnn ^ , []id:][path] filename]}]

LABEL
External command to create, change, or delete the volume label on a
disk.

[d: ] [path] LABEL [ d:][volumelabel ]

LINK
External utility for combining object code program modules.

LINK [filename [, filename . .


.] [/switch . .
.]]
LINK @ [d: ] [path~] filename

MENU
Epson menu utility for performing file utilities, disk utilities, mode
settings, and help.

[d:][pata]MENU

MKDIR
Internal command to make a new subdirectory on a disk.

MKDIR [d:]pa£h
MD [d:]path

Command Quick Reference A-9


MODE
External command to change printer, monitor, or serial port settings

and to prepare and control code page switching. Also available through

MENU.
Parallel printer mode:

[d:][paih]MODE LPTr[:][chars][,[spacirg][, [P]]]

Serial port mode:

[ d : ] [pa th] MODE COMn [ : ] baud [ , [pari ty]


[, [databits~\[,[stopbits'][, [P]]]]]

Redirecting parallel printer output:

[d: ] [path] MODE LPTr[ : ] =C0Mn[ : ]

Display modes:

[d: ] [path] MODE displaymodei, L] [,R] [,T]

Device code page modes:

[d: [pa th}M0DE device CODEPAGE PREPARE = ( (nnn)


]
[d: ] [path] filename )
[d: ] [path] MODE device CODEPAGE PREPARE =
({nnn{,nnn. . .)) [d:] ipath] filename)
[d: ] [pa td] MODE device CODEPAGE SELECT = nnn
[d:] [path] MODE device CODEPAGE REFRESH
[d: ] [path] MODE device CODEPAGE [/STATUS]

MORE
External command (called a filter) to display long data listings one
screen at a time.

[d:] [path] command j


[d: ] [pa id]MORE
MORE < [d: ] [path] filename

A-10 Command Quick Reference


NLSFUNC
External command to provide support for code page switching.

[d:] [path]NLSFUNC [[d:] [path] filename]

PATH
Internal command to set a search path for programs and batch files that
are not in the current directory.

PATH [ [d:]pathl[; [d:]path2 ]


PATH;

PAUSE (Batch)
Internal command used in batch processing to suspend execution and
show a prompt, so a necessary action can be performed. The specified
comment displays if ECHO is on.

PAUSE [ comment ]

PRINT
External command to print disk files on a printer while other processing
takes place. Also displays the contents of the print queue.

[d:] [path ] PRINT [/D: device] [/B ibuffersize]


[/U busy tick] [/Mimaxtick]
:

[/S timeslice] [/Q: queues ize]


[/T][/C][/P]
[[d:] [path] [filename ] . .
.]

PROMPT
Internal command to change or reset the MS-DOS command prompt.
Omit parameters to reset the prompt.

PROMPT [string]

Command Quick Reference A-ll


RECOVER
External command to recover a file or an entire disk containing bad
sectors.

[d: ] [path] RECOVER [d:] [path'] filename


[d: ] [path] RECOVER d:

REM (Batch)
Internal command used in batch processing to add remark lines to
batch files.

REM [ comment ]

RENAME
Internal command to rename files.

RENAME [ d ] [path] filenamel filename2


:

REN [d : ] [path] filenamel filename2

REPLACE
External command to selectively replace or add files including
subdirectories. Also available through MENU.

[d: ] [path] REPLACE [dl:] [path] filename


[d2:] [path] [/A] [/P] [/R] [/S]
[/W]

RESTORE
External command to restore files copied with BACKUP command.
Also available through MENU.

[d: ] [path] RESTORE dl:[d2:] [path] [filename]


[/M][/N][/P][/S] [/A: date]
[/B date] [/E time] [/L time]

A-12 Command Quick Reference


RMDIR
Internal command to remove (delete) empty directories from a disk.

RMDIR [d:]path
RD [ d:]path

SELECT
External command to format and install MS-DOS on a new disk with
the specified country information and keyboard layout.

[d: ] [pa th] SELECT [ dl:d2 [ path ] ] nnn xx

SET
Internal command to set or display environment string values in
memory.

SET [name = [parameter] ]

SETPRINT
Epson menu utility for setting printer operation parameters.

[d:] [path] SETPRINT

SHARE
External command to install file sharing and locking protection in
network situations.

[d:] [pa th] SHARE [/F: space] [/Lilocks]

SHIFT (Batch)
Internal command used in batch processing to enable more than 10
replaceable parameters within a batch file.

SHIFT

Command Quick Reference A>13


SORT
External command (called a filter) to alphabetically or numerically sort

text file contents.

[d:] [path] SORT [/R] [< filename[) filename] ] [/+a]

SUBST
External command to substitute a drive letter for a path name. Omit all

parameters to display the current substitutions.

[d:] [path] SUBST [dl: ld2:~]path ]


[d:] [path] SUBST d: /D

SYS
External command to transfer system files to the specified disk.

[d:] [path] SYS d:

TIME
Internal command to set or display system time.

TIME [hh:^ffl[:ss[.cc]]]

TREE
External command to display the complete subdirectory tree structure
of a disk.

[d:] [path] TREE [d:][/F]

TYPE
Internal command to display the contents of a file on your screen.

TYPE \_d:'\\_path'] filename

VER
Internal command to display the MS-DOS version number.

VER

A-14 Command Quick Reference


VERIFY
Internal command to turn on or off the verify function, which verifies
each disk write process.

VERIFY [ON]
VERIFY [OFF]

VOL
Internal command to display a disk volume label.

VOL [d:]

XCOPY
External command to selectively copy files and, optionally,
subdirectories.

[d:] [path] XCOPY [dl:] [path] filename


d2: [path] [filename] [/A] [/E]
[/M] [/P] [/S] [/V] [/W] [/D: date]

XTREE
Epson menu utility to enable file management through menus of
directory and file commands.

XTREE [d:]

XTREEINS
External utility to install XTREE for type of monitor.

XTREEINS

Command Quick Reference A-15


Configuration Commands
BREAK
Configuration command to enable or disable Ctrl Break or Ctrl C
function.

BREAK = ON
BREAK = OFF

BUFFERS
Configuration command to set the number of disk buffers allocated in
memory.

BUFFERS = nnn

COUNTRY
Configuration command to select display parameters that are country
dependent, such as the date and time format, currency symbols, and
decimal separator, and activate a code page.

COUNTRY = code[, [page] [, [d:] [path] filename]]

DEVICE
Configuration command to install the specified device driver during
system startup.

DEVICE = [d: ] [path] filename [parameters]

FCBS
Configuration command to specify the number of file control blocks
(FCBs) that can be open at one time.

FCBS = m,n

FILES
Configuration command to set the maximum number of files that can
be open at one time.

FILES = nnn

A-16 Command Quick Reference


LASTDRIVE
Configuration command to set the last valid drive letter that MS-DOS
will recognize.

LASTDRIVE = x

SHELL
Configuration command to specify the name and location of a
command processor.

SHELL = [d: [path] filename [/ switches ]

STACKS
Configuration command to set the number of available stack frames
and their size.

STACKS = m,n

Device drivers

ANSI.SYS
Device driver that provides screen and keyboard control.

DEVICE = [d:] [path] ANSI. SYS

DISPLAY.SYS
Device driver that supports code page switching for the console device
(CON).

DEVICE = [d:] [path] DISPLAY. SYS


CON [ : ] = ( type, [, [h vcp] [ , 22] ]

DEVICE = [d: ] [path] DISPLAY. SYS


C 0 N[ : = ( tjpe, [, [h*rcp][,(fl,in)]])

Command Quick Reference A-17


DRIVER.SYS
Device driver that assigns new logical names to diskette drives.

DEVICE = [d: ] [path] DRIVER. SYS /D :ddd


[/T ttt] [/S ss] [/H hh] [/C] [/N] [/F f ]
: :

EEMM.EXE
Device driver that supports expanded memory on 80386'based
computers.

DEVICE = [d: ] [path] EEMM.EXE

PRINTER.SYS
Device driver that supports code page switching for parallel printers.

DEVICE = [d:] [path] PRINTER. SYS


LPTx( ) = type [ , hwcp ] [ , fl]
: ]

VDISK.SYS
Device driver that supports virtual (RAM) disks.

DEVICE = [d: ] [path] VDISK.SYS [cap] [sec]


[dir][/A][/E]

A'18 Command Quick Reference


Appendix B
Error Messages
Introduction B-2

Error Message Listing B-3

Error Messages B-l


Introduction
There are three types of messages that you can see on your screen:

• MS-DOS utility messages

• MS-DOS device error messages

• Application program messages.

MS-DOS utility and device error messages are listed in this appendix.
For information about error messages generated by other software, see
the documentation for that application program.

If a disk or device error occurs at any time during a command or


program, MS-DOS displays an error message, and includes this prompt:

Abort, Retry, Fail?_

MS-DOS waits for you to enter one of the following responses:

A Abort. End the program requesting the disk read or write.

R Retry. Repeat the operation. You should use this response when
you have corrected the error (for example, with Not ready or
Write protect errors).

F Fail. This causes the current MS-DOS system operation to end


and the application to continue. The command
(fail) line may
redisplay so you can retype it.

Note
For a few diskette device errors, the Ignore option may appear. This
prompt instead reads Abort, Retry, Ignore, Fail? Ignore tells
the computer to ignore the bad sector and pretend the error did not
occur. This may result in lost data.

B-2 Error Messages


Error Message Listing
This section describes MS-DOS messages, their causes, and how to
correct them.

Access denied
You tried to replace a write-protected, read-only, or locked file.

Active Code Page not available from con device


The code page that the system is currently using is not supported
on the console (screen) you are using.

All files canceled by operator


This message displays when you /T switch
specify the (to delete all

files in the print queue) with the PRINT command.

All specified file(s) are contiguous


All the files you named are written contiguously (sequentially) on
the diskette.

Allocation error, size adjusted


The size of the file indicated in the directory was not consistent
with the amount of data actually allocated to the file. The file was
truncated to match the amount of data allocated.

ALT Copy MUST be to Another Disk


When entering a destination for the Alt Copy command, you must
specify a disk other than the currently logged disk. If you wish to
copy files to the same disk, use the Ctrl Copy command.

APPEND already installed


You have already used the APPEND command once since turning
on your computer. Now you are trying to use either the /X or /E
switch with this command. These switches are only valid the first
time you execute the APPEND command.

To change the append switch, reboot your computer. Then type the
APPEND command with the switch you want to use. Otherwise,
use the APPEND command without these switches.

Error Messages B3
APPEND/ASSIGN Conflict
You cannot use the APPEND command on an assigned drive.
Cancel the drive assignment before using the APPEND command
with this drive again.

Attempt to access data outside of segment


bounds, possibly bad object module
LINK cannot access an Object file.

Attempted write-protect violation


Format failure
The you want to copy or format is write-protected. If it’s
diskette
safe to copy or format the
diskette, remove the write-protect tab (or
move the switch) and continue.

Bad call format reading drive d :

The length of the request header passed to the device driver was
incorrect.

Bad call format writing drive d:


The length of the request header passed to the device driver was
incorrect.

Bad command error reading drive d:


A device driver issued an incorrect command to the device specified
in the error message.

Bad command error writing drive d:


A device driver issued an incorrect command to the device specified
in the error message.

Bad command or file name


MS-DOS cannot find the file or command you entered. You either
mistyped the filename or command, or the file or command does
not exist on the diskette or in the command path.

Bad numeric parameter


LINK expects a numeric value and you entered characters other
than digits.

B-4 Error Messages


Bad or missing Command Interpreter
MS-DOS cannot find the COMMAND.COM file on the disk;

either the file is missing from the root directory, or the file is invalid.
Either restart the system or copy the COMMAND.COM file from
your backup MS-DOS startup diskette onto the disk used to start
MS-DOS. You will also receive this message if COMMAND.COM
has been moved from the directory it was originally in when you
started MS-DOS.
Bad or missing filename
You specified an invalid filename for the DEVICE parameter in the
CONFIG.SYS file. Check the accuracy of the DEVICE statement
in the CONFIG.SYS file.

Bad or Missing Keyboard definition file


MS-DOS cannot find the keyboard file that you specified with the
KEYB command. Check to see that the file you specified exists on
the disk. Also check to see if the path includes the directory in
which this file resides. Then, retype the command. If you get this
message again, the KEYBQARD.SYS or KEYB.COM file may be
corrupted.

Bad Partition Table


There is no MS-DOS partition on your hard disk. Run FDISK to
create a valid partition.

Bad unit error reading drive d:


Invalid subunit numbers were passed to the device driver.

Bad unit error writing drive d:


Invalid subunit numbers were passed to the device driver.

Batch file is missing


Execution of a batch file ended because you changed diskettes.

BF (Bad flag) error


You attempted to alter a flag, but the characters you typed were not
one of the acceptable pairs of flag values. See the Register command
for the list of acceptable flag entries.

Error Messages B-5


BP (Too many breakpoints) error
You specified more than ten breakpoints as parameters to the Go
command. Enter the Go command with ten or fewer breakpoints.

BR (Bad register) error


You specified an invalid register name in the R (Register) command.
Reenter the command using a current register name.

Cannot CHDIR to directory-


tree past this point not processed
CHKDSK is unable to proceed to the specified directory. All
subdirectories underneath this directory are not verified.

Cannot CHDIR to root


CHKDSK checking the tree structure of the directory and is
is

unable to return to the root directory. CHKDSK is not able to


continue checking the remaining subdirectories. Try to restart
MS-DOS. If this error persists, the disk is unusable.

Cannot CHKDSK a Network drive


You cannot check drives that are redirected over the network.

Cannot CHKDSK a SUBSTed or ASSIGNed drive


You cannot check drives that have been substituted or assigned.

Cannot COPY from (or to) a reserved device


You cannot copy files from or to this device.

Cannot create a zero cylinder partition


You are trying to create a partition with a size of 0 cylinders. You
must allocate a minimum of 1 cylinder to any partition you create.

Cannot create extended DOS partition while


logical drives exist
Your disk has one or more logical drives assigned to it. You need to
delete them using FDISK before you can create an extended DOS
partition.

B-6 Error Messages


Cannot create extended DOS partition without
primary DOS partition on disk 1
You are trying to create an extended DOS partition, but your first
hard disk does not contain a primary DOS partition. You need to
create the primary DOS partition on your first hard disk. Then, if
you have more room on that disk, or if you have a second hard
disk, you can create an extended DOS partition.

Cannot create Subdirectory backup on drive d:


The disk may be write-protected, full, or the backup subdirectory
may already exist and be read-only. Use another disk as a target
disk.

Cannot DISKCOMP to or from an ASSIGNed or


SUBSTed drive
You cannot compare diskettes on drives that have been substituted
or assigned.

Cannot DISKCOMP to or from a network drive


You cannot compare diskettes on drives that are redirected over the
network.

Cannot DISKCOPY to or from an ASSIGNed or


SUBSTed drive
You cannot copy diskettes on drives that have been substituted or
assigned.

Cannot DISKCOPY to or from a network drive


You cannot copy diskettes on drives that are redirected over the
network.

Cannot do binary reads from a device


You cannot do a binary copy when copying from a device. Remove
the /B switch or specify an ASCII copy with the /A switch.

Cannot edit .BAK file-rename file


You attempted to edit a file with the filename extension .BAK.
Either rename the file or copy the .BAK file and give it a different
extension.

Error Messages B-7


Cannot FORMAT a Network drive
You cannot format diskettes on drives that are redirected over the

network.

Cannot format an ASSIGNed or SUBSTed drive


You cannot format diskettes on drives that have been substituted or
assigned.

Cannot FORMAT nonremovable drive d


You are trying to back up an unformatted hard disk using
files to
the /F switch. You must use a hard disk that is already formatted.

Cannot JOIN a network drive


You attempted to JOIN a network drive. You cannot use a network

drive for the JOIN command. Retype the command line.

Cannot LABEL a Network drive


You cannot label a drive that is shared by a network server.

Cannot LABEL a SUBSTed or ASSIGNed drive


You cannot label a drive if it has been substituted with the SUBST
command or assigned with the ASSIGN command. Check the
command line to be sure you specified a valid label.

Cannot open temporary file


LINK is unable to create the file VM.TMP because the disk
directory is full. Insert a new disk. Do not remove the disk that will

receive the LIST.MAP file.

Cannot perform a cyclic copy


When you select the /S switch, you cannot specify a target that is a

subdirectory of the source.

Cannot recover . . entry


The parent directory (..) is defective.

Cannot recover . entry, processing continued


The current directory (.) is defective.

Cannot RECOVER a Network drive


You cannot recover files on drives that are redirected over the
network.

B-8 Error Messages


Cannot SUBST a Network drive
You cannot substitute drives that are redirected over the network.

Cannot SYS to a Network drive


You cannot transfer system files to drives that are redirected over
the network.

Cannot use FASTOPEN for drive d:


FASTOPEN works only with local, fixed disks and cannot work
with more than four disks at a time.

Cannot use PRINT - Use NET PRINT


You must use the NET PRINT command to print files on printers
shared over the network.

Cannot XCOPY from a reserved device


The source specified is a device such as a printer or an
asynchronous communication port, or is NULL. Put the source
data into a file and reenter XCOPY, using the file as the source.

Cannot XCOPY to a reserved device


,

The target specified is a device such as a printer or an asynchronous


communication port, or is NULL. Select a proper target and reenter
XCOPY.
Can't Delete Root Directory
It’s impossible to delete the root directory; this is a permanent part
of every MS-DOS disk. Press any key to continue.

Can't Rename Root Directory


Because the root directory ispermanently designated by a backslash
( \) in MS-DOS, you can’t rename it. If this message appears, just
press any key to continue.

CHDIR . . failed, trying alternate method


CHKDSK was not able to return to a parent directory (..) while
travelling the tree structure. It tries to return to that directory by
starting over at the root and traveling down.

Error Messages B-9


xxxxxxxx code page drive cannot be initialized
MS-DOS cannot start either the PRINTER.SYS or DISPLAY.SYS
program. Check the DEVICE command line in your
CONFIG.SYS file for an illegal parameter.
Code page not prepared
You have selected a code page that has not yet been prepared for
the system, or one that does not have the correct font to support
the current video mode. To prepare a code page for the system, use
the MODE PREPARE command. If you have installed the
DISPLAY.SYS installable device driver, be sure the DEVICE
command line in your CONFIG.SYS file allows for additional
subfonts.

Code page xxx not prepared for all devices


You have selected a code page that is not currently supported by a

device. First, be sure your device supports code page switching, and
that it is currently on line. If the device supports code page
switching, use the MODE PREPARE command to prepare the
device for the code page. Then retry the CHCP command.
Code page xxx not prepared for system
CHCP is unable to select a code page for the system. First, make
sure that NLSFUNC installed. If you have not used the DEVICE
is

command in your CONFIG.SYS file to install device drivers, retry


the CHCP command. If you are using installable device drivers with

.
your system, you must use the MODE PREPARE command to
prepare the specific code page for each device on your system.

Code page operation not supported on this device


You have specified an invalid device and code page combination.
Check that the device you specified exists and that you have listed a
valid code page. Also check to see that the code page is supported
on that device.

Code page requested xxx is not valid for given


keyboard code
The keyboard code and code page specified are not compatible.
Retype the KEYB command with compatible keyboard code and
code page.

B-10 Error Messages


Code page specified has not been designated
You have typed the KEYB command with a keyboard code the
system doesn’t recognize. You must first prepare the code page for
your console screen device. Use the MODE
PREPARE command to
prepare the code page for CON. Then retype the KEYB command.

Code page specified has not been prepared


You have typed the KEYB command with an option the system
doesn’t recognize. You must first prepare the associated code page
for your console screen device. Use the MODE PREPARE
command to prepare the associated code page for CON. Then
retype the KEYB command.
Code page specified is inconsistent with
invoked code page
You have selected a KEYB option that does not coincide with the
code page for your console screen device (CON). Use the MODE
SELECT command to change the code page for CON.
Code page specified is inconsistent with
selected code page
You have selected a KEYB option that does not coincide with the
code page for your console screen device (CON). Use the MODE
SELECT command to change the code page for CON.
Code pages cannot be prepared
You have either specified a duplicate code page for this device or
tried to prepare more than the total number of code pages
supported for this device. Check the DEVICE command line in
your CONFIG.SYS file to see how many prepared code pages are
allowed for this device. Use the /STATUS option of the MODE
command to find out which code pages are already prepared for this
device.

COM port does not exist


You specified a COM port for which there is no hardware.

Compare process ended


DISKCOMP displays this message if a fatal error occurred during
the comparison.

Error Messages B-ll


Content of destination lost before copy
A file to be used as a source file to the COPY command has been
overwritten prior to completion of the copy. For example,
COPY A + B B destroys B before it can be copied.

Current keyboard does not support this code page


The code page selected is not compatible with the current keyboard
code. Check the code page you have selected. If it is correct, change
the keyboard code with the KEYB command.

Data error reading drive d:


MS-DOS could not read the data from the disk properly. This is

often because of a defective disk. Try pressing R (for Retry) several


times, or press A (for Abort) to end the program. (You should make
a new copy of the disk; if it is defective, you may lose information.)

xxxxxxxx device driver cannot be initialized


You are trying to install a device driver by using a DEVICE
command line in your CONFIG.SYS file, but the syntax on the
command line is incorrect.

Device Error during Prepare


MS-DOS found an error with the specified devicewhen preparing
that device for code page switching. The problem may be caused by
a device that does not support code pages, a device not properly
prepared for code page switching, a device that cannot support
more code pages than those already prepared, or a device with a
bad or irregular font file. Check the DEVICE command line in
your CONFIG.SYS file. Make sure that the command syntax and
limits for subfonts and additional code pages are all correct. Also
check to see if your device supports code page switching.

B-12 Error Messages


Device Error during Select
MS-DOS found an error with the specified device. The problem
may be caused by a device that does not support code pages, a
device not properly prepared for code page switching, a device that
cannot support more code pages than those already prepared, or a
device with a bad or irregular font file. Check the DEVICE
command line in your CONFIG.SYS file. Make sure that the
command syntax and limits for subfonts and additional code pages
are all correct. Also check to see if your device supports code page
switching.

Device Error during Status


MS-DOS found an error when checking the device status. The
problem may be caused by a device that does not support code
pages, a device not properly prepared for code page switching, a
device that cannot support more code pages than those already
prepared, or a device with a bad or irregular font file. Check the

DEVICE command line in your CONFIG.SYS file. Make sure that


the command syntax and limits for subfonts and additional code
pages are all correct. Also check to see if your device supports code
page switching.

Device Error during write of font file to device


MS-DOS found an error when it tried to write the font file to the
specified device. The problem may be caused by a device that does
not support code pages, a device not properly prepared for code
page switching, a device that cannot support more code pages than
those already prepared, or a device with a bad or irregular font file.

Check the DEVICE command line in your CONFIG.SYS file.

Make sure that the command syntax and limits for subfonts and
additional code pages are all correct. Also check to see if your
device supports code page switching.

Error Messages B-13


Device or code page missing from font file
MS-DOS did not find a definition of the indicated code page for
this device in the font file. Use the MODE command to specify
another code page for this device. Also check to see that the font
file supports the code page you want to use. This error also may
cause specified code pages to be undefined. Use the MODE
command to prepare and refresh lost code pages.

Device ddd not prepared


No code page has been prepared for this device.
DEVICE support Not Present
The disk drive does not support MS-DOS 3.3 device control.

DF (Double flag) error


You typed two values for one flag. You may specify a flag value only
once per RF command.

Directory Count Overflow


TREE can scan up to 3,000 subdirectories on a disk. If more than
this number are present, this error message appears.

Directory Full
The directory you’re working with has reached the logical limit of
the number of files it can contain. You must delete some files before
adding more.

Directory is joined
CHKDSK cannot process directories that are joined. Use the JOIN
/D command to unjoin the directories, then run CHKDSK again.
Directory is totally empty, no . or .

The specified directory does not contain references to a current or


parent directory. Delete the specified directory and recreate it.

Directory not empty


You cannot delete or join a directory if it contains files or a
subdirectory. For XTREE and RMDIR, delete the files and
subdirectories first, then the directory. For JOIN, delete the files and
subdirectories, or create a different directory.

B-I4 Error Messages


Disk Drive Error: Abort, Ignore, Retry?
Various disk drive problems can generate this message, such as a
physically damaged or incorrectly inserted disk. The most likely

possibility is that no disk is in the drive.

Check your drive and disk to make sure they are in order; then

press R to retry. If this fails, press A to abort the program. Then


XTREE and
restart retry the operation. If the problem continues,
you probably have a defective disk.

Disk error reading drive d:


MS-DOS could not read the data from the disk properly. This is

often caused by a defective disk. Try pressing R (for Retry) several


times, or press A (for Abort) to end the program. (You should make
a new copy of the disk; if it is defective, you may lose information.)

Disk error writing drive d:


MS-DOS could not write the data to the disk properly. This is often
caused by a defective disk. Try pressing R (for Retry) several times,
or press A (for Abort) to end the program. (You should make a new
copy of the disk; if it is defective, you may lose information.)

Disk error reading FAT n


One of your file allocation tables (n is 1 or 2) has a defective sector
in it. MS-DOS automatically uses the other file allocation table. It is

a good idea to copy all your files to another diskette.

Disk error writing FAT n


One of your file allocation tables (n is 1 or 2) has a defective sector
in it. MS-DOS automatically uses the other file allocation table. It is

a good idea to copy all your files onto another diskette.

Disk Full
Discontinue adding files, or direct the files to another disk.

Disk full. Edits lost


EDLIN could not save your file due to lack of disk space.

Error Messages B-15


Disk full-write not completed
You gave the End command, but the diskette did not contain
enough free space for the file. EDLIN aborted the End command
and returned you to the operating system. Part of the file may have
been written to diskette. Only a portion (if any) of the file has been
saved. You should probably delete that portion of the file and
restart the editing session. The file will not be available after this
error. Always be sure that the diskette has sufficient free space for
the file to be written to diskette before you begin your editing
session.

Disk Has Been Changed


XTREE reads your disk’s file structure when you log on and retains
it in memory. If you change a disk without logging on and attempt
an operation on that disk, XTREE gets caught in the difference
between the record in memory and the actual structure on the disk.
Log onto each disk so that XTREE can read the correct file
structure; then retry the operation.

You may you return from an Alt eXecute


see this message if

command and XTREE commands. If,


attempt to execute certain
during the Alt eXecute, you added, removed, or changed any files
or directories on the logged disk, XTREE may have problems. Log
onto this disk again to avoid further warnings.

Disk unsuitable for system disk


FORMAT detects a bad track on the diskette where system files
should reside. You should only store data (and not system tracks)
on this diskette.

Diskette bad or incompatible


The source disk is not formatted, or incorrectly formatted. You
cannot copy it.

Do not specify filename^ s)


Command format: DISKCOMP d d:[/l][/8]
You specified an incorrect switch or gave a filename in addition to a
drive name.

B-16 Error Messages


Divide overflow
The divide overflow flag has been set; this is usually caused by
division by zero.

. Does not exist


. . Does not exist
These information messages from CHKDSK indicate that either the
current or parent directory entry is invalid.

Drive d already deleted


You tried to delete drive d., but it has already been deleted.

Drive d: not ready


Your diskette drive isn’t ready to operate. Either the disk in the
drive is write-protected or it is not inserted correctly. Check these
two possibilities; then select Retry or Abort and press Enter.

Drive d: not ready


Strike any key when ready
The specified drive can’t be read because it isn’t ready. To correct
this, just check that the disk is fully inserted and the drive latch is

closed. Press any key to continue.

Drive letter must be specified


You did not specify the letter of the drive you want to format.

Drive types or diskette types not compatible


You must have the same size and type of disks to run DISKCOMP
or the same type of drives to run DISKCOPY. For example, you
cannot use DISKCOPY to copy from a 5 '/4-inch diskette to a 3 Vi-
inch diskette or use DISKCOMP to compare a high-density diskette
with a low-density diskette. Use COMP or FC to compare files on
differently formatted diskettes. To copy the file on a disk, you can
use COPY or XCOPY.
Duplicate filename
You tried torename a file to a filename that already exists, or the
file to be renamed does not exist.

Error Messages B-17


Entry error
The last command you typed contained a syntax error. Retype the
command with the correct syntax and press Enter.
Entry has a bad attribute
Entry has a bad link
Entry has a bad size
This message may be preceded by one or two periods that indicate
which subdirectory is invalid. If you have specified the /F switch,
CHKDSK attempts to correct the error.
Error: dup record too complex
A DUP record in an assembly language module is too complex.
Simplify the DUP record in your assembly language program.
Error during read of Font file
MS-DOS found an error when it tried to read the font file for the
specified code page.

Error: fixup offset exceeds field width


An assembly language instruction refers to an address with a short
instruction instead of a long instruction. Edit your assembly
language source and reassemble.

Error in country command


You used incorrect syntax for the COUNTRY command in your
CONFIG.SYS file.

Error in .EXE file


The .EXE file you asked MS-DOS to load has an invalid internal
format.

Error Occurred during Formatting


A variety of conditions can produce this error. Consult your dealer.
Error opening log file
MS-DOS cannot open the BACKUP log file. Check the drive and
path specified with this command. Remember that the log file
cannot be located on the target drive. If you did not specify a
filename for the log, the error occurred when MS-DOS tried to
open and create BACKUELOG on the source disk.

B-18 Error Messages


Error reading/writing partition table
FORMAT could not read or write the partition table. Run FDISK
to check the partition table, then try formatting again.

Error trying to open backup log file


Continuing without making log entries.
You BACKUP /L switch, but BACKUP could not
specified the
create the BACKUP log file.

Error writing to device


You tried to send too much data to a device. MS-DOS was unable
to write the data to the specified device.

Errors found, F parameter not specified


Corrections will not be written to diskette
CHKDSK found errors on the diskette. You must specify the /F
switch you want CHKDSK to correct the errors finds on the
if it

diskette.

Errors on list device indicate that it may be


off-line. Please check it
Your printer is off line.

EXEC failure
MS-DOS either found an error when reading a command or the
FILES statement in the CONFIG.SYS file is set too low. Increase
the value and restart MS-DOS.

Extended DOS partition already exists


You can create only one extended DOS partition.
Failed to open HELP.TXT
HELP could not find the HELPTXT file. HELECOM and
HELETXT must be in the same directory, or APPEND must be set

to the directory that contains HELETXT.

Error Messages B-19


Failure to access code page font file
MS-DOS cannot open the font file for the specified code page.
Check to see that you typed the correct drive, filename, and
pathname for the code page information file you are using. Also
check the CONFIG.SYS file to see that the device driver for this
device has been properly installed. If the CONFIG.SYS file is

incorrect, correct it and restart MS-DOS before retyping the


MODE command.
Failure to access country. sys
MS-DOS cannot open the COUNTRY.SYS file. Check to see that
your path points to the directory in which COUNTRY.SYS resides.
Then retype the command.

Failure to access device: xxx


You are trying to specify a code page for a particular device, but
MS-DOS cannot access the device listed. Retype the command
using an existing device. Make sure you are typing the device name
correctly.

Failure to access keyboard. sys


MS-DOS cannot open the KEYBOARD.SYS file. Be sure
KEYBOARD.SYS exists on your source disk and you have entered
the correct pathname.

Fastopen already installed


FASTOPEN is already installed on the system.

FC: Cannot open filename - No such file or


directory
FC could not find the filename you specified. Check your directory
for the correct filename.

FC: Incompatible switches


You specified switches that are not compatible; for example, /B and
/L cannot be used together. Do not combine binary and ASCII
comparison switches.

FC: filename longer than filename


After reaching the end of one of the files in a binary file

comparison, the other file still has uncompared data.

B-20 Error Messages


FC: Out of memory
You do not have enough memory to perform the comparison.

FOB unavailable reading drive d:


An unusual error has occurred. This error usually requires an
experienced programmer to fix it. Press R (for Retry) or A (for

Abort).

FOB unavailable writing drive d:


An unusual error has occurred. This error usually requires an
experience^ programmer to fix Press R (for Retry) or A (for
it.

Abort).

File allocation table bad


The diskette may be defective. Run CHKDSK with /F to repair the
diskette.

File allocation table bad drive d:


The diskette in drive d. may be defective. Run CHKDSK to check

the diskette. If the error persists, assume the diskette is not usable
and reformat it.

File filename canceled by operator


MS-DOS displays this message when you specify the /T switch with
the PRINT command.

File cannot be converted


CS:IP does not meet either of the necessary criteria, or it meets the
.COM file criterion but has segment fixups. This message also
displays if the file is not a valid executable file.

File cannot be copied onto itself


You same filename (on the same COPY diskette)
specified the for

both the source and destination. For example: COPY A A.

Error Messages B -21


File creation error
You add a new filename or replace a file that already exists
tried to
in the directory, or there was not enough space for the file. If the file
already exists, it is a read-only file and cannot be replaced. This
error message may also occur if the root directory is full, out of files,

or if the filename is the same as a volume or directory, or is a


hidden (or system) file.

File is READ-ONLY
You cannot erase or write over a read-only file. Use the Al l RIB
command to change a file’s status to read/ write through its -R
option.

File not found


MS-DOS cannot find the file you specified. Check to see that the
path name is accurate and that the file exists in the directory you
specified.

File not in PRINT queue


The file that you specified was not in the print queue, so you

cannot remove it from the queue. Check to see that you entered
the filename correctly.

filename cancelled by operator


This message is printed on the printer when you specify the /T
switch to stop printing filename in the PRINT command.
filename is not on the current disk or path
Press any key to continue . . .

You tried to run DU or MENU from a disk that does not have the
individual commands on it, or PATH has not been used to set the
proper path to these commands.

filename is cross linked on cluster


Make a copy of the file you want to keep, and then delete both files

that are cross-linked.

Filename must be specified


You did not specify a filename when you started EDLIN.

B-22 Error Messages


FIND: Access denied
You cannot access the file. Make sure that the disk is not write-
protected, read-only, or locked.

FIND: File not found


The specified filename does not exist or MS-DOS cannot find it in
the specified path.

FIND: Invalid number of parameters


You omitted a string in the FIND command.

FIND Invalid Parameter


:

One of the switches you specified is wrong.

FIND: Read error in filename


An error occured when FIND tried to read the specified file.

FIND: Syntax error


You typed an invalid string in the FIND command, or did not
include the string, or did not format the command properly. An
invalid string is one that does not have quotes around it or contains
a line-feed or end-of-file character.

First cluster number is invalid,


Entry truncated
The file directory entry contains an invalid pointer to the data area.
If you specified the /F switch, the file is truncated to a zero-length
file.

FIRST diskette bad or incompatible


DISKCOMP cannot recognize the format on the source disk. Run
CHKDSK to identify the problem.
Fixups needed-base segment (hex:)
The source (.EXE) file contained information indicating that a load
segment is required for the file. Specify the absolute segment address
where you want to store the finished module.

Error Messages B-23


Font File contents invalid
MS-DOS cannot use the contents of the specified font file. Make
sure you are typing the name of the font file correctly. Retype the
command. If this message is displayed again, your font file may have
been altered or corrupted. Recopy this file from the backup
MS-DOS system disk and type the command again. This error may
also cause existing selected code pages to be undefined. Use the
MODE command to prepare these code pages again, and to refresh
them.

FOR cannot be nested


You cannot nest FOR statements within other FOR commands.
Format Cancelled-Controller RAM Diagnostic Error
The RAM controller on the disk has a problem. Consult your
dealer.

Format failure
MS-DOS could not format the diskette. This message always
displays in conjunction with an explanation as to why MS-DOS
could not format the diskette.

Format not supported on drive d:


You cannot use FORMAT to format disks in this drive. You may
have specified device parameters that your computer cannot
support.

General failure reading drive d:


An unusual error has occurred. This error usually requires an
experienced programmer to fix it. Press R (for Retry) or A (for
Abort).

General failure writing drive d:


An unusual error has occurred. This error usually requires an
experienced programmer to fix it. Press R (for Retry) or A (for
Abort).

Graphics characters already loaded


The GRAFTABL command displays this message if you have
already loaded the table of graphics characters into memory.

B-24 Error Messages


Hard disk drive not ready or not installed-
aborting. Press any key to exit the program
Either your system does not contain a hard disk or it is having
trouble recognizing it. If you have a hard disk and get this message,

consult your dealer.

Has invalid cluster, file truncated


The file directory entry contains an invalid pointer to the data area.

If you specified the /F switch, the file is truncated to a zero-length


file.

Illegal device name


The system does not recognize this device name.

Incompatible system size


The system files occupy more space on the source disk than is
available on the target disk. You cannot use SYS to transfer the
system files to this disk.

Incorrect APPEND Version


You are using an incompatible version of the APPEND command
with MS-DOS 3.3. Use only the version that comes with MS-DOS
3.3.

Incorrect DOS Version


Some MS-DOS utilities will not run on older versions of the
operating system, and many are written to run only on the exact

version of MS-DOS they were created for. You must use the correct

version of MS-DOS to run this command.

Incorrect DOS Version, use DOS 2.00 or later


Some MS-DOS utilities will run only on MS-DOS version 2.00 or

later versions.

Incorrect number of parameters


The command line contains too many or too few options. Retype
the command line.

Incorrect parameter
You specified an incorrect parameter.

Error Messages B-25


Infinite retry on parallel printer timeout
Your printer is probably off line or not ready. If the printer appears
to be ready, you may have to press the Ctrl-Alt-Del keys to reset
the computer.

Input file read error


A read error was encountered in the Object file. Use a valid object
module.

Insufficient disk space


The disk is full and does not contain enough room to perform the
specified operation.

Insufficient memory
There is not enough memory computer to perform the
in your
specified operation. Before retrying this operation, you must free
memory by deleting files. In EDLIN, you may be able to free
memory by entering a W (write) command followed by an A
(APPEND) command.

Insufficient memory for system transfer


Your memory configuration is insufficient to transfer the MS-DOS
system files with the FORMAT /S switch.
Insufficient room in root directory
Erase files in root and repeat CHKDSK
CHKDSK always recovers lost files into the root directory. In this
case, your root directory is full. Delete some files in your root
directory or move them to another disk or directory to make room
for the lost files.

Intermediate file error during pipe


The pipe operation uses temporary files on the disk that are deleted
automatically once the piping process is complete. An error has
occurred in one of these files. Make sure that there is enough room
on the disk for the temporary file and that the disk is not write-
protected, and try the command again.

Internal error
This message indicates an internal logic error in the FC utility. You
may have used wildcard characters when specifying the filename.

B-26 Error Messages


Internal stack overflow
System Halted
The system tried to use more stacks than were available. This
caused a series of hardware interrupts and halted the system.
Restart MS-DOS. Then edit your CONFIG.SYS file and allocate

more stack resources.

Invalid argument
You have specified an invalid argument. Check the correct syntax
of the command and try again.

Invalid baud rate specified


You have specified an incorrect baud rate. Valid choices are 110,
150, 300, 600, 1200, 2400, 4800, 9600, and 19200. You must specify

at least the first two digits of the baud rate.

Invalid characters in volume label


The volume label should contain only up to 1 1 alphanumeric
characters.

Invalid code page specified


You an invalid code page number. Retype the command
selected
with the correct code page.

Invalid country code


In your CONFIG.SYS file you have specified a country number
that is not in the table of files configured in this version of

MS-DOS. Country codes must be in the range 0-199.

Invalid country code or code page


MS-DOS found an invalid country code or code page number in
your CONFIG.SYS file. Correct the COUNTRY command line in
your CONFIG.SYS file.

Error Messages B-27


Invalid COMMAND.COM
Insert COMMAND.COM disk in default drive and
strike any key when ready
The application you have just run used up most of memory and
wrote over the COMMAND.COM file. MS-DOS needs to reload
COMMAND.COM, but cannot find the file on the diskette or the
file found is invalid. Insert a system diskette with
COMMAND.COM into the default drive. This version of
COMMAND.COM must be the same as the one with which you
started MS-DOS.

Invalid COMMAND.COM
Insert COMMAND.COM disk in drive d : and strike
any key when ready
The application you have just run used up most of memory and
wrote over the COMMAND.COM file. MS-DOS needs to reload
COMMAND.COM, but cannot find the file on the diskette or the
file found is invalid. Insert a system diskette with
COMMAND.COM into the specified drive This version of (d:).

COMMAND.COM must be the same as the one with which you


started MS-DOS.
Invalid current directory
Your disk is bad. Replace the disk or make another copy from your
backup MS-DOS startup disk.

Invalid date
You specified an invalid date in response to the DATE prompt.
Enter a valid date in the appropriate format.

Invalid Date/Time
You specified an invalid date with one of the BACKUP command
switches.

Invalid device
The device specified was not AUX, CON, LPT, NUL, or PRN.

B-28 Error Messages


Invalid device parameters from device driver
FORMAT displays this message when the number of hidden sectors
is not evenly divisible by the number of sectors per track (that is,
the partition does not start on a track boundary). This might
happen if you tried to format a hard disk that previously had been
formatted with MS-DOS 2.x without first running FDISK, or if you
have set the device driver parameters incorrectly. Check the
CONFIG.SYS file for incorrect DEVICE commands.
Invalid directory
The directory you specified either does not exist or is invalid. Check
to see that you entered the directory name correctly.

Invalid disk change reading drive d :

You changed the disk in a drive when you weren’t supposed to. Put
the disk back in the drive and press R (for Retry).

Invalid disk change writing drive d:


You changed the disk in a drive when you weren’t supposed to. Put
the disk back in the drive and press R (for Retry).

Invalid Disk Drive


The drive specified doesn’t exist. Specify a valid drive letter.

Invalid drive in search path


An invalid drive descriptor was found in one of the paths specified

by PATH. Specify a valid diskette drive descriptor.

Invalid drive or filename


The specified drive or filename is invalid. Specify a valid drive or a

valid filename.

Invalid drive specification


The specified drive descriptor is invalid. Specify a valid drive.

Invalid Entry
The characters you input in response to a prompt are not

acceptable. XTREE’s input protection feature automatically rejects


numbers or symbols where letters are required, such as extra periods
in filenames. Check your input and retry the operation.

Error Messages B-29


Invalid environment size specified
You set the environment size with an incorrect number of bytes.
The number must be between 160 and 32768.

Invalid filename or file not found


You entered a wildcard character in the filename or extension.
MS-DOS does not allow wildcard characters with the TYPE
command.

Invalid keyboard code specified


You selected an invalid keyboard code with the KEYB command.
Retype the command with the correct keyboard code.

Invalid language specified


You typed an invalid keyboard code with the KEYB command.
Retype the command using a valid keyboard code.

Invalid number of parameters


Either you did not specify an option or string, or you specified the
wrong number of options in the command line.

Invalid object module


An object module is incorrectly formed or incomplete (as when
assembly is stopped in the middle). Use a valid object module.

Invalid operation: R/0 file


The file you specified is read only; you cannot alter it.

Invalid parameter(s)
One of the specified parameters is invalid. Correct the command
line.

Invalid path
You specified an incorrect path name. Retype the command line.

Invalid path, not directory or directory not


empty
One of the names specified in a path is not a directory, or the
specified directory contains files or subdirectories. The directory is

not removed.

B-30 Error Messages


Invalid path (or file not found)
The file specification is incorrect. Enter the command with a correct
path and filename.

Invalid path or parameter


You specified a file or directory that does not exist. Enter a valid

pathname or filename with the APPEND command.

Invalid signature in COUNTRY. SYS file


SELECT reads the COUNTRY.SYS file to verify the country code
and quits if it cannot find a proper file header or a specific country
code.

Invalid signature in KEYBOARD. SYS file


SELECT reads the KEYBOARD.SYS file to verify the keyboard
code and quits if it cannot find the proper file header or a specific

keyboard code.

Invalid STACK parameter


The syntax of the STACK command in your CONFIG.SYS file

includes an invalid parameter. Correct the syntax of the


configuration command.

Invalid sub-directory entry


The subdirectory that you specified either does not exist or is
invalid. Check to see that you entered the subdirectory name
correctly.

Invalid syntax
You used the wrong syntax when typing a command. See Chapter 4
for the correct syntax of an MS-DOS command.

Invalid syntax on DISPLAY. SYS code page driver


You used the wrong syntax when you typed the DEVICE
command in your CONFIG.SYS file to load DISPLAY.SYS.

Invalid syntax on PRINTER. SYS code page driver


You used the wrong syntax when you typed the DEVICE
command in your CONFIG.SYS file to load PRINTER.SYS. See
Chapter 6 for the correct syntax of DEVICE.

Error Messages B-31


Invalid syntax on PRINTER. SYS code page
switching device drivers
You used the wrong syntax when you typed the DEVICE
command in your CONFIG.SYS file to load PRINTER.SYS. See
Chapter 6 for the correct syntax of DEVICE.

Invalid time
You specified an invalid time. See the description of TIME in
Chapter 4 for the correct syntax.

Invalid Volume ID
FORMAT displays this message when you ask to format a hard
disk,but enter a volume label that does not match the volume label

on the disk. The format is aborted.

Invalid working directory


process cannot continue
The current directory of the disk being checked is damaged and
unusable.

x is not a choice, Please enter y-z


You tried to select an invalid option x. Select a valid option from
the range shown (y-z)-

KEYB has not been installed


No keyboard code has been installed for your system.
alternate If

you want to use a keyboard code other than the default U.S.
(QWERTY) keyboard, use the KEYB command to install it.

Label not found


There is a GOTO command to a nonexistent label in a batch file.

*** Last file not backed up ***


BACKUP could not back up the last file on the disk. This message
may occur if there is no more room on the target disk. It may also

occur if there was an error in the source file, or on the target disk.
You may have to back up this file separately to another disk.

B-32 Error Messages


Line too long
During a Replace command, the string given as the replacement
caused the line to expand beyond 253 characters. Divide the line

into two lines and retry the Replace command.

List output is not assigned to a device


When you first run PRINT, it asks you what device you want to
specify as a print spooler. This message appears if PRINT is set up

for a nonexistent device.

Lock violation reading drive d:


A program tried to access part of a file that another program was

using. Press A (for Abort), or wait awhile and press R (for Retry).

Lock violation writing drive d:


A program tried to access part of a file that another program was

using. Press A (for Abort), or wait awhile and press R (for Retry).

LPTx: not redirected


MODE could not redirect the parallel printer port. Check to see
whether you have specified the proper options.

Maximum number of logical DOS drives installed


You have installed the maximum number of logical DOS drives
allowed by MS-DOS. You cannot create any more logical DOS
drives.

Memory allocation error.


Cannot load MS-DOS, system halted
Restart MS-DOS. If this error continues, make a new copy of the

MS-DOS startup disk from your backup copy.

Missing from the file is either the device ID or


the code page
The code page specified is not supported in the code page
information (.CPI) file, or the .CPI file does not support the printer
specified.

Error Messages B-33


MOVE file MUST be to the Same Disk
When entering the destination path for a Move operation, do not
specify a disk. XTREE moves files to a directory that on the same
is

disk as the original directory. To move files to another disk do the


following:

• Tag the files to be moved.

• Use the Ctrl Copy command to create copies on the


destination disk.

• Use the Ctrl Delete command to remove the original files.

Must specify C0M1, COM2, COM3 or COM4


You must specify a serial port.

MuPt specify destination line number


You must specify a destination line number when you are copying
and inserting lines with EDLIN.

Must specify ON or OFF


The command requires either an ON or an OFF parameter.
Name Exists
In order to prevent confusion, MS-DOS prevents you from using
identicalnames for files, directories, and volume labels. Files may
have names if they are in separate directories, but any
identical
other duplication of names (such as directory and file, directory and
volume label, or file and volume label) are not acceptable.

This message appears if you attempt to make such a duplication, or

ifyou try to rename a directory or file with a name already in use.


Choose a different name and try the operation again.

New file
This message appears if EDLIN does not find a file with the name
you specified. If you are creating a new file, ignore this message. If

you do not intend to create a new file, check to see that you
correctly typed the filename of the file you wish to edit.

B-34 Error Messages


NLSFUNC already Installed
NLSFUNC stays resident in memory once it is initialized. You have
already loaded it into memory.

No Append
No paths have been appended. If you would like to append a path
for data files, use the APPEND command.
No appended directories
You did not specify a path with the APPEND command.
No code page has been selected
No code pages have been selected for the system. If you would like
to select a code page, use the CHCP command.
No COM: ports
Your computer does not have an asynchronous communications
(serial) port.

No files added (or replaced)


The REPLACE command did not add or replace any files.

No files found filename


REPLACE could not find matching source or target files.

No files match filespec


You gave a PRINT command to add to the queue, but no files
match the file specification.

No free file handles.


Cannot start COMMAND.COM, exiting
Restart MS-DOS. If this message recurs, increase the FILES
command value in the CONFIG.SYS file.

No logical drives defined


There are no logical drives defined for your system.

No paper error writing device dev


The printer is either out of paper or not turned on.

Error Messages B-35


No path
You typed PATH to find out what your search path is without
previously setting a command search path.

No primary DOS partition to delete


You have selected the FDISK option to delete your primary
MS-DOS partition, but that partition does not exist.

No room for system on destination disk


There is not enough room for the system files on the destination
diskette. Delete some files to make room for the system files or use
another diskette.

No room in directory for file


You attempted to create a new file with EDLIN, and either the file

directory was full or you specified an illegal diskette drive or


filename.

Check the command line that started EDLIN for an illegal filename
or diskette drive. If the command is no longer on the screen and if

you have not yet typed a new command, you can recover the
EDLIN start command by pressing F3.

If this command line contains no illegal entries, run the CHKDSK


program for the specified diskette drive. If the status report shows
that the diskette directory is full, remove the diskette. Insert and
format a new diskette.

No room in root directory


There is not enough room in the root directory for a volume label.
Delete or move some of the files from the root directory to make
room for the volume label.

No source drive specified


You must specify a source drive.

No space left on device


You cannot back up or restore any more files, and you cannot send
any more output from a file comparison to your disk because the
target disk is now full. You should probably delete some of the files
on the disk to make more room.

B-36 Error Messages


No space to create logical drive
You are trying to create a logical drive, but there is no space
available to do so.

No sub-directories exist
You have specified the /F switch, but the directory does not contain
subdirectories.

No such file or directory


One or more of the files or directories you specified does not exist.

No target drive specified


You must specify a target drive for the BACKUP command.
Non-DOS disk error reading drive d:
MS-DOS does not recognize the disk format because the disk is
missing information or contains another operating system. Try
running the CHKDSK command to correct the problem. If running
CHKDSK does not solve the problem, you should reformat the
disk using the FORMAT command— even though this will destroy
all the files on the disk.

Non-DOS disk error writing drive d:


MS-DOS does not recognize the disk format because the disk is
missing information or contains another operating system. Try
running the CHKDSK command to correct the problem. If running
CHKDSK does not solve the problem, you should reformat the
disk using the FORMAT command — even though this will destroy
all the files on the disk.

Non-standard version of Graphic Character


Set Table is already loaded
MS-DOS cannot recognize the current table of graphics characters
because it has been modified since it was loaded.

Non-system disk or disk error


Replace and strike any key when ready
Replace the disk with the MS-DOS startup disk, and press any key.

Not a graphics printer file


The file you are printing does not contain graphics.

Error Messages B-37


*** Not able to back up (or restore) file ***
This message may occur if there was an error in the source file or on
the target disk. Use the CHKDSK command on the source disk to
see if you can determine the problem.

Not enough memory


There is not enough memory for MS-DOS to run the command.

Not enough room to merge the entire file


There was not enough room in memory to hold the file during an
EDLIN Transfer command. You must free some memory by writing
some files to diskette or deleting some files before you can transfer
this file.

Not found
You have specified a Search or a Replace command that did not
find a further occurrence of the specified string.

Not ready error reading drive d:


The device (usually a drive or printer) specified in the error message
isnot ready to accept or transmit data. This often happens when
the disk drive door is open. If this is the problem, close the door
and press R (for Retry), or check to see if the printer is on and
ready to print.

Not ready error writing drive d:


The device (usually a drive or printer) specified in the error message
isnot ready to accept or transmit data. This often happens when
the disk drive door is open. If this is the problem, close the door
and press R (for Retry), or check to see if the printer is on and
ready to print.

One or more CON code pages invalid for given


language
KEYB examined all prepared code pages, and has found that at
least one code page is incompatible for your screen console device

(CON). This is only a warning to let you know that your keyboard
and screen console device are working from different code pages.

Only non-bootable partitions exist


None of the MS-DOS partitions are set up to boot MS-DOS.

B-38 Error Messages


Only partitions on drive 1 can be made active
You cannot create an active partition on a hard disk other than the
first hard disk drive.

Out of environment space


There is not enough room in the program environment to accept
more data. To increase the size of the existing environment, use the
/E switch with the COMMAND command or remove some of the
existing environment variables by using the SET command.
Out of Memory
During a Copy operation or a Make Directory operation, you have
attempted to create more files or directories than XTREE can
process. Make space on the diskette by removing any unwanted files
and/ or directories.

Parameters not compatible


You entered conflicting parameters in the FORMAT
command line.
Perhaps you entered the /S and /B switches, which cannot both be
used because MS-DOS is unable to create a blank system area, and
an occupied system area, on the diskette simultaneously. It is also
impossible to have a volume label on an 8-sector diskette (/V /8).
Retype the command line with consistent parameters.

Parameters not compatible with fixed disk


You have used a switch that not compatible with the specified
hard disk drive.

Parameters not supported


You used a parameter that MS-DOS does not support.

Parameters not supported by Drive


FORMAT displays this message when the device driver for this
drive does not support Generic IOCtl function requests.

Partition selected ( x ) is not bootable,


active partition not changed
You are trying to change active partitions, but MS-DOS cannot be
booted from the selected partition.

Error Messages B-39


Partition table empty
You have already deleted all partitions from the table.

Partition table full - cannot add


You have already placed the maximum number of partitions in the

partition table.

Path (name) too long


The pathname you specified was too long. You may have to change

directories to use this command with files in deep subdirectories.

Path not found


You an invalid pathname. Check to
specified see that you are
correctly entering the pathname.

Primary DOS partition already exists


You are trying to create a primary DOS partition, but one already
exists. If there is space available on your hard disk, you can create

an extended MS-DOS partition instead.

Print Error. Abort, Retry?


This message appears for a number of reasons. Your printer may be
turned off or it may not be selected. You may be out of paper.
Check your printer and the paper, and retry by pressing R. If you
are still unsuccessful, your printer may not be working. Press A to

abort the print command.

PRINT queue is empty


There are no files waiting to be printed.

PRINT queue is full


There are 10 files in the list of files waiting to be printed, and you
attempted to add another file to the queue. You can make room for

more by using the PRINT /Q switch. The limit is 32 files.

Printer error
Your printer was off line, disconnected, or turned off when you gave
the command to change its setting. Restore communication with
the printer, then repeat the command. Also, MODE displays this
message if you and lines per inch
try to set the line width for a

printer device that does not have hardware installed.

B-40 Error Messages


PRINTER NOT READY!
Your printer is Connect your
either off or off line. printer (or make
sure it is on line) and repeat the command.

Probable non-DOS disk


Continue (Y/N)?
The disk you are using is not recognized by this version of
MS-DOS. The disk was either created by another system with a
format that is not supported on this version of MS-DOS, or it is

not an MS-DOS disk. Do not continue processing if CHKDSK


returns this message for a diskette. If this message returns for a hard
disk, the information describing the characteristics of the disk to
MS-DOS has been destroyed. In this case, you may continue
CHKDSK processing by pressing Y (for Yes). This error may mean
that the File Allocation Table (FAT) is bad and that the disk is

unusable.

Processing cannot continue


There is not enough memory in your machine to process CHKDSK
for this diskette. You must obtain more memory to run CHKDSK.
Program size or number of segments exceeds
capacity of linker
The total size may not exceed 384KB and the number of segments
may not exceed 255.

Program too big to fit in memory


You must more memory to run your application. It is
acquire
possible that some
applications you have run are still using some
memory. You may try to restart MS-DOS; however, if you still
receive this message, you must acquire more memory.

Read error, COUNTRY. SYS


MS-DOS cannot read the COUNTRY.SYS file. Retry the
command. If same message, the COUNTRY.SYS file
you get the is

probably corrupted. Replace the file from your backup MS-DOS


startup diskette.

Read error in filename


MS-DOS could not read the entire file.

Error Messages B-41


Read error, KEYBOARD. SYS
MS-DOS cannot read the KEYBOARD. SYS file. Retry the
command. If same message, the KEYBOARD.SYS file
you get the is

probably corrupted. Replace the file from your backup MS-DOS


startup diskette.

Read fault error reading drive d:


MS-DOS is unable to read data from the device (usually a disk
drive). Check to see that the disk is properly inserted in the drive,
then press R (for Retry).

Requested logical drive size exceeds the maximum


available space
You are trying to create a logical drive that is larger than the space
available.

Requested partition size exceeds the maximum


space available.
You are trying to create a partition on your hard disk that is larger

than the available space.

Requested Screen Shift out of range


You cannot shift the display any farther.

Requested stack size exceeds 64K


Specify a size less than or equal to 64KB with the /STACK switch.
Restore file sequence error
You have restored in the wrong order. You must insert the
files

backup disks in the same order that they were backed up.

Resynch failed. Files are too different


FC displays this message if the number of lines in the internal line

buffer is less than the number of consecutive, differing lines. If you


want to display all of the differences in the file, specify the /LB
switch with a larger number of lines.

Same drive specified more than once


You tried to activate FASTOPEN for the same drive more than
once. You do not need to reactivate it.

B-42 Error Messages


SECOND diskette bad or incompatible
Either the second disk does not have the same format as the first

disk, or DISKCOMP does not recognize the format. Run CHKDSK


to help identify the problem.

Sector not found error reading drive d:


This error usually means the disk has a defective spot so that
MS-DOS cannot find the requested information on it. You should
copy all files from the disk onto another diskette and then try to
reformat the defective disk.

Sector not found error writing drive d:


This error usually means the disk has a defective spot so that
MS-DOS cannot write the requested information on it. You should
copy all files from the disk onto another diskette and then try to
reformat the defective disk.

Sector size too large in file filename


The specified device driver (filename) loaded by CONFIG.SYS uses
a sector size larger than that of any other device driver on the
system. You cannot install this device driver.

Seek error reading drive d:


MS-DOS is unable to locate the information on the disk. Make
sure that the disk is properly inserted in the drive, or try a different
drive.

Seek error writing drive d:


MS-DOS is unable to locate the information on the disk. Make
sure that the disk is properly inserted in the drive, or try a different
drive.

Segment size exceeds 64 k


The addressing system limit is 64KB.

Share already installed


You attempted to install SHARE more than once.
Sharing violation reading drive d:
A program tried to access a file that another program was currently
using. Press A (for Abort), or wait awhile and press R (for Retry).

Error Messages B'43


SORT: Insufficient disk space
The disk is full.

SORT: Insufficient memory


There is not enough memory to run the SORT program.
Source and target drives are the same
You cannot specify the same drive for both the source and target
disks.

Source does not contain backup files


You are attempting to restore files from a disk that does not contain
backup files.

Source path required


You did not specify a source path for REPLACE.
Specified drive does not exist, or is
non-removable
You must specify the name of a valid diskette drive. DISKCOMP
cannot compare hard disks.

Specified MS-DOS search directory bad


The SHELL command in the CONFIG.SYS file is incorrect. Make
sure that the COMMAND.COM file exists and is in a location
specified by the PATH command.
Symbol defined more than once
LINK found two or more modules that define a single symbol
name.

Symbol table capacity exceeded


Very many and/ or very long names were typed, exceeding the limit
of approximately 25KB.

Syntax error
You have entered a command incorrectly. Check to make sure you
have typed the command correctly. Remember to enclose the FIND
command string in double quotation marks.

B-44 Error Messages


Target cannot be used for backup
Either the target disk has an unrecognizable format, or it is bad. Try
to format the disk with the FORMAT command, or run CHKDSK
on it to determine the problem, or use another diskette.

Target disk may be unusable


DISKCOPY did not complete the copy operation because of an
error. The new disk may have bad data. Try to format the disk with
the FORMAT command, or run CHKDSK on it to determine the
problem.

Target diskette is write protected


The target diskette either has a write-protect tab on it, or it does
not have a write-protect notch (514-inch diskettes). To use the
diskette, remove the write-protect tab and give the command again.
If the diskette does not have a write-protect notch, you cannot use

it as a target diskette. If the target diskette is a 3 '/2 -inch diskette, the


write-protect switch is set.

Target diskette may be unusable


Either the target disk has an unrecognizable format, or it is bad. Try
to format the disk with the FORMAT command, or run CHKDSK
on it to determine the problem.

Target is full
There is no more room on the target disk for restored files. You
must delete some of the files on the disk to make room for these
files, or use another disk.

The last file was not restored


There was not enough room on the target disk for the file, or the
last file was bad. Use the CHKDSK command to determine the
problem.

The only bootable partition on drive 1 is


already marked active
You are trying to change the active partition. The active partition
must resideon the first hard disk drive on your system and must be
bootable. The only bootable partition on the first hard disk drive is
already the active partition.

Error Messages B-45


Too Many Directories - Aborting
XTREE found more than its limit of directories on the disk. The
program automatically aborts under these circumstances.

Too Many Directories - Extra Ignored


During a Log disk operation, XTREE reached its directory limit,
which is approximately 180. The program does not log in any more
directories.

Too many drive entries


You can use FASTOPEN with up to four hard drives. You have
tried to specify a fifth drive.

Too many external symbols in one module


The limit is 256 external symbols per module.

Too Many Files - Aborting


XTREE found more than its limit of files on the disk. The program
automatically aborts under these circumstances.

Too Many Files - Extra Ignored


During a Log disk operation, XTREE reached its file limit, which is

approximately 2800. The program does not log in any more files.

Too many files open


MS-DOS could not open the file to edit, or the .BAK file, due to
lack of available file handles. Increase the value in the FILES
command in your CONFIG.SYS file.

Too many groups


The limit is 10 groups.

Too many libraries specified


The limit is 8 libraries.

Too many name entries


The total number of entries specified for a drive exceeded the
maximum of 999.
Too many public symbols
The limit is 1024 public symbols.

B-46 Error Messages


Too many segments or classes
The limit is 256 segments and classes combined.

Track 0 bad-diskette unusable


FORMAT can accommodate defective sectors on the diskette
except for those near the beginning. Use another diskette.

Unable to create a directory


MS-DOS could not create the directory you specified. Check to see
is not a name conflict; you may have a
that there file by the same
name. Also check if the diskette is full.

Unable to create KEYB table in resident memory


MS-DOS tried to create a country-specific table for the keyboard
code specified, but failed. Check the amount of available memory.
There may not be enough memory available to create this table.

Unable to erase
BACKUP could not erase the files on the target disk. Check to see
that the files on the backup disk are not read-only, and that the disk
is not write-protected.

Unable to Make Directory


There are three possible reasons why a directory can’t be created: a
file of the same name already exists in the parent directory, a

directory of the same name already exists, or the disk or directory


has reached its capacity.

If the problem is name similarity, use a different name. If the disk is

full, delete files and then make a new directory. If the directory is

full, either delete files or create the new directory from a different
parent directory.

Unable to shift Screen


MODE is unable to shift the test pattern on the screen any farther.

Unexpected DOS Error n


An unexpected error n occurred, where n is the MS-DOS error
number.

Error Messages B-47


Unrecognized command in CONFIG.SYS
There is an invalid statement in your CONFIG.SYS file. Correct
the file and restart MS-DOS.

Unrecognized printer
You are using an invalid printer. Check to see whether you entered
the command properly, or see the PRINT command in Chapter 4 to
make sure you have specified a valid printer name.

Unrecognized printer port


The printer device name you specified was invalid. You may need to
set the printer port with the MODE command.
Unrecoverable error in directory
Convert directory to file (Y/N)?
If you press Y in response to this prompt, CHKDSK converts the
bad directory into afile. You can then fix the directory yourself or

delete it. you press N in response to the prompt, you may not be
If

able to read from or write to the bad directory.

Unrecoverable read error on drive d:


When the specified drive was read, a read error occurred that the
program couldn’t overcome. The disk may contain flawed sectors.
Although DISKCOMP continues to compare the remaining tracks,
you won’t know if there are differences in the unreadable areas. Use
CHKDSK or RECOVER to try saving the disk.
Unrecoverable write error on drive d:
When the specified drive was written to, an error occurred that the
program couldn’t overcome. The disk may contain flawed sectors.
Although DISKCOMP continues to compare the remaining tracks,
you won’t know if there are differences in the unwritable areas. Use
CHKDSK or RECOVER to try saving the disk.

Unresolved externals: list


The external symbols listed have no defining module among the
modules or library files specified.

B-48 Error Messages


usage: fc [/a] [/b] [/c] [/l] [/lb n] [/w] [t]
[/n] [/NNNN] filel file2
One of the switches you have specified in the FC command is

invalid.

nnn version of Graphic Character Set Table is


already loaded
You tried to load the Graphic Character Set Table with the
GRAFTABL command when it already exists in memory.

VM read error
This is a disk error; it is not caused by LINK.

Warning-directory full
The root directory is too full for RECOVER processing. Delete
some files in the root directory to free enough space for RECOVER
to run.

Warning! Diskette is out of sequence


Replace diskette or continue if okay
Strike any key when ready
You should restore the diskettes in the order that you backed them
up.

Warning! File filename was changed


after it was backed up
Replace the file (Y/N)?
This message asks you if you want to replace a backup file that has
been changed. Press Y (for Yes) to restore this file, or press N (for

No) to skip the file.

Warning! Files in the target drive \ backup


(or root) directory will be erased
BACKUP found files in the target drive, and you did not specify
the /A switch to append files.

Warning! No files were found to back up


BACKUP did not find any files to back up on the disk you
specified.

Error Messages B-49


Warning! No files were found to restore
RESTORE did not find the file or files you specified to restore from
the backup disk.

Warning: no STACK segment


None of the object modules specified contains a segment initializing
stack space. This is not a problem if you are creating a .COM file.

EXE2BIN initializes the stack to the top of the program prefix


segment.

Warning: Read error in EXE file


The amount read was less than the size of the header. This is a
warning message only.

Warning: segment of absolute or unknown type


There bad object module, or you tried to link modules that
is a
LINK cannot handle (such as an absolute object module).

Warning! The partition marked active is not


bootable
The active DOS partition must be bootable.
Write error in TMP file
No more disk space remains to expand the VM.TMP file.
Write error on run file
Usually, there is not enough disk space for the Run file.

Write fault error writing drive d:


MS-DOS is unable to write data to the specified device. Check that
the disk is properly inserted in the disk drive. Then press R (for
Retry). If the error occurs again, press A (for Abort).

Write protect error writing drive d:


You tried to write data on a write-protected disk. If the disk has a
write-protect tab on it (5 '/4-inch diskettes) or the write-protect
switch is set (3 '/2 -inch diskettes), you must remove the protection
before you can write on the disk. (You should consider first why the
disk was write-protected.) If the disk doesn’t have a write-protect
notch, you cannot write on that disk.

B«50 Error Messages


Appendix C
International Keyboard Layouts
Introduction C-2

Belgium C-3
Canada C-3
Denmark C-4
France C-4
Germany C-5
Italy C-5
Latin America C-6
Netherlands C-6
Norway C-7
Portugal C-7
Spain C-8
Sweden/Finland C-8
Switzerland C-9
United Kingdom C-9
United States C-10

Generating Special Characters C-l 1

Entering Characters Using Alt Gr C-l

International Keyboard Layouts C-l


Introduction
MS-DOS includes commands that allow you to select international
keyboard layouts for your U.S. keyboard.

After loading an international keyboard command, you can use your


United States keyboard to generate most of the corresponding
international characters. See the KEYB command in Chapter 4 for
details on the correct use of these commands to change the keyboard
layout.

The layouts for the individual international keyboards are illustrated on


the following pages. Use these illustrations to locate equivalent keys on
your U.S. keyboard.

To reload the United States keyboard layout after using another one,
press Ctrl Alt FI. To reselect the international keyboard layout you
were using, press Ctrl Alt F2.

C-2 International Keyboard Layouts


Belgium Canada

Inser

I
I

I
1^-

|
Ctrl

|
|
AUO

International Keyboard Layouts


Denmark France

Inser
Germany Italy

Gr
Alt

International Keyboard Layouts C-5


Latin America Netherlands

Gr
Alt

C-6 International Keyboard Layouts


Norway Portugal

AltGr

International Keyboard Layouts


Spain Sweden/Finland

Gr
Alt

C-8 International Keyboard Layouts


Switzerland United Kingdom

Gr
Alt
United States
Generating Special Characters
With some of the international keyboards, you can generate special

characters with accents or other special marks above or below certain


letters. To produce the characters in the following lists first press the key
for the special mark; then press the letter key. After you press the letter

key, the letter with the special mark appears on your screen.

For example, after you use the KEYB command to select the French
"
keyboard, if you press the key and then a, the character a appears on
your screen.

There are no special character sequences for the United Kingdom


keyboard or the Italian keyboard.

Note
These sequences are sometimes called dead key combinations.

Use this method to produce the following special characters:

Germany
aeEiou aeiou
France
aAeioOuUy aeiou
Spain
aAeioOuUy aeEiou aeiou aeiou
Belgium
aeuio aeiiioyAUO aeuioE aeuio nN

Denmark
eEaiou aeiou aeiou aAeioOuUy
Norway
eEaiou aeiou aeiou aAeioOuUy

Portugal
aAeEiloOuU aAoonNuU aAeEiioOuU aAeEoO

International Keyboard Layouts C-II


Swiss (French)
nN aeiou aeiou aeiouAEIOUy eEaiou
Swiss (German)
nN aeiou aeiouAEIOUy eEaiou
Sweden
eEaiou aeiou aAeioOuUy nN
Finland
eEaiou aeiou aAeioOuUy nN
Canada
eEii aAeEuU aAeEiioOuU aAeEiloOuU qQ

Entering Characters Using Alt Gr


Certain keys on the international keyboards are marked with one or
two extra characters. See the illustrations on pages C-3 through C-9 for
the location of these keys. You can produce the extra characters by
pressing the Alt Gr key (the Alt key located on the right of the space
bar) with the selected character key when you are using a foreign
keyboard command.

For example, to input the @ character on a French keyboard, press


Alt Gr and 0.

C-12 International Keyboard Layouts


Appendix D
Code Page Tables
Introduction D-2

Code Page 437 (United States-English) D-3

Code Page 850 (Multilingual) D-4

Code Page 860 (Portuguese) D-5

Code Page 863 (Canada-French) D-6

Code Page 865 (Nordic) D-7

Code Page Tables D-l


Introduction
The tables in this appendix list the code pages used by MS-DOS. Code
page switching is described in Chapter 9.

By using the tables you can determine the hexadecimal value of each
character. The first hex digits are in the top row, and the second hex
digits are in the first column.

D-2 Code Page Tables


Code page 437 (United States — English)
Code page 850 (Multilingual)
Code page 860 (Portuguese)
Code page 863 (Canada — French)

-h Al VI
> G

H 8 hi k fe W b i h U © G <o 8
00
k « c

J ^ t= =*= + -,
L

« J H h — —
| U- =l= y=J JL J
~ir i

P5 TT-r F W =n

O— L Sst

a>
&> 'W -« <W <0 :W :i—' <3 '3 a
Et <0
<o O <** o
'D <D '•->

eo
CO O
O’ =3 <ed <<J /(d ^ O* <v
«l> I :4>
:<V /0>

m«3>5X>'' ‘^ < — 1
<Q

(£> , <0 u <— bo geo


»c /— <

cQUQWfeOK-'-o^i-iSZO
X -

00 a>
Code page 865 (Nordic — Norwegian and Danish)
Appendix E
ANSI Escape Sequences
Introduction E-2

Cursor Functions E-2

Modes of Operation E-4

Keyboard Reassignment E-6


Examples E-7

ANSI Escape Sequences E-I


Introduction
This appendix explains how the ANSI escape sequences are defined for
MS-DOS. This appendix also includes examples of how to use ANSI
escape sequences.

An ANSI escape sequence is a series of characters (beginning with an


escape character or keystroke) that you can use to define functions for
MS-DOS. Specifically, you can reassign keys, change graphics functions,
and affect cursor movement.

The following conventions apply to the ANSI escape sequences


described here:

• The default value is used when you do not specify an explicit value

or a value of zero.

• Pn represents a numeric parameter. This is a decimal number


specified with ASCII digits. Do not type the B

• PS represents a selective parameter. This is any decimal number


that identifies a subfunction. You may select multiple subfunctions
by separating the parameters with semicolons. Do not type the R

• Be sure to include the bracket because it is a necessary part of the


escape sequence.

Cursor Functions
Table E-l lists the escape sequences that affect the cursor position on the
screen.

E-2 ANSI Escape Sequences


Table E-l. Cursor functions

Name/Format Description

Cursor Position (CUP) CUP and HVP move the cursor to the position
Esc [PnjPnH specified by the parameters. The first parameter
specifies the line number, and the second
Horizontal and Vertical
parameter specifies the column number. All
Position (HVP) default values are 1 . When you do not specify the
Esc [Pn;Pnf parameters, the cursor moves to the home
position.

Cursor Up (CUU) This sequence moves the cursor up one line


Esc [PnA without changing columns. The value of Pn
determines the number of lines to move. The
default value for Pn is 1. There is no effect if the
cursor is already on the top line.

Cursor Down (CUD) This sequence moves the cursor down one line

Esc [PnB without changing columns. The value of Pn


determines the number of lines to move. The
default value for Pn is 1. There is no effect if the
cursor is already on the bottom line.

Cursor Forward (CUF) This sequence moves the cursor forward one
Esc [PnC column without changing lines. The value of Pn
determines the number of columns to move. The
default value for Pn is 1 There is no effect if the
.

cursor is already in the far right column.

Cursor Backward (CUB) This sequence moves the cursor back one column
Esc [PnD without changing lines. The value of Pn

determines the number of columns to move. The


default value for Pn is 1 . There is no effect if the
cursor is already in the far left column.

Device Status The console driver outputs a CPR sequence (see


Report (DSR) below) on receipt of the DSR escape sequence.
Esc [6n
Cursor Position This sequence reports current cursor position via
Report (CPR) standard input. The first parameter specifies the
Esc [Pn;PnR current line and the second parameter specifies
(from console the current column.
driver to system)

ANSI Escape Sequences E-3


Table E-l. Cursor functions (continued)

Name/Format Description

Save Cursor This sequence saves the current cursor position.


Position (SCP) The RCP sequence (see below) restores this

Esc [S cursor position.

Restore Cursor This sequence restores the cursor position to the


Position (RCP) value ithad when the console driver received the
Esc [u SCP sequence.
Erase Display (ED) This sequence erases the screen, and the cursor
Esc [2J goes to the home position.

Erase Line (EL) This sequence erases from the cursor to the end
Esc [K of the line (including the cursor position).

Modes of Operation
Table E-2 lists the escape sequences that affect screen graphics.

Table E-2. Screen graphics

Name/Format Description

Set Graphics This sequence invokes the graphic functions


Rendition (SGR) specified by the SGR parameters described in

Esc [Ps; . . ;Psm Table E-3. The graphic functions remain in effect
.

until the next occurrence of an SGR escape


sequence.

Set Mode (SM) Thissequence changes the screen width or type.


Esc [=Psh See Table E-4.
Esc [=h
Esc [=0h
Esc [?7h
Reset Mode (RM) Parameters for RM are the same as for SM,
Esc [=Psl except that parameter 7 resets the wrap at the

Esc =1 end of line mode. See Table E-4.


[

Esc [=01
Esc [?71

E-4 ANSI Escape Sequences


Table E-3 describes the parameters and functions for the Set Graphics
Rendition (SGR) escape sequences. Your display adapter may not
support all these functions.

Table E-3. SGR parameters


Parameter Function
0 All attributes off

1 Bold on
2 Faint on
3 Italicon
4 Underscore on (monochrome displays only)
5 Blink on
6 Rapid blink on
7 Reverse video on
8 Concealed on (ISO 6429 standard)
30 Black foreground (ISO 6429 standard)
31 Red foreground (ISO 6429 standard)
32 Green foreground (ISO 6429 standard)
33 Yellow foreground (ISO 6429 standard)
34 Blue foreground (ISO 6429 standard)
35 Magenta foreground (ISO 6429 standard)
36 Cyan foreground (ISO 6429 standard)
37 White foreground (ISO 6429 standard)
40 Black background (ISO 6429 standard)
41 Red background (ISO 6429 standard)
42 Green background (ISO 6429 standard)
43 Yellow background (ISO 6429 standard)
44 Blue background (ISO 6429 standard)
45 Magenta background (ISO 6429 standard)
46 Cyan background (ISO 6429 standard)
47 White background (ISO 6429 standard)
48 Subscript
49 Superscript

ANSI Escape Sequences E-5


Table E-4 lists the parameters and functions for the Set Mode (SM) and
Reset Mode (RM) escape sequences.

Table E-4. SM and RM parameters

Parameter Function

0 40 x 25 black and white


40 x 25 color
3 80 x 25 black and white
4 320 x 200 color
5 320 x 200 black and white
6 640 x 200 black and white
7 Wrap at end of line

Keyboard Reassignment
Although not part of the ANSI 3.64-1979 or ISO 6429 standard, the
following keyboard reassignments are compatible with these standards.

The control sequence is one of the following:

• Esc [Pn;Pn; . . .Pnp

• Esc ["string"’,

• Esc [ Pn; str ing" ;Pn;Pn;" string"; Pnp


• any other combination of strings and decimal numbers.

The final code in the control sequence (p) is one reserved for private use
by the ANSI 3.64-1979 standard.

The first ASCII code in the control sequence defines which code is

mapped. The remaining numbers define the sequence of ASCII code to


generate when this key is intercepted. Note that there is one exception:
if the first code in the sequence is zero (NUL), then the first and second

codes make up an extended ASCII redefinition.

E-6 ANSI Escape Sequences


Examples
To reassign the Q and q key to the A and a key (and vice versa), use the
control sequence:

Esc [65;81P A becomes Q


Esc [97;113p a becomes q
Esc [81;65p Q becomes A
Esc [113;97p q becomes a

To reassign the F10 key to a DIR command followed by a carriage


return, use the control sequence:

Esc [0;68;"dir";13p

The 0;68 is the extended ASCII code for the F10 key; 13 decimal is a
carriage return.

ANSI Escape Sequences E-7


E-8 ANSI Escape Sequences
Index

A
Accented characters, C-l 1
Active partition, 4-73
ANSI escape sequences, E-2-7
ANSI.SYS device driver, 3-7, 6-11, 6-22
Append, EDLIN, 8-25, 8-28
APPEND command, 2-10, 4-5 — 8
APPEND.EXE, 3-6
Application programs, 1, 1-9- 10, 2-2, 4-19, 6-5, 6-7, 6-13, 6-15, 6-22, 7-4
returning to, 4-54
Archive bit, 4-11, 4-164, 5-21, 5-23
ASCII
characters, 4-88-89, 4-102
files, comparing, 4-57
mode, 4-35
Assemble, DEBUG, 8-5, 8-8
Assembly language programs, 8-45, 8-48
ASSIGN command, 4-9- 10
ASSIGN.COM, 3-7
ATTRIB command, 2-6, 3-6, 4-11-13, 5-4, 5-20

ATTRIB.EXE, 3-4

Attributes, changing, 4-11- 13, 5-20—21


AUTOEXEC.BAT file, 3-16, 7-4-5, 9-6-7
AUX, 2-3, 3-18, 4-37

B
Backslash (\), 2-6, 2-8—9, 3-11 — 12, 4-106
see also Root directory

Backing up
disks, 1-3-6, 4-17

files, 4-14-18, 4-136, 5-8-11


hard disk files, 3-4, 4-18
log file, 4-16
system diskettes, 1-3

BACKUP command, 3-4, 4-14- 18, 5-4, 5-8, 5-20


BACKUPCOM, 3-4

Index i -l
Backup 5-8-11
Files, 5-4,

BAK files, 8-24-25


Batch file(s), 3-14-17, 7-2-4
BAT files, 7-2-8
calling, 7-9

creating, 7-2 —4
executing, 7-2—9
jumping, 7-14
labels, 7-9, 7-14

naming, 7-2-4
Batch processing, 3-9, 7-2—19
commands, 3-14, 7-8—19
operations, 3-9
Baud rates, 4-111, 5-32-33
BIN files, 8-43
Binary
files, comparing, 4-57, 5-18
format, 8-43
mode, 4-35
Block devices, identifying, 6-5
Booting system, 1-2, 1-6, 3-16, 4-73
Boot-up drive, 4-154
BREAK command, 3-2, 3-8, 4-19, 6-2, 6-6

Buffers
allocating, 6-2, 6-7
cache, 4-94
BUFFERS command, 6-2, 6-7

c
Cache buffer, 4-94

CALL command, 3-9, 7-9


Central processing unit (CPU), 1-7

Change File Attributes, 5-4, 5-20-21


Character
codes, 1-15
sets, 4-20, 9-2

CHCP command, 3-2, 3-8, 4-20-21, 4-121, 9-4, 9-8


CHDIR command, 2-8, 3-2, 3-6, 4-22 — 23, 5-45

Check Disk, 5-4, 5-25


CHKDSK command, 3-14, 4-24-26, 5-4, 5-25
CHKDSK.COM, 3-3

1-2 Index
Clear monitor screen, 3-2, 3-8, 4-27
CLS command, 3-2, 3-8, 4-27

CMOS clock, setting, 4-39


Code page(s), 1, 3-8, 4-20, 4-101, 4-115-119, 6-8, 6-29, 9-3, 9-8

4201. CPI file, 9-4


changing configuration, 3-7-8
character sets, 4-121, 5-35
commands, 4-109, 5-35—39, 9-4-9
information (CPI) files, 9-4
list, 5-36-38
preparing, 4-115—117, 5-36-37
refreshing, 4-117, 5-39
selecting, 5-37
status, 5-38

switching, 3-8, 4-121, 6-11, 6-23, 6-29, 9-2, 9-4, 9-6


tables, D-2-7
CODEPAGE /STATUS, mode, 9-5
CODEPAGE PREPARE, mode, 9-5, 9-7
CODEPAGE REFRESH, mode, 9-5, 9-9
CODEPAGE SELECT, mode, 9-5, 9-8
Color/graphics adapter, 4-88, 4-90-91
COM files, 8-4, 8-43
COM1 (2, 3, 4), 2-3, 3-18, 4-37, 4-111, 5-33
Command
echoes, 7-10
filter, 3-5

format, 3-12
piping, 3-19
processor
exiting, 4-54
loading, 4-28-30, 6-2, 6-17
secondary, 4-28
top-level, 4-28
prompt, 1-6, 3-8

COMMAND command, 4-28 — 30


COMMAND.COM, 1-9, 3-2, 3-8-9, 4-28, 6-2, 6-17

command string, 5-7


Commands
batch, 7-2-19
configuration, 6-2-33
entering, 3-10, 3-13

Index 1-3
Commands (continued)
external, 3-2, 4-4
format, 3-10, 4-3
internal, 3-2
programming, 8-2-63
Comment lines, 7-18
Compare, DEBUG, 8-5, 8-9

Compare Files, 5-4, 5-17 — 20


Comparing
disks, 4-45-48, 5-27-28
files, 4-31-32, 5-17-20
COMP command, 4-31-32, 5-17
COMECOM, 3-4
Computer reset, 1-7

COMSPEC variable, 4-28, 4-147, 6-17


CON, 2-3,3-14-16, 4-37, 5-38
Conditional
parameters, 7-15
processing, 7-15
CONFIG.SYS file, 3-7-8, 5-10, 5-13, 5-24, 5-36, 6-2-33, 9-6
Configuration
commands, 6-2-33
file, 6-2-33
Console device, 6-23
Control keys
functions, 1-13
see abo XTREE
Conventions, 4
COPY command, 1-9, 2-10, 3-2, 3-5-6, 3-14- 16, 4-33-36, 5-45
see also BACKUP

Copy, EDLIN, 8-25, 8-29


Copying
directories, 2-7, 5-22-24
diskettes, 3-3, 4-99-51, 5-26
files, 2-10, 3-5, 4-14- 18, 4-33-36, 4-163-165, 5-22-24
with one diskette drive, 1-4

with two diskette drives, 1-3


Country codes, 4-141, 6-8
Country information file, 4-121, 4-140, 6-12
COUNTRY command, 5-10, 5-13, 5-24, 6-2 — 3, 6-8 — 9, 9-5—6
COUNTRY.SYS, 6-12

1-4 Index
CPU (central processing unit), 1-7
registers, 8-3—4, 8-15
Creating partitions, hard disk, 4-65 — 73
see also Partitions

CITY command, 3-8, 4-37 — 38


Cursor keys
controls, see XTREE
functions, E-2
see also Editing keys

see also EDLIN

D
Data
files, 4-5-6, 4-122
displaying, 4-120
protecting, 4-11
sorting, 4-150
filtering, 3-19
length, 4-111, 5-32-33
redirecting, 3-18
DATE command, 1-2, 3-2, 3-8, 4-39-40
Date, format, 4-39
Dead key sequences, 4-101, C-l 1

DEBUG command, 8-2-22


address, 8-6
byte, 8-6
command format, 8-5-8
commands, 8-5, 8-8- 18
drive, 8-6
hyphen prompt, 8-3
list, 8-6
parameters, 8-5
range, 8-7
record, 8-7
registers, 8-4

starting, 8-3
string, 8-8

TESTBUG.COM, 8-18-19
value, 8-8
(A)ssemble, 8-5, 8-8
(C)ompare, 8-5, 8-9

Index 1-5
DEBUG command (continued)

(D) ump, 8-5, 8-9


(E) nter, 8-5, 8-10
(F) ill, 8-5, 8-11

(G) o, 8-5,8-11
(H) ex, 8-5, 8-11
(I) nput, 8-5, 8-12
(L) oad, 8-5, 8-12
(Q)
(M) ove, 8-5, 8-13
(N) ame, 8-3, 8-5, 8-13

(O) utput, 8-5, 8-14


(P) roceed, 8-5, 8-15
uit, 8-5, 8-15
(R) egister, 8-5, 8-15
(S) earch, 8-5, 8-16
(T) race, 8-5, 8-16
(U) nassemble, 8-5, 8-17
(W)rite, 8-5, 8-17
DEBUG.COM, 3-9, 8-18

Debugging tools, 3-9, 8-2 — 22


Default drive, 1-6, 2-3

changing, 1-6
DEL command, 3-2, 3-5-6, 4-41-42, 4-52, 5-45
Delete, EDLIN, 8-25, 8-30
Deleting
directories, 2-7
files, 3-5-6
partitions, 4-74
Delimiters, 3-13
DEVICE command, 5-36, 6-11, 9-5-6
Devices, 3-18
block, 6-5
code pages, 4-108
preparing, 4-115-117
drivers, 6-5, 6-21, 9-5
installing, 6-2, 6-11, 6-21

identifiers, 6-5

names, 2-3
DIR command, 3-2, 3-6, 4-43—44, 5-45

1-6 Index
Directories, 3-6, 6-32
changing, 2-7 — 8, 4-22 — 23
copying, 2-7, 5-22-24
creating and using, 2-6 - 7
deleting, 2-7
displaying, 2-11, 3-6, 4-157
joining, 4-98
pathnames, 2-7-9
removing, 2-12
root, 2-8 — 9
subdirectories, 2-6, 2-8—9
Directory, 2-6, 2-8—12, 3-11, 3-13
connecting, 3-6
current, 4-22, 4-106
parent, 2-11
pathname, 2-6

printing, 5-6
removing, 2-12
root, 2-6-7, 2-11, 4-22, 4-106, 6-3, 7-4
tree structure, 4-157
see also XTREE
Disk
buffers, 6-7
drive descriptor, 2-3, 3-11, 3-16
errors, B-2
operating system, 1

status, 4-24 — 26

write, 4-161
Disk Compare, 5-4, 5-27 - 28
Disk Copy, 5-4, 5-26
Disk Utilities, 5-4, 5-24-30
DISKCOMP command, 3-14, 4-45-48, 5-4, 5-27
DISKCOMECOM, 3-3
DISKCOPY command, 1-3-5, 1-9, 3-3, 3-14, 4-49-51, 5-4, 5-26
DISKCOPY.COM, 3-3
Diskette(s)
backing up, 1-3—4, 3-4, 4-14— 18
checking, 3-3, 4-24
comparing, 3-3, 4-45—48
compatibility, 1-8
copying, 3-3, 4-49 — 51, 5-26

Index 1-7
Diskette(s) (continued)

double-sided, double-density, 1-8


formatting, 1-11, 3-3, 4-82 — 87, 5-28-30
fragmented, 4-50
high density, 1-8

incompatibility, 1-8
initializing, 4-82 — 87
labelling, 1-6, 4-104

master, 1-6
operations, 3-3
recovery, 4-130
startup, 3-16
system, 3-2, 3-4, 3-7, 3-9
tracks, 1-8
working, 1-6
write-protecting, 1-3
Diskette drives, 1-8
diskette incompatibilities, 1-8
drive incompatibilities, 1-8
installing, 6-25

using single, 1-10


using two, 1-9
Display
echoes, 7-10
monitor, see XTREE1NS
parameters, 6-8
Displaying
files, 4-159
version number, 4-160
volume label, 4-162
Display mode parameter, 4-114
DISPLAY.SYS device driver, 6-11, 6-23, 9-5
Drive(s)
accessing, 6-2, 6-16
assignments, 4-9- 10
changing, 1-6
compatibility with diskettes, 1-8-9
default, 1-6, 2-3
descriptor, 1-6, 2-3, 3-11, 3-13, 3-16
incompatibility, 1-8
joining, 4-98

1-8 Index
Drive(s) (continued)

letter, 2-10
assigning, 3-7
substituting, 3-6, 4-152-153
single, 1-10

two, 1-9
DRIVER. SYS, 3-7,6-11,6-25
DU, 5-4, 5-24
Dump, DEBUG, 8-5, 8-9

E
ECHO command, 3-2, 3-9, 7-10
Editing
keys, 1-14
text, 8-23 — 42
EDLIN command, 3-14, 3-16, 8-2, 8-23-42
asterisk (*), 8-24
commands, 8-25, 8-28-42
line, 8-26
options, 8-26
prompt, 8-24
question mark (?), 8-26
special features, 8-27

starting, 8-24
(Q)
string, 8-26

(A)ppend, 8-25, 8-28


(C) opy, 8-25, 8-29
(D) elete, 8-25, 8-30
(E) nd, 8-25, 8-31

(I)nsert, 8-25, 8-32


(L) ist, 8-25, 8-33

(M) ove, 8-25, 8-35


(P) age, 8-25, 8-35
uit, 8-25, 8-36
(R) eplace, 8-25, 8-36
(S) earch, 8-25, 8-39

(T) ransfer, 8-25, 8-41


(W)rite, 8-25, 8-41
EDLIN.COM, 3-9
EEMM.EXE device driver, 6-4, 6-11, 6-28

Index 1-9
EGA monitor, 9-4
EGA.CPI file, 9-4
End, EDLIN, 8-25, 8-31
Enter, DEBUG, 8-5, 8-10

Enter DOS Command, 5-40


Environment, 4-7, 4-28—29
current, 3-8
setting, 4-147-148
size, 4-29
strings, 7-3

variables, 6-17, 7-7


ERASE command, 3-2, 3-5, 4-41, 4-52 — 53
Error messages, B-2 — 50
Error retry, 4-111
ERRORLEVEL, 7-15
Escape
codes, 3-7
sequences, 6-22, 8-2—7
EXE files, 8-4, 8-43, 8-45

EXE2BIN command, 8-2


EXE2BIN.EXE, 3-9
Execution, suspending, 7-17
EXIST, 7-15
Exit codes, 4-17, 4-102, 4-134, 4-138, 4-165
EXIT command, 3-2, 3-8, 4-54
Expanded
memory, 6-3-4, 6-28, 6-31, 6-32
memory specification (EMS), 6-3
Extended
memory, 6-3— 4, 6-31— 32
partition, 4-65, 4-73
creating, 5-70 — 72
deleting, 4-76
logical drives, 4-72
External commands, 2-10, 3-2, 3-13, 4-4

F
FASTOPEN command, 4-55-56
FASTOPEN.EXE, 3-5
FCBS command, 6-2, 6-4, 6-13
FC command, 4-57 — 64, 5-4, 5-17-20
FC.EXE, 3-5
FDISK command, 4-65 - 79
FDISK.COM, 3-4
File allocation table, 3-3, 4-24, 5-25

File attributes, 5-20—21


File control blocks (FCBS), 6-4, 6-13
opening, 6-2
File(s) 3-2
accessing, 4-53 — 56
ASCII mode, 4-34
AUTOEXEC.BAT, 3-16, 7-4-5, 9-6-7
backing up, 4-14
batch, 3-15-16, 7-2-8
binary, 4-34, 8-43
comparing, 3-4-5, 4-31-32, 4-57-64
copying, 2-5, 2-10, 3-5, 4-14- 18, 4-33-36, 4-163- 165, 5-22-24
deleting, 2-5, 3-5, 4-41-42, 4-52-53
display attributes, 3-4
displaying, 3-5, 4-159
editing, 3-9
erasing, 4-41-42, 4-52-53
executable, 4-5-6, 8-4, 8-43, 8-45
extension, 2-2, 2-4, 3-11, 3-13
handles, 6-4, 6-15
installing, system, 3-3

listing, 4-43-44
locating, 4-5, 4-94
locking, 4-149
maintaining, 2-5
managing, 2-2
merging, 4-35
naming, 2-2
networking, 4-149
opening, 6-2, 6-4, 6-15
printing, 3-5, 4-124-126
program, 2-10
protecting, 2-5
recovering, 4-130- 131
renaming, 3-5, 4-132

replacing, 3-5, 4-133-135


restoring, 3-4, 4-136 — 138

Index hll
File(s) (continued)

sharing, 3-5, 4-149


sort, 3-5
system, 1-9, 3-4

verifying, 3-8, 4-34, 4-161


FILES, 6-2, 6-4, 6-15
File Utilities, 5-4, 5-8 — 24
Filename(s), 2-24, 2-9, 3-11 — 12
Fill, DEBUG, 8-5, 8-11
Filters, 3-19, 4-150
FIND command, 3-19, 4-80—81
FIND.EXE, 3-5
FOR command, 3-2, 3-9, 7-12

FORMAT, 1-11-12, 3-14


Format
binary, 8-43
diskettes, 1-11, 3-3, 5-28—30
hard disk, 3-4, 5-28-30
partitioning, 4-65 - 79
FORMAT command, 1-9, 4-82-87, 5-4, 5-28

Format Disk, 5-4, 5-28 — 30

FORMAT.COM, 3-3
Function keys, 1-13
see also XTREE

G
Go, DEBUG, 8-5, 8-11

GOTO command, 3-2, 3-9, 7-14


GRAFTABL command, 1-16, 4-88-89, 9-6
GRAFTABL.COM, 3-7
GRAPH24 command, 4-90
GRAPH24.COM, 3-7
Graphics
mode, 3-7, 4-92
printing, 4-90-93
table, 4-88-90
GRAPHICS command, 4-91—93
GRAPHICS.COM, 3-7

1-12 Index
Hard disk, 1-6
backing up files, 3-4
checking, 4-24 — 26
cylinders, 4-70
FDISK, 4-65-79
formatting, 3-4, 4-82-87, 5-28-30
initializing, 4-82 — 87
labelling, 3-4, 4-104
partitioning, 3-4, 4-65 - 79, 6-5
restoring files, 3-4
Hardware interrupts, 6-19
HDCACHE command, 4-94-96
HDCACHE.EXE, 3-4
HELP command, 4-97, 5-4, 5-39-40
HELECOM, 3-7, 5-39
HELETXT, 4-97, 5-39
Hex, DEBUG, 8-5, 8-11

I
IF command, 3-2, 3-9, 7-15

Input
DEBUG, 8-5, 8-12

redirect, 3-17

Input/ output device, 3-8


changing, 4-37 — 38
Insert,EDLIN, 8-25, 8-32
Internal commands, 3-2, 3-5-6, 3-8—9
International keyboards, 1-16, C-2-10
selecting, 1-16
special characters, generating, C- 11 — 12

J
JOIN command, 3-14, 4-98-99
JOIN.EXE, 3-6

K
KEYB command, 1-16- 17, 4-100- 103, 9-4, 9-7
KEYB.COM, 3-7

Index M3
Keyboard, 1-13
code, 1-16, 4-100, 4-141
control, 6-11, 6-22
control key functions, 1-13
file, 4-102, 6-12
function keys, 1-13
generating special characters, 1-14
layout, 3-4, 4-100, 4-140, C-2-10
country, 3-7
reassignment, B-6
replacing, 4-100
setting international, 1-16
special characters, C-l 1-12
KEYBOARD.SYS, 4-102, 6-12

L
LABEL command, 3-6, 3-14, 4-104—105
LABEL.COM, 3-4
Labels
batch files, 7-9, 7-14
volume, 4-162
LASTDRIVE command, 4-152, 6-2, 6-16, 6-26
LIM-EMS, 6-4, 6-11, 6-28
LINK command, 8-2, 8-45-63
aborting, 8-50
aligning segments, 8-57
assembly language, 8-45, 8-48
combining segments, 8-58
8-45-52
files,

fixups, 8-59-60
groups, 8-47, 8-59
libraries, 8-48-52
list file, 8-48-52
object module, 8-45-46, 8-48-52
parameters, 8-51 — 52
processing, 8-57—60
run file, 8-48-52
segments, 8-47, 8-57 — 60
starting, 8-49

1-14 Index
LINK command (continued)

switches, 8-52 — 57
/CPARM AXALLOC ,
8-53
/DOSSEG, 8-53
/DSALLOCATE, 8-52-53
/EXEPACK, 8-54
/HELP, 8-54
/HIGH, 8-54
/LINENUMBERS, 8-54
/MAE 8-54
/NODEFAULT, 8-55
/NOGROUP 8-55
/NOIGNORE, 8-55
/OVERLAYINTERRUPT, 8-55
/PAUSE, 8-56
/SEGMENTS, 8-56
/STACK, 8-56
VM.TME 8-46, 8-48-49
LINK.EXE, 3-9
List, EDLIN, 8-25, 8-33
Load, DEBUG, 8-5, 8-12

Loading MS-DOS, 1-2

Log file, 5-11


Logical
drives, 1, 4-72
deleting, 4-77
printer devices, 4-110
LPT1 (2, 3), 2-3, 3-18, 4-37, 5-34, 5-38

M
Master diskettes, 1-6

MD command, 4-106
Memory, 1-5

allocating, 6-3
expanded, 6-3-4, 6-28, 6-31-32
expansion card, 6-4
extended 4-94, 6-3—4, 6-31 — 32
nonvolatile, 6-3
RAM, 6-3-4,6-11,6-31-32

Index 1-15
Memory (continued)
size, 6-7
standard, 4-94
volatile, 6-3

Menu utilities, 1, 3-6, 5-3-40


MENU command, 3-6, 5-3
MENU.EXE, 3-6
Merging files, 4-35
Messages, B-2-50
MKDIR command, 2-7, 3-2, 3-6, 4-106- 107, 5-45
MODE command, 4-108- 19, 1 5-4, 5-30, 9-5
MODE Settings, 5-4, 5-30-39
MODE.COM, 3-7
Modes, operation, E-4
Monitor
changing configuration, 3-7
clear screen, 4-27
display format, 4-1 13
preparing, 4-113-115
MORE command, 3-19, 4-120
MORE.COM, 3-5
Move, DEBUG, 8-5, 8-13
Move, EDLIN, 8-25, 8-35

N
Name, DEBUG, 8-3, 8-5, 8-13
Network, 6-16
support, 3-14
system, 3-5, 6-13
NLSFUNC command, 4-121, 9-4
NLSFUNC, 9-7
NLSFUNC.EXE, 3-8
NUL, 2-3, 4-37
Numeric keypad, 1-15-16

o
Object code modules, 3-9, 8-45-46, 8-48-52
Object modules, LINK, 8-45-46, 8-48-52
Output, 3-17
Output, DEBUG, 8-5, 8-14
Output, redirect, 3-17
p
Page, EDLIN, 8-25, 8-35
Parallel printers, 4-108, 6-29
Parameters, 3-10- 12
alignment, MODE, 4-114
condition, 7-15
DEBUG, 8-5
display, 6-8
displaymode, MODE, 4-114
dummy, 3-16
LINK, 8-51-52
replaceable, 3-16, 7-5, 7-7, 7-19
SGR, E-5
SM/RM, E-6
Parent directory, 2-11
Parity, 4-111, 5-32-33
Partitions, hard disk, 3-4, 4-65 — 79
active, 4-73
creating, 4-67
deleting, 4-74-77
displaying, 4-78
extended, 1, 4-70-72, 4-76
logical drives, 1, 4-72, 4-77
primary, 1, 4-65 — 79
deleting, 4-75
Path, 2-9, 11-12, 3-14, 4-5-6
3-,

names, 2-6— 10, 2-12, 3-11


substituting, 4-152-153
set, 3-6
PATH command, 2-10, 3-2, 3-8, 4-5, 4-122-123, 5-5
PAUSE command, 3-2, 3-9, 7-17
Peripheral devices, 6-11, 6-21
Pipe separator, 3-19
Port number, 5-32-33
PRINT command, 4-124—126
PRINT.COM, 3-5

Index 1-17
Printer(s)
buffer, 4-124

change configuration, 3-7


device name, 3-18
parallel, 6-29

preparing, 4-108, 4-110—113


Printer option, 5-31—32
PRINTER.SYS device driver, 9-5
PRINTER.SYS, 6-11, 6-29
Printing
define defaults, 3-6
directory, 5-6
file, 3-5

output direction, 4-112-113


screen, 3-7
PRN, 2-3, 3-18, 4-37, 5-38

Proceed, DEBUG, 8-5, 8-15


Program
files, 2-10, 3-2, 4-122
line editing, see EDLIN
Programming
commands, 8-2 - 63
tools, 3-9, 8-2—63
PROMPT command, 3-2, 3-8, 4-127-129

Q
Quit, DEBUG, 8-5, 8-15
Quit, EDLIN, 8-25, 8-36
Quotation marks, 4-81, 8-8

R
RAM, 6-3-4, 6-11, 6-32
disk, see Virtual disk
Random access memory, see RAM
Read-only, 2-6
attribute, set or reset, 3-4, 4-1 1 - 13, 5-21
memory (ROM), 6-3
Real-time clock, 1-2
Reboot, operating system, 1-7

RECOVER command, 3-14, 4-130- 131


RECOVER.COM, 3-5

1-18 Index
Redirect LPTn, 5-34
Redirecting I/O, 3-17, 5-34
Redirection symbols, 7-3
Refreshing, code pages, 4-117
Register, DEBUG, 8-5, 8-15

Registers, 8-4, 8-15, 8-43


REM command, 3-2, 3-9, 7-19

Remarks, 7-18
RENAME command, 3-2, 3-5-6, 4-132, 5-45
Repetitive operations, 7-12
REPLACE command, 4-133- 135, 5-4, 5-15

Replace Files, 5-4, 5-15—17


REPLACE.EXE, 3-5

Replace, EDLIN, 8-25, 8-36


Replaceable parameters, 7-5, 7-7, 7-19
Replacing files, 5-15—17
RESET button, 1-7

Resetting, computer, 1-7


Restart, hardware level, 1-7

RESTORE command, 3-4, 4-136-138, 5-4, 5-11

Restore Files, 5-4, 5-1 1 — 15


RESTORE.COM, 3-4
Restoring files, 3-4, 4-136- 138, 5-11 - 15
RMDIR command, 2-12, 3-2, 3-6, 4-139, 5-45
Root Directory, 2-6—9, 2-11, 6-3, 7-4
RS-232C, 3-18

s
Screen
aligning, 4-113
clear, 3-8

control, 6-11, 6-22


graphics, 4-88—93
output, 3-9
Search, DEBUG, 8-5, 8-16

Search, EDLIN, 8-25, 8-39


Search path, 4-122
Searching for text, 4-80-81
SELECT command, 4-140—146, 6-3, 6-9, 9-4

hard disk, 4-144- 146

Index 1-19
SELECT.COM, 3-4
Serial port, 3-18
changing configuration, 3-7
preparing, 4-111-112
Serial Port, 5-32-33
SET command, 3-2, 3-8, 4-28, 4-147
Set mode, parameters, 4-147
SETATTR, 5-4
SETBCKUP 5-4
SETFC, 5-4
SETMODE, 5-4
SETRPLCE, 5-4
SETPRINT command, 3-6, 5-42 - 44
SETPRINT.EXE, 3-6
SETRSTOR, 5-4
SETXCOPY, 5-4
SHARE command, 4-149
SHARE.EXE, 3-5
SHELL, CONFIG.SYS, 6-2, 6-17
SHIFT command, 3-2, 3-9, 7-7, 7-20
Software program, 1,6-21 see also Application programs
SORT command, 3-19, 4-150-151, 9-6
SORT.EXE, 3-5
Special characters, generating, 1-14-15, C-ll - 12
Stack frames, 6-2, 6-19
STACKS command, 6-2, 6-19
Startup diskette, 3-16
Stop bits, 4-111, 5-32-33
Subdirectories, 2-6—12
copying, 4-163-165
creating, 4-106- 107
deleting, 4-139
replacing, 4-133- 135
SUBST command, 2-10, 4-152, 6-16
SUBST.EXE, 3-6
Substitute, drive letter, 2-10, 3-6, 4-152
Switches, 3-12
Symbols, 4

1-20 Index
SYS
command, T9, 3-14, 4-154

files, 1-9, 3-4

SYS.COM, 3-4

System, 3-2
booting, 1-2, 3-16
configuration and operation, 3-7
changing, 3-7
diskettes, 3-2, 3-4, 3-7, 3-9
backing up, 1-3

creating, 4-140, 5-29


files, 1-9, 3-4, 5-29
copying, 4-154
installing, 3-3, 4-83

startup, 6-11
customizing, 7-4
time, 4-155

T
Text
editor, 3-16 see also EDL1N
files, 4-159
searching for, 4-80-81
TIME command, 1-2, 3-2, 3-8, 4-155 — 156

Time format, 4-155


Trace, DEBUG, 8-5, 8-16

EDLIN, 8-25, 8-41


Transfer,
TREE command, 2-12, 3-6, 4-157— 158
TREE.COM, 2-12, 3-6
TYPE command, 3-2, 3-5-6, 4-159, 5-46

u
Unassemble, DEBUG, 8-5, 8-17

V
VDISK.SYS device driver, 3-8, 6-4, 6-11, 6-28, 6-31-33
VER command, 3-2, 3-8, 4-160
VERIFY command, 3-2, 3-8, 4-161

Version number, 4-160


Video Display, 5-30
Virtual disks, 6-3-4, 6-11, 6-31-33

1-21
Index
VOL command, 3-2, 3-6, 3-8, 4-162, 5-45
Volume
identification, 3-8
labels, 3-3-4, 4-83-85, 4-104, 4-162, 5-29

w
Wildcard characters, 2-4, 3-12
Working diskettes, 1-6
Write, DEBUG, 8-5, 8-17
Write, EDLIN, 8-25, 8-41
Write-protect diskette, 1-3-4, 2-5

X
XCOPY command, 4-163-165, 5-20, 5-22
XCOPY.EXE, 3-5
XTREE command, 2-5, 3-6, 5-46-73, 7-4
command features, 5-46
cursor controls, 5-51
DIR commands, 5-52—60
FILE commands, 5-60—70
function keys, 5-70-73
menu, 5-47
XTREE.EXE, 3-6, 3-8
XTREEINS command, 5-74—80
XTREEINS.DAT, 3-8
XTREEINS.EXE, 3-8

1-22 Index

You might also like