MSDOS 3.3 Reference Sep89
MSDOS 3.3 Reference Sep89
3.3 Reference
HP 9000 Series 300/800 Computers
Flin- HEWLETT
~~ PACKARD
Hewlett-Packard Company
3404 East Harmony Road, Fort Collins, Colorado 80525
NOTICE
The information contained In this document is subject to change without notice
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MANUAL. INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable
for errors contained herein or direct. indirect. special, incidental or consequential damages in connection with the furnishing, performance,
or use of this material
WARRANTY
A copy of the specific warranty terms applicable to your Hewlett-Packard product and replacement parts can be obtained from your local
Sales and Service Office
This document contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be
photocopied. reproduced or translated to another language without the prior written consent of Hewlett-Packard Company. The information
contained in this document is subject to change without notice.
Use of this manual and flexible disc(s) or tape cartridge(s) supplied for this pack is restricted to this product only. Additional copies of the programs
can be made for security and back-up purposes only. Resale of the programs in their present form or with alterations, is expressly prohibited.
ThiS software and documentation is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University
of California
ii
Printing History
New editions of this manual will incorporate all material updated since the previous
edition. Update packages may be issued between editions and contain replacement and
additional pages to be merged into the manual by the user. Each updated page will be
indicated by a revision date at the bottom of the page. A vertical bar in the margin
indicates the changes on each page. Note that pages which are rearranged due to changes
on a previous page are not considered revised.
The manual printing date and part number indicate its current edition. The printing
date changes when a new edition is printed. (Minor corrections and updates which are
incorporated at reprint do not cause the date to change.) The manual part number
changes when extensive technical changes are incorporated.
2. MS-DOS Commands
APPEND 2-2
ASSIGN 2-4
Contents-1
ATTRIB 2-6
BACKUP 2-8
BREAK. 2-14
CHCP 2-16
CHDIR or CD 2-18
CHKDSK . . 2-20
CLS . . . . 2-22
COMMAND . 2-24
COMP 2-26
COpy 2-28
CTTY 2-32
DATE 2-34
DEL . 2-36
DIR . 2-38
DISKCOMP 2-40
DISKCOPY 2-42
DOS~10UNT 2-44
DOS2UX 2-48
ERASE . 2-50
EXE2BIN 2-52
EXIT. . 2-54
FASTO PEN 2-56
FC . . 2-58
FDISK . 2-62
FIND. . 2-64
FORMAT 2-66
FOR150 . 2-70
GRAFTABL . 2-72
GRAPHICS 2-74
JOIN . 2-78
KEYB 2-80
LABEL 2-84
MKD IR or MD 2-86
MOD E (General Information and Errors) 2-88
MODE (Set Parallel Printer) . . . . . 2-90
MODE (Set Display Adapter/Display Characteristics) 2-92
MODE (Set Asynchronous Comlnunications) . 2-94
MODE (Redirect Printing: Parallel to Serial) . . . . 2-96
Contents-2
MODE (Prepare Code Page for Use) . . . . 2-98
~10DE (Select Code Page for Use) . . . . . 2-102
MODE (Reestablish the Current Code Page) . 2-104
MODE (Display Code Page Status) 2-106
MORE . . 2-108
tvl0USE . . 2-110
NLSFUNC 2-112
PAMCODE 2-114
PATH 2-116
PRINT . . 2-118
PROMPT. 2-122
RECOVER 2-124
REDIR . . 2-128
RENAME or REN 2-130
REPLACE 2-132
RESTORE 2-136
RMDIR or RD 2-140
SELECT 2-142
SET . 2-144
SIZE . 2-146
SORT. 2-148
SUBST 2-150
SYS 2-152
TIME. 2-154
TREE 2-156
TYPE 2-158
UX2DOS 2-160
VER . . 2-162
VERIFY 2-164
VOL . 2-166
XDIR . . 2-168
Contents-3
Using the SET Command 3-4
Batch File Conlmands 3-6
ECHO 3-6
FOR. 3-8
GOTO 3-10
IF 3-11
PAUSE 3-12
REM. 3-13
SHIFT 3-14
Contents-4
The COInpare Command 5-13
The Dump Command 5-14
The Enter Comnland 5-16
The Fill COIllInand 5-18
The Go Command . 5-19
The Hex Command . 5-21
The Input Command 5-22
The Load Command 5-23
The Move Command 5-25
The Name COllunand 5-26
The Output Command 5-29
The Procedure Command 5-30
The Quit Command 5-31
The Register Comrnand 5-32
The Search Command 5-35
The Trace Command . 5-36
The U nasselnble Command 5-38
The Write Command 5-40
6. MS-LINK Reference
What MS-LINK is and What it Does 6-2
Definition of Terms . . . . . . . . . . . . . . 6-4
How MS- LINK COlnbines and Arranges Segments 6-6
Files that NIS-LINK Uses 6-9
Input Files . . . . . 6-10
Output Files . . . . . 6-10
Virtual Memory File (VM.TMP File) 6-11
Running ~1S- LINK . . . . . . . 6-11
Working \Vith MS-LINK 6-12
Using the Text-Prompt Nlethod 6-13
Using the Command-Line Method 6-13
Using the Response-File N1ethod 6-15
Creating a Response File 6-16
Command Prompts . . . . . . 6-17
Object Modules [.OB.1]: . . . 6-18
Run File [First-Object-filename.EXE]: 6-19
List File [NUL.N1AP]: 6-19
Lihraries [.LIB]: 6-20
Contents-5
Command Characters 6-21
The Plus-Sign 6-21
The Semicolon . 6-22
CTRL-C 6-22
Optional Switches 6-23
The /DSALLOCATE Switch . 6-25
The /HICH Switch . . . . . 6-25
The /LINENUMBERS Switch 6-26
The /MAP Switch . . . . . 6-26
The /PAUSE Switch . . . . 6-28
The /STACK:<number> Switch 6-28
MS-LINK Examples 6-29
MS-LINK Error Messages . . . . . 6-39
Contents-6
1
Using Reference Information
This manual contains information about MS-DOS (DOS) commands, utilities,
and facilities. The table shows how the manual can help you.
Command Name
You always use a comrnand name. The nanleS always appear in all capital letters
in the documentation, but you can type them in any combination of upper- and
lower-case letters. Most people type all parts of a DOS command, including the
command name, in lower-case letters.
Paths
A path is a series of directories connected by backslashes that leads to a file.
An initial backslash indicates the root directory. A backslash connects the last
directory in a path with a file when you specify a path and file name. A path,
including all backslashes, can contain 63 characters. A path cannot have any
spaces. You can use two types of paths.
Absolute paths. start with a backslash, moving from the root directory to a
file. Consider the following example:
\ utif\ tools\ locaf\ wrench The \utif\tools\local is the absolute path to the
file named wrench on the disk in the current
drive.
Relative paths. do not start with a backslash, moving to a file from the current
directory. Consider the following example:
BASIC LISP
In the example, LANGS is the parent of BASIC and LISP. (The root
directory is the parent of all directories in a file system.)
• A subdirectory is a directory that appears under a directory In the
example for the above item, BASIC and LISP are subdirectories under
LANGS.
Periods separate file names from extensions. A file name can have one to eight
characters. An extension can have one to three characters. A name can have any
combination of upper- and lower-case letters because DOS changes lower-case to
upper-case.
Reserved Characters. Besides not using \, ", <, and > for obvious reasons,
the table shows the characters you cannot use in a file name or extension.
/ + *
space
You can use a hyphen and underscore in file names, and except in cases where
DOS or a command requires an extension, having an extension is optional (for
example, my-junk. txt or my_junk).
Reserved FUe Names and Extensions. Besides not using certain characters,
you cannot use certain reserved file names and extensions.
By using wildcards, you can specify files very efficiently, but using them with
commands such as ERASE, RESTORE, and BACKUP can produce disastrous
or surprising results. A good procedure is to test a comprehensive wildcard
specification with DIR to see what gets listed. Then, use the sanle specification
with a command such as ERASE.
[/ V Ie I P]
I and \ A slash (I) precedes options called switches (for example, IN:xx). A
backslash (\) has two meanings. It separates directories in a path; and
designates the root directory when it is the first entry in a path (for
example, \docs\memos\cleanup.txt has a file named cleanup. txt
in a directory named memos in a directory named docs in the root
directory) .
A vertical bar separates two items when you can use one of the items,
but not both.
An ellipsis implies that you can have more than one entry of the
preceding type (for example, filespecl filespec2 . .. means you might
actually enter rpt 1. txt rpt2. txt rpt3. txt).
Use punctuation such as colons, COlllmas, and equal signs exactly as they appear
in the syntax.
On getting this message, you need to retype the command, preceding the
command with a drive and path to the command's location in the file systeln.
Syntax
APPEND [dl:pathl;d2:path2; ... ] [IX IE]
I L Places search paths in environment
L Redirects programs using DOS func-
tions
Examples
• APPEND loads from a disk the first time you use it. Thereafter, it is a
memory-resident command until you restart DOS.
• You can use IX and IE only when you first execute APPEND. You must
not specify any path names with these switches.
• Not entering drive names uses the current drive.
• When you do specify paths:
o Semicolons must separate the paths.
o A search for data files occurs in the order of paths specified by
APPEND, until the list of directory paths is exhausted.
• The specified paths cannot exceed 127 characters. DOS skips invalid
paths.
• The IX switch enables executable files that use EXEC, SEARCH FIRST,
and FIND FIRST functions to access search paths. The executables
include DOS commands such as COMP, DIR, and TREE. If you don't
specify the switch, only the executable files that use OPEN FILE,
HANDLE OPEN, and GET FILE SIZE can access the APPEND search
paths.
• APPEND; cancels existing search paths.
• When using IE, DOS establishes an environment variable named AP-
PEND. The variable holds the paths set by an APPEND conlmand.
• A file found by APPEND can be read safely by the program, but changes
in the file are saved in a copy placed in the current directory, leaving the
original file intact.
• To use APPEND and ASSIGN, you must execute APPEND before using
ASSIGN.
• Do not use APPEND IX with RESTORE or BACKUP.
Syntax
ASSIGN [dl=d2 ... ]
Examples
• You seldom need to use ASSIGN on a system having recent software and
a hard disk drive. You typically use the command with software that
recognizes only drives A and B.
• Do not assign a drive to a drive that is not on your system.
• You can assign a drive to another drive, but you cannot assign a drive to
itself.
• Do not assign a real drive to a nonexistent drive.
• One command can have multiple assignments, separated by a space. For
example:
c:\util\assign a=c b=c d=c
where, in this case, DOS looks for ASSIGN in c:\ util and assigns drives
A, B, and D to drive C.
• Copy protection schemes used by some programs ignore ASSIGN.
• For a command such as ASSIGN A=F, which uses F or a "greater" letter,
you must have previously set up an appropriate LASTD RIVE command
in CONFIG.SYS.
• You can use a space between the drive letters, the = is optional.
• DISKCOPY and DISKCOMP ignore drive reassignments.
• FORMAT fails when you attempt to format an assi'gned drive.
• Cancel assignments before you use BACKUP, JOIN, LABEL, PRINT,
RESTORE, or SUBST.
Syntax
ATTRIB [±R] [±A] filespec [IS]
Examples
• ATTRIB works best when you use supplemental files such as library files.
Just make the files read-only, and you will not need to worry about writing
over them.
• You cannot modify or delete a read-only file, but you can rename such a
file. The latter practice is not recommended because you might confuse
programs that use the file.
• Not specifying a drive or path uses files in the current drive and path.
• Not specifying filespec causes an error.
• You can use both options in a command, mixing the signs as needed (for
example, +R -A). But do not set an option to on and off (for example
+R -R).
• Copying read-only files does not pass on the read-only attribute to the
new file.
• The archive attribute affects BACKUP and XCOPY when you use then
with 1M. A file is copied when the archive attribute is set and is not
copied when the attribute is not set.
Syntax
~
Backs up subdirectories
I Backs up files modified since last backup
I I Appends new backup files to disk
BACKUP filespec d2: [IS 1M I A ID:date IT:time IF IL:filespec]
• You must specify a source and destination drive. Neither drive can be
used in ASSIGN, JOIN, or SUBST commands. Not specifying a drive
causes an error. For the destination, you specify only the disk drive (for
example, A:).
• Besides the drive:
D You can specify a path and/or file(s) for the source.
D Not specifying a path backs up files in the current directory.
D Not specifying a file or files backs up all files in a directory.
D You can use wildcard characters (* and ?).
• You can use the IF switch to format the disks during the backup.
• You can get several messages concerning a full disk. A hard disk must
have enough room to hold all of the backed up files. If you don't have
enough room, you will need to delete files or otherwise provide for more
storage space, and try again.
• When you back up onto flexible disks, DOS asks you to insert a new disk
after the current disk fills up. Insert an appropriate disk (not one having
Syntax
BREAK [ON I OFF]
L Turns BREAK on or off
Examples
Syntax
CHep [codepage]
Examples
Syntax
Examples
For the examples, assume the following directory structure on drive C:
(The root directory) \
UTILS TOOLS
• Absolute paths start with a backslash. You can then specify subdirectories
in the path as desired (for example, \RPTS\ OLD\JUNE proceeds
absolutely to JUNE).
• Relative paths do not start with a backslash. They assume the current
directory and move down to a subdirectory. For example, if you are in
PROGS, then C\ UTILS is a relative path to UTILS.
• By using .. \ or .. \ .. \ (and so on), you can move up one, two, or more levels
in a relative sense and then specify a directory (for example, .. \ .. \docs).
• A specified path can have up to 63 characters.
• Using an invalid path displays an error message.
Syntax
CHKDSK [filespec] [IF IV]
I ~ IF makes repairs; IV displays messages
L . . .- - - - - Drive, path, and file name for files being checked
Examples
• Not specifying a drive or path uses the current drive and directory.
• If you have a one-drive system and want to check a disk, insert a system
disk in drive A and execute:
chkdsk b:
Syntax
CLS
Examples
You do not need any. Just execute CLS.
• If you set the foreground and background colors with ANSI control codes,
the color settings remain in effect.
• If you did not set the foreground and background colors, the display shows
light characters on a dark background.
• CLS has no effect on DOS; it affects only the display.
Syntax
COMMAND [d:][path] [IE:size IP Ie string]
Examples
• Provide the drive and path when COMMAND. COM is not in the root
directory of the startup disk.
• The string used with the Ie option is interpreted by the copy of the new
CO MMAND. CO M as though you typed string at the system level. If you
use IC, it must be the last option. Do not use the Ie and IP options in
the saIne command.
• COMMAND. CO M is the only processor that can be loaded into memory.
This has several implications:
D Executing COMMAND with no parameters loads a new copy of
the command processor, but the environment remains as it was.
D You can use COMMAND IC batch_name to pass control between
batch files that make DOS behave according to the contents of the
files. When a batch file finishes, COMMAND exits and returns
control to the first batch file.
D You can use COMMAND with Ie and a DOS command such as
CHKDSK.
• If you execute COMMAND with IP, you can use EXIT to get back to
the previous processor level.
• Running programs from a secondary command processor is called running
programs from a shell. Menus for applications are often run from DOS
shells.
• In using IE:size, the size can range from 160 to 32768 in multiples of 16
bytes. Changing the environment of a secondary processor has no effect
on the environment of the primary processor.
Syntax
COMP [jilespecl] [jilespec2]
I LThe drive, path, and files on the 2nd disk
'-.- - - - - - T h e drive, path, and files on the 1st disk
Examples
• Not specifying anything makes COMP prompt you for information about
the primary and secondary files.
• Not specifying drives and paths uses the current drives and paths.
• Not specifying a file name for the primary file uses all the files in the
specified or current primary directory. In the secondary directory, the
Syntax
~
Source file(s) to be copied
Destination file( s) are ASCII (text)
.1 I Destination filets) are binary (programs)
COpy [IAlB] filespecl [IAlB] filespec2 [IAIBIV]
See the "Tips and Hints" section to see how the drives, paths, filenames, and
switches work. Except for specifying files, you have many options for executing
a COpy command.
Examples
• Specify the options (switches) affecting the source ahead of the source
specification. For example, IB c:\ bin\ *. * makes the source consist of all
files in the bin directory in the root directory on drive C.
IA Treat the source files as ASCII (text) files. A command copies
information up to but not including the EOF. (Without a
specification, COpy assumes the source files are ASCII files.)
IB Treat the source files as program (binary) files; which will copy
the EOFs and treat them as normal characters.
• Specify the options (switches) for the destination files after the source
specification. For example, A:\RPT? TXT I A makes a copy in the root
directory on drive A of all files having RPT and one character plus the
TXT extension. You need the I A after the destination files to add an
end-of-file marker to the copies when you use I A with the source files.
D I A means add an end-of-file marker to the copied files.
D IB means do not add an end-of-file marker to copied binary files.
D IV means verify that a copy has been recorded.
Syntax
CTTY device
Examples
• You must specify a character device that can receive input from and send
output to your computer system. You cannot use CTTY with a printer,
for example, because it only accepts output. If you accomplished this,
the system would wait forever for you to type commands on the printer's
nonexistent keyboard. You would need to restart DOS.
• Some programs do not use DOS for standard input and output routines.
Such programs bypass DOS and communicate with the hardware directly,
or they use ROM BIOS I/O routines. CTTY has no effect on these
programs.
• The command was added to DOS so people could use a terminal or
teleprinter for input and output instead of the normal keyboard and video
display.
Syntax
DATE [date_ string]
Examples
Syntax
DEL filespec
I The file(s) to be deleted
Examples
Be sure you know what such a specification will delete. The * wildcard
can produce devastating results. Use DIR to check the files affected by a
specification before using it with DEL .
• Like most commands that alter files, not specifying the drive and path
uses the current drive and path. Not specifying at least one of a drive,
path, or file causes an error.
Syntax
DIR [filespec] [/P /W]
I I I List file names only, 5 per line
Pause when display is filled
Drive, path, and file to the directory
Examples
Syntax
DISKCOMP [d1: d2:] [/1 /8]
I I L Compare first 8 sectors of each track
L=-- Compare first side of each disk
Second disk being compared
First disk being compared
Examples
Syntax
DISKCOPY [dl: [d2:] ] [/1]
I I I Switch designates copying on one side
The drive having the disk getting the copy
The drive having the disk being copied
Examples
o Specifying only one drive makes that drive the source and
destination drives (for example, if you have only one disk drive).
o Specifying only one drive for a system having two drives causes
an invalid drive error.
o Specifying a name twice is the same as specifying one drive.
Syntax
Examples
• You must run the REDIR command before your first use of the
DOS MOUNT command.
• When setting up a redirected drive, you can use drive letters D through
Z, subject to the value of the LASTDRIVE directive in CONFIG.SYS.
• You can specify only one redirected drive each time you run DOSMOUNT.
• When you do not specify the path-prefix, the redirected drive uses the
HP-UX root.
• DOSMOUNT uses the HP-UX location set by the path-prefix as the root
of the DOS redirected drive. If path-prefix does not exist in the HP-UX
file system, a File not found error occurs when the redirected drive is
accessed.
• Since path-prefix is an HP-UX path, it need not conform to conventions
for DOS file names. You can use \ or / as directory delimiters. You must
specify the -t option if a path-prefix contains upper-case letters.
• Use the -t option, which turns of file translation fora specified redirected
drive, with HP-UX directories and files having DOS-compatible names.
HP-UX file names that are not valid DOS names are ignored when using
-to
Tips and Hints continue on the next page.
Syntax
DOS2UX filespec
L The file being converted
Examples
• HP-UX cannot read DOS ASCII files directly. To use a DOS file in HP-
UX, you need to first use DOS2UX to convert the file. For example, to
use vi to edit a DOS file, you should convert the file and then edit it.
• In most cases, DOS2UX works best with redirection and pipelines.
• Not specifying a file makes DOS2UX accept input from the standard input
device, probably the keyboard.
• Unless redirected or piped, the converted output goes to the standard
output device, probably the display.
• The original file that provides input is not changed.
• To get a more complete picture of converting DOS and HP-UX files, see
the UX2DOS command.
Syntax
ERASE filespec
L The drive, path, file(s), and extension(s) to erase
Examples
Be sure you know what such a specification will erase. The * wildcard
can produce devastating results. Use DIR to check the files affected by a
specification before using it with ERASE .
• Like most commands that alter files, not specifying the drive and path
uses the current drive and path. Not specifying at least one of a drive,
path, or file causes an error.
Syntax
EXE2BIN jilespec1 [jilespec2]
I L - I- - Drive, path, and name of the COM file
L - -_ _ _ _ _ Drive, path, and name of the EXE file
Examples
Syntax
EXIT
Examples
Just run EXIT as appropriate.
Syntax
FASTOPEN d: [=nnn ... ]
Examples
o You can use FASTOPEN for several hard disk drives using the
syntax for specifying drives and separating them with a space.
The sum of the values for nnn over all specifications cannot exceed
999.
o Not specifying nnn uses 10. If you specify a value, it should be
greater than the deepest level of directories on the hard disk.
• When accessing a directory or file, FASTOPEN records its name and
location. Then, on accessing a recorded directory or file, the access time
is greatly reduced.
• FASTOPEN differs from BUFFERS. BUFFERS speeds up the system
when DOS reads from or writes to a file, while FASTOPEN speeds up
the system when you re-open a file.
• There is no best value for nnn. The default of 10 works well for most
applications. Using a value greater than 200 can bog down the system.
Try to use a value that slightly exceeds the number of subdirectories and
files you use.
• After you install FASTOPEN, you might specify unacceptable drives
or values for nnn. At this point, you must re-start DOS before trying
FASTOPEN with different parameters.
• FASTOPEN uses about 40 bytes of memory for each directory and file it
tracks.
Syntax
Abbreviates output
Binary, byte-for-byte comparison
Treat all letters as upper-case
ASCII comparison
Set internal buffer size to n (ASCII)
Compress spaces and tabs
Fe [IA IB Ie IL ILBn IW IT IN Innnn] filespecl filespec2
Examples
Syntax
FDISK
Examples
• You must create a primary partition on every hard disk in which you
store DOS files. The primary partition can have up to 32 Mbytes. Your
system sees this partition as Drive C.
• You can create an extended partition on a hard disk. If the capacity
of your disk exceeds 32 Mbytes, you must create an extended partition
to use the additional capacity. The extended partition contains the rest
of the drive. You can segment this partition into as many as 23 logical
drives where each drive can contain up to 32 Mbytes. (You need not do
this in the DOS Coprocessor environment, an HP-UX program does this
for you.)
• The interactive menus provided by FDISK let you create primary and
extended partitions. In addition, you can create logical drives, change
the current partition, delete a partition, and display a partition.
• A logical drive acts like a separate hard drive. Logical drives are named
E:, F:, G:, and so on up to 23 drives.
Syntax
FIND [IV Ie IN] "string" [filespec ... ]
I L Implies more files
L The file to be searched
"---------The search string
L..-----------See "Tips and Hints"
Examples
finds all lines in a zip-code file having 503 and sends the lines to a printer.
Syntax
FORMAT d: [IS /1 /8 /V /B /4 /N:ss /T:ttt]
I I I N umber of tracks per side
Number of sectors per track
Formats low-capacity disks in
1.2 Mbyte drive
Formats for backward compat-
ibility
Write volume label on disk
Examples
Syntax
FOR150 d: [IV]
I L Prompts for writing a volume label on a disk
L The drive containing the disk to be formatted
Examples
• The comnland works only on 3.5 inch, double-sided disks intended for use
in an HP 150 computer.
• The command cannot put the DOS system on a disk. A disk formatted
with this command cannot be used to start DOS.
• A disk must have been previously formatted with a FORMAT command.
You cannot format a new disk with a FOR150 command.
Syntax
GRAFTABL [codepage /STATUS]
I L - I- - - Displays number of active codepage
L - .- - - - - 3-digit number of the code page for the
display
Examples
• Use only· one of the two options per command (for example, do not use
graftabl 437 /status in one command line).
• See MODE CODEPAGE for information about code pages.
• Load GRAFTABL to display characters in the ASCII range of 128 to 255
when you are in the all-points-addressable mode on the Color/Graphics
Adapter.
• GRAFTABL has no effect when you are in text mode. Do not use
the command unless you have a Color/Graphics Adapter being used in
medium- or high-resolution mode.
• You must restart DOS to cancel GRAFTABL.
• The displayed exit codes include:
o GRAFTABL installed successfully for the first time.
1 The code page was changed. When not specifying a new code
page, there is an existing code page.
2 GRAFTABL is installed and no previous code page was
installed.
3 Incorrect parameter, no change in GRAFTABL.
4 You have an incorrect version of DOS.
Syntax
GRAPHICS [printer] [/R /B /LeD /P=port]
I I Sets LPT port (default=LPTl)
Prints from Liquid Crystal Dis-
play
L..--_ _ _ _ _ Prints the background color
L..--_ _ _ _ _ _ _ Prints colors as they appear on
display
' - - - - - - - - - - - - Type of printer (colorl, color4,
color8, compact, graphics, ther-
mal)
Examples
Syntax
JOIN [d1:] [d2:\directory] [/D]
Examples
Syntax
KEYB [keycode, codepage, filespec]
~ Drive and path to file (KEYBOARD.SYS)
I. A 3-digit code page (437,850,863, or 865)
I A 2-character key code (See "Tips and
Hints")
Examples
Syntax
LABEL [d: volume_label]
~ Name of the volume label
I
L - .- - - - - - Letter designating the disk drive to be labeled
Examples
Command Action/Result
label b:main_drive Makes MAIN_DRIVE the volume label for the
disk in drive B.
LABEL Since you did not specify a drive or volume label
such as B:MYDISK), the command displays the
volume for the current drive and asks if you want
to enter a volume label.
• Entering a volume label changes the
existing label.
• Just typing I Return I asks if you want to
delete the current volume label. Entering
Y removes the existing label; entering N
exits LABEL, leaving the volume label
intact.
You use a non-DOS disk DOS reports an error arid does not label
the disk.
You enter an invalid volume label DOS displays a warning and asks for a
valid volume label.
• Not specifying the drive, d:, ahead of volume_label changes the name of
the disk in the current disk drive. Specifying the drive is safer.
• Do not label a SUBSTituted or ASSIGNed disk drive because DOS will
label the real disk drive instead of the one you expect.
• Use the VOL command to see the existing label on a disk.
Syntax
MKDIR [d:path]\directoryname
II L
Narne of directory you want to make
Path to the directory
Narne of the disk drive containing the direc-
tory
Examples
Command Action/Result
mkdir c: \john\ltrs\personal Makes a directory named personal on drive C
under the path named \john\itrs.
md junk.dir Makes a directory named junk on the current
drive under the current directory. The directory
has an extension named dir.
• Do not create a directory having the same name as an existing file (e.g.
reports (a file) and reports (a directory)). You could have reports. txt (a
file) and reports (a directory). You could also have ltrs.txt and ltrs.dir.
• A maximum path can have 63 characters including backslashes. Try to
make an efficient and comprehensible set of directories.
• A backslash must separate path from direetoryname (e.g. given \ users\ bill
and mise, you have \ users\ bilf\ mise).
• Specifying d: but not path makes a directory under the current directory
on the disk drive. Specifying path but not d: makes the directory under
the path on the current disk drive.
• MKDIR can work with an ASSIGN, JOIN, or SUBST. Be careful. See
the information about these commands before using them with MKDIR.
You can easily create directories where you do not want them.
• Use RMDIR to remove directories; TREE to see existing directories, and
APPEND or PATH to access other directories.
Executing MODE
You typically execute MODE with a parameter such as LPTx:, COMy:,
PREPARE, or SELECT. This means you need to know when to use MODE
as-well-as how to use it. Besides using this reference material, read appropriate
sections in the user's guide because some versions of MODE need to be executed
in specific ways in a specific order.
Examples
Syntax
MODE dt
or
MODE [dt,] s, [T]
I I L Display type (40, 80, bw40, bw80, co40, co80, mono)
Shifts the graphics display right or left (R or L)
Aligns graphics screen with one-line test pattern
Examples
Syntax
MODE COMy: baud[,parity,databits,stopbits,P]
~
~ Retries on time-out
Number of stop bits (1 or 2)
Number of data bits (7 or 8)
Examples
Syntax
MODE LPTx: [= COMy:]
I 1- y: is the async. comm. adpt. no. (1,2,3, or 4)
L - x: is the parallel printer number (1, 2, or 3)
(The colons are optional)
Examples
• Use this command when your system has only a serial printer or when
your system has two printers and you want to print to the serial printer.
• You must use a valid number for the parallel and serial printer.
• After you execute the command, output from executing I Shift HPrtSc I goes
to the serial printer.
• Use MODE COMy: to set up the serial adapter used for the serial printer
before you use MODE LPTx: = COMy: to redirect printing.
• Cancel the command and return printing to the parallel printer by
executing MODE LPTx: where x: is the parallel printer number you
used in MODE LPTx: = COMy:.
Syntax
MODE device CODEPAGE PREPARE = ([ codepage, codepage, ... ] [page_filespec])
Prepares a code page for the console using multilingual and Canadian fonts. The
command looks for EGAjVGA displays file,ega.cpi, in the root directory on drive
C.
Here is a second example:
mode Iptl cp prep = ( .. 437) c:\4201.cpi
The example shows how to replace one code page and retain previous code pages.
The 437 code page replaces the code page held in the 3rd position; in this case,
you have an IBM ProPrinter connected to the first parallel port using the IBM
ProPrinter information file in the root directory for drive C.
Tips and Hints appear on the following page.
• Use 1-10DE CODEPAGE PREPARE to prepare code pages that set the
fonts for printers, the console keyboard, and the display. Execute the
command before executing the MODE CODEPAGE SELECT subcom-
mand.
• The IBM Quietwriter III printer is an exception because cartridges hold
the font information. No MODE CODEPAGE PREPARE command is
required when a cartridge has the required code page and the code page
has been specified to the PRINTER.SYS driver.
• Memory holds prepared code pages in the specified order. Executing
additional MODE CODEPAGE PREPARE commands replaces code
pages only in the corresponding positions.
• You must specify device, CODEPAGE, and PREPARE. You can substi-
tute CP and PREP, respectively.
• You must specify at least one code page. Separate additional code pages
by commas and enclose the list in parentheses.
Syntax
MODE device CODEPAGE SELECT = codepage
• You must specify device, CODEPAGE, and SELECT. You can substitute
CP and SEL, respectively.
• The specified code page must be either:
1. part of a MODE CODEPAGE PREPARE for a device; or
2. the hardware code page specified to the device driver.
• MODE SELECT activates code pages for individual devices. Use the
CHCP command to activate the code pages for available devices .
.. MODE SELECT completes the downloading of any software font to a
device. The IBM Quietwriter III printer is an exception because it uses
cartridges. When you select a code page, the printer beeps. Make sure
the appropriate cartridge is in the printer because DOS cannot check this.
Using an inappropriate cartridge can print nonsense characters.
• MODE SELECT activates only a prepared code page or reactivates a
hardware code page.
• You must specify device, CODEPAGE, and REFRESH. You can substi-
tute CP and REF, respectively.
• MODE SELECT completes the downloading and reactivation of any
software font to a device. Therefore, use the command when you turn
a printer OFF and ON or after a program scrambles the display.
• If you don't give a code page, MODE REFRESH uses the last selected
code page for the device.
Syntax
MODE device CODEPAGE /STATUS
Examples
In this case, the device is using the hardware code page and will use this
page until you use MODE with SELECT or you use CHCP to select a
different code page.
Syntax
MORE
Examples
• As a DOS filter, MORE accepts input and displays it on· a screen one line
at a time. When the output exceeds the size of the display, you see this
message:
-- more --
Syntax
MOUSE [/Cn ISn IHn IVn IDn]
See "Tips and Hints" for descriptions of the options.
Examples
• Before you run a MOUSE command, you must assign the mouse to a
COM port via the Device Configuration Menu (when you install DOS)
or the dos. en! file. The following entry shows how you could assign the
mouse to COM2 by modifying the COM2 line in dos.cnf:
COM2 MOUSE:/dev/locator
• The mouse emulation program increases the resident size of DOS and
remains in memory until you restart DOS.
• Including a MOUSE command in your AUTOEXEC.BAT file loads
support for the mouse each time you start up DOS.
Syntax
NLSFUNC [filespec]
L Drive, path, and file containing country information
(COUNTRY.SYS in DOS 3.3)
Examples
Syntax
PAMCODE ROOT [/P]
L- Permanently loads the PAM command processor
Examples
Syntax
PATH [dl:]pathl;[d2:]path2; ., .
1
....- - _ List of drives and paths containing DOS commands and
executable files (do not include a filename or extension)
Examples
• Use PATH to make DOS search your hierarchial file system, saving you
the need to type drives and path names for commands and batch files.
• PATH applies only to commands, programs, and batch files having COM,
EXE, or BAT extensions.
• The order of the specified drives and paths determines the search through
directories for a command or batch file.
• Separate drive names and paths with colons and specifications with
semicolons (for example, c: \bin; a: \).
• Not specifying a disk drive name for a path causes PATH to use the
current disk drive.
• PATH might not always apply. Some applications expect files for data
and libraries to be in your working directory.
• Specify absolute paths, not relative paths. That is, start paths at the
root directory (for example, c: \bin\util \local instead of something
like util \local).
• You can use APPEND to specify search path(s) for data files.
Syntax
/D:device
/B:bu/size
PRINT
/M:maxtick
/ Q:maxfiles Lfiles~c1 ~~]
J [ .,.
/S:timeslice
/U:busytick
In the syntax, you can specify additional files: filespec2 and so on. See the section
called "Tips and Hints" for information about the options.
Examples
Syntax
PROMPT prompLstring
1
....._ _ _ The string (meta-string) for the prompt
Examples
• Meta-strings let you use special characters. Each meta-string starts with
$ and has one additional character (for example, $t). Within practical
limits, you can use several strings and meta-strings in a prompt.
$_ Does a CR LF sequence (moves the cursor to the next line).
$b Produces a vertical bar (that is, $b displays I).
$d Displays the date (for example, Wed 7-20-1988).
$e Produces an Escape character, ASCII IBh.
$g Displays the greater-than character (».
$h Does a backspace, which erases the previous character.
$1 Displays the less-than character «).
$n Shows the current disk drive in the prompt.
$p Shows the current disk drive and path through the current
directory (for example, C:\DOS\,BASIC).
$q Displays the equal character (==) .
$t Shows the time in the prompt (for example, 9:54:12.14).
$v Shows the version number of your DOS.
other Ignored (for example, $k does nothing).
• A new prompLstring becomes the system prompt until you restart DOS or
execute another PROMPT. You can use PROMPT in AUTOEXEC.BAT
files.
• To start a prompt with a DOS delimiter (blank, space, colon, and so on),
precede the character with a null meta-string (for example, $A).
• Use SET to see the prompt string after setting it.
Syntax
RECOVER filespec
L The drive, path, and file name.
Examples
• RECOVER has serious limitations and can do things you may not like.
Study the command and tips/hints before you do anything.
• If a sector on a disk causes read/write errors, RECOVER can be used to
recover either the file containing the sector (minus the bad sector) or the
entire disk if the bad sector is in the root directory.
• RECOVER asks about beginning recovery. If you decide not to continue,
use I CTRL HBreak I to stop execution. Otherwise, press any key to begin.
DOS reads the file sector-by-sector, skipping over bad sectors, marking
them as defective so DOS will not use them, and placing good sectors in a
file having the specified name. After recovering good sectors, RECOVER
displays:
nnnnnn of mmmmmm bytes recovered
where xxxx is the number of recovered files. Noticing how the command
can possibly move files and remove subdirectories, you can imagine
potential problems. A DIR will display something like:
FILE0001 REC 5120 10-20-88 9:55a
FILE0002 REC 2048 10-20-88 9:55a
Syntax
REDIR [-F -/ -Q -0]
II L Send redirector error messages
Prohibit redirector from generating INT 24th errors
Install the redirector, but do not enable
L...-_ _ _ Force installation even with another installed redirector
Examples
Syntax
RENAME old_filespec new_file
1_-
1'-- Name of new file
L..-_ _ _ _ _ _ _ Specification of old, original file
Examples
• You can easily make mistakes and rename the "wrong" file. It is better to
carefully specify a drive and path than to assume you are in an appropriate
drive and directory.
• You must specify an old (existing) file and a new (renamed) file.
• Since you rename an existing file, the new file has the same drive and path
so DOS will know which file is being renamed. Do not specify a drive or
path for the new file.
Syntax
REPLACE source_filespec [d:path] [IAlPIRISIW]
,
II I Pause to insert disk
, Replace in subdirectories
Replace read-only files
'------- Prompt before adding file
~----- Add new files
' - - - - - - - - - - Destination directory
' - - - - - - - - - - - - - - - Directory containing source
files
Examples
Syntax
Example
• Use the following switches to control a restore. Do not use switches lA,
IB, and IN in the same command.
IS Restores files in the specified directory and its subdirectories.
IP Prompts for decisions about restoring hidden or read-only
files and files that were changed since the last backup. This
switch works well when you use the 1M switch.
1M Restores files that were modified or deleted since the last
backup. A file is modified when its archive flag is on. Use
this switch after having a disaster such as when the current
copy of your modified files is bad, and you have erased files
from your hard disk.
IN Restores backed up files that no longer appear in the
specified directory on the destination disk. To restore erased
files use the 1M switch, and then use the IN switch.
Tips and Hints continue on the next page.
Exit Codes
The RESTORE command displays exit codes. Zero indicates a normal
completion of a restore. Otherwise, you can get the following codes:
1 No files were found to restore
2 Some files were not restored due to conflicts in sharing
3 The restore was terminated by the operator via a I CTRL HBreak I or an I Esc I
4 The restore was terminated by an error
Syntax
RMDIR [d:]path
L-=. The path to the subdirectory to be removed
The drive containing the subdirectory
Examples
• The subdirectory must be empty except the current directory file (.) and
any parent directory files ( .. ).
• You cannot remove the current directory. The removed directory must be
a relative subdirectory or a different directory given by an absolute path.
• You cannot remove the root directory.
• Not specifying a drive uses the current drive.
Syntax
SELECT [ [ds:] dd:[pathd] ] countrycode keycode
Examples
Austria 061 US
Belgium 032 BE
English Canada 001 CE
French Canada 002 CF
Denmark 045 DK
Finland 358 SU
France 033 FR
Germany 049 GR
Italy 039 IT
Latin America 003 LS
Netherlands 031 DT
Norway 047 NO
Spain 034 SP
• SELECT uses FORMAT to format the target disk (the disk that gets
the files). Consequently, using SELECT on a disk having information
destroys the information.
• Drive A is the default source drive, drive B is the default destination.
• The source drive must be drive A or drive B.
• Any drive except the source drive can be the destination drive.
• If the destination path does not specify a directory, SELECT copies files
into the root directory.
Syntax
SET[ name= [string]]
I L-The string to be assigned to name (e.g., $p)
" ' - - - - - - The name of the string in the environment
Examples
set coms.pec=C: \apps \command . com Sets the string called COMSPEC to
"C:\apps\command.com" .
The idea is to note requirements for applications and use SET in AU-
TOEXEC.BAT files to make the application work effectively. For exam-
ple, some programs use environment variables (see their documentation).
SET can set the values of these variables in the AUTOEXEC.BAT file for
an application.
• An environment string should not exceed 121 characters. DOS enforces
this by limiting the command line to 127 characters.
• DOS cannot expand the environment when you load resident programs
such as MODE, GRAPHICS, KEYB, or PRINT. The default, initial size
of the environment is 160 characters. The initial size can be increased
to a maximum of 32768 characters by using the SHELL directive in
CONFIG.SYS.
Syntax
SIZE [filespec] [d:]
Will show space needed for a copy to the drive
Specifies directory for showing. sizes of files
Examples
• When you deternline the sizes of files, the following exanlple shows a
typical listing:
size (c) Ace Software 1987
report1.txt 3425
myreport.txt 458
Syntax
SORT [/R /+c]
L---=. Starts sorting at column number c
Sorts in reverse order (Z to A)
Examples
Syntax
The syntax varies according to your purpose.
Establishing an Alias
SUBST dl: d2:pathname
Deleting an Alias
SUBST dl: /D
I 1- Forces the deleting
~- Existing virtual disk drive to be deleted
Syntax
SYS [d:]
L The name of the drive receiving the copy of DOS system files
Examples
• You can use SYS to put DOS on application work disks. If you also copy
COMMAND. COM onto the work disk, you can boot your system from
the application disk.
• You must specify the drive name that gets a copy of DOS, and the current
drive must contain files named IBMBIO.COM and IBMDOS.COM.
Otherwise, SYS prompts you to insert a disk in the current drive having
these files.
• To make a system disk a bootable disk, you must also copy COM-
MAND. COM onto the disk.
• A disk getting a copy of DOS must be completely empty, or must have
been formatted with one of the following:
o The /S option (versions 1, 2, or 3).
o The /B option (versions 2 or 3).
Alternatively, the disk could be formatted with a utility program that
reserves space for the operating system. Otherwise, you get a message
saying there is no room for the system.
• A system disk cannot start up DOS unless IBMBIO. COM and IBM-
DOS. COM are the first two files in the root directory (even though DIR
does not list these files). In addition, IBMBIO. COM must reside in con-
secutive sectors. Not meeting these conditions causes an error.
Syntax
TIME [hh:mm:ss.xx]
II L Hundredths of a secoud (0 to 99)
Seconds (0 to 59)
Minutes (0 to 59)
~--- Hour (0 to 23)
Examples
• The delimiters (colon and period) can vary, depending bn the setting of
the country code in CONFIG.SYS.
• You must enter the correct delimiters between numbers. The United
States and similar countries use only the period to separate seconds from
hundredths. Some countries use a comma.
• You do not need to provide all values. For example, 10:23 changes the
hours and minutes and leaves the seconds alone.
• Not entering a valid time or delimiter causes an error.
• In the DOS Coprocessor and SOFTPC, time is set from the HP-UX time
when you start up DOS. Changing DOS time does not change HP-UX
time or the time on the battery-backed clock on your computer.
• The main reason for setting the time is to maintain information about
when you create or change files and directories.
• When you start DOS without PAM or an AUTOEXEC.BAT file, DOS
always prompts you to enter the time and date. If you have an
AUTOEXEC.BAT file, DOS does not prompt for the time and date unless
the file contains TIME and DATE commands.
Syntax
TREE [d: IF]
I L Makes TREE also display the files
L The disk drive having the directories you want to see
Examples
• The output from TREE can become cluttered. It is often better to redir.ect
the output to a printer, and then study the tree in detail.
• TREE does not provide information about dates, times, and sizes.
• Getting a printed copy of the output from TREE is useful when you
backup your system. Store the printout with the backup disks so you can
see what the file system looked like.
Syntax
TYPE filespec
L The drive, path, and file to be displayed (The drive and path
are optional)
Examples
• Not specifying a drive or path uses the current drive and directory.
• The specified file must match a file in the specified or current directory.
• You cannot use wildcard characters in the file specification.
• The command sends all characters in a file to the display, including
control characters. The command expands a Tab character, Control-I,
and CHR$(9) to the next 8-character column.
• TYPE does not work on a directory, only on a file.
• TYPE works well in pipelines and with redirection.
• If you want to pause the display when the number of lines in a file exceeds
23, pipe the output to MORE.
Syntax
UX2DOS filespec
L The file being converted
Examples
• DOS cannot read HP-UX ASCII files directly. To use an HP-UX file in
DOS, you need to first use UX2DOS to convert the file. For example, to
use a word processor running on DOS to edit an HP-UX file, convert the
file and then edit it.
• In most cases, UX2DOS works best with redirection and pipelines.
• Not spe.cifying a file makes UX2DOS accept input from the standard input
device, probably the key board.
• Unless redir~cted or piped, the converted output goes to the standard
output device, probably the display.
• The original file that provides input is not changed.
• To get a more complete picture of converting DOS and HP-UX files, see
the UX2DOS command.
Syntax
VER
Examples
MS-DOSCommands 2-163
VERIFY
Internal, Version 2 to present
Turns the disk write verify switch off and on.
Syntax
VERIFY [ON I OFF]
I 1- Turns the verify status off
~ Sets the verify status
Examples
Syntax
VOL [d:]
LThe name of the disk drive
Examples
• The command shows the volume label for the current drive if you do not
specify a drive .
• You can create a volume label when using the FORMAT or LABEL
commands.
Syntax
[In IP IV]
II
XDIR [filespec]
L Displays version number
Pauses listing
Lists only subdirectories, no .files
L.....-_ _ _ _ _ _ The drive, path, (and file) to list
Examples
• XDIR is helpful for listing files on drive D, the drive having the HP- UX
files.
• In particular, XDIR shows DOS file names, sizes in bytes, dates and times
last modified, HP-UX file permissions, user/group ownerships, and HP-
UX file names. For example, you might see the following:
<OIR> 7/02/88 2:38p [rwrwrw] <115,016> ..
BIN <OIR> 10/02/88 2:38p [rwrwrw] <115,016> bin
1876 8/11/88 4:06p [rwr-r-] <115,016> load_dos
• Not specifying a drive or path uses the current drive and path.
• Specifying a file lists information only for that file. You can use wildcards
to list a group of files. XDIR makes the following assumptions about
specifications:
XDIR filename means XOIR filename.*
XOIR .ext means XOIR *.ext
The example executes a batch file named runprog.bat in the current directory of
the active drive.
To execute this batch file, you must include two parameters in the command line
to provide values for %1 and %2. The command line:
C>replace a: b:
substitutes a: for %1 and b: for %2. The command lines which will actually he
executed are:
type replace. bat
dir a:
chkdsk b:
copy a:.*. * b:
If the command line contains fewer replacement values than the number of
replaceable parameters in the batch file, the unspecified parameters will be
deleted. For example, if the example above had been invoked with only one
replacement value:
C>replace a:
the batch command file would execute the following MS-DOS command lines:
type replace.bat
dir a:
chkdsk
copy a:*.*
The number of variables can be effectively increased from 10 with the use of the
batch command SHIFT. This command is discussed later in this chapter.
To use this name in a batch file, enclose it in percent signs, as in this one-line
batch file:
type %FILE%
When this batch· command file is executed, the file example. txt will be typed.
The MS-DOS environment is lost when the system is rebooted. Therefore, the
ECHO
Purpose
The ECHO command turns the screen display on or off during batch commands,
or displays a message.
Syntax
ECHO [ONIOFFI<message>]
Operation
ECHO ON displays all command lines as they are executed. This is the default
state.
ECHO OFF suppresses the display of command lines as they are executed.
However, the output from the commands and application programs themselves
will be displayed.
ECHO followed by a message displays the message regardless of the current
ECHO state (ON or OFF). This form of the command functions identically to
the REM command, with the exception that the message is displayed even in the
ECHO OFF state.
If the ECHO command is entered with no additional parameters, the current
state (ECHO ON or ECHO OFF) is displayed.
A>ECHO
ECHO is on
A>DIR A:/W
A>
Notes
Purpose
The FOR command allows iterative execution of MS-DOS commands.
Syntax
Operation
The FOR command accepts three argurnents: variable, set, and command:
variable A positional variable consisting of any singie character. (It is
best to avoid the digits 0 - 9 and hence any conflict with the
positional arguments.) The variable is made equai to each value
in set.
set A series of values (such as file names) separated by spaces, or a
file name with one or more wildcard characters. Below are two
examples of valid sets.
(CHPT1.TXT CHPT2.TXT INDEX. TXT)
(*. TXT)'•
command The command line executed at each iteration of the loop.
Each time the variable is made equal to a value in the set, the command line after
DO is executed. In most cases the variable will be included in the command line.
%%A is set to the file name of each chapter (chptl. txt, chpt2. txt, etc.) and the
command lines:
index chptl.txt
index chpt2.txt
are executed.
Notes
1. The FOR command may not be nested. Only one FOR command can be
included in each command line.
2. Path names are allowed in the set of variables.
3. The FOR command may be run from the MS-DOS command prompt.
The only difference is that the variable need only be preceded by one
"%".
Purpose
The GOTO command transfers control to the line following a label.
Syntax
GOTO <label>
Operation
The label can be any string of characters. However, only the first eight characters
are used by DOS. A label must be preceded by a colon (:) and there can be no
other commands in the line. The GOTO command will execute the command on
the line following the label. The following example will transfer control to the
REM command following the label :TWO.
goto two
:two
rem label two
Notes
1. The GOTO con1mand can be used with the IF command. This provides
IF -THEN branching in batch command files.
2. Labels within a batch file are not displayed when the batch file is executed.
Anything on the same line as the label is ignored. Thus, a label which is
not referenced may be used as a comment line and will not be displayed
when the batch file is executed.
Purpose
Allows conditional execution of MS-DOS commands in batch files.
Syntax
Operation
The IF command examines the condition, and executes the command if the
condition is true. If NOT precedes the condition, the command line is executed
when the condition is false. IF can test for the following conditions:
ERRORLEVEL number This condition is true if the previous pro-
gram executed had an exit code of number
or higher. An exit code is set by a specific
program. It is returned to the operating
system when the program has finished.
stringl >==string2 This condition is true if the two strings are
identical. Either or both strings may be
replaceable parameters. For example:
IF %l==EXAMPLE
IF %1==%2
EXIST [d:] [filespec] This condition is true if the file specified
exists. The file name may include the
wildcard characters.
Note
BACKUP, FORMAT, GRAFTABL, REPLACE, and RESTORE can return
an ERRORLEVEL. This facility is provided for programs that may return an
ERRORLEVEL that can be tested by this command.
Purpose
The PAUSE command suspends execution of a batch file and allows you to display
a message or an instruction to be performed before resuming.
Syntax
PAUSE [<message>]
Operation
The PAUSE command will temporarily suspend execution of a batch command
file. An optional message of up to 121 characters may be displayed. This will be
followed by the prompt:
Strike a key when ready ...
Pressing any key except I CTRL HBreak I or I CTRL HfJ will resume execution of the
batch file. (Pressing either of these key sequences will terminate the batch file.)
The PAUSE command is useful for issuing instructions to the user, and allowing
sufficient time to execute those instructions. For example, the PAUSE command:
pause Insert disc in drive A:
Notes
1. If ECHO is OFF, the optional message will not be displayed. However,
the Strike a key when ready prompt will be displayed.
Purpose
The REM command displays a message on the screen.
Syntax
Operation
The message can be any string up to 123 characters in length. If the ECHO is
OFF, the message is not displayed.
The following command line:
rem Copy successfully completed.
will display:
Copy successfully completed.
Purpose
The SHIFT command allows access to more than 10 replaceable parameters.
Syntax
SHIFT
Operation
Each time the SHIFT command is executed, the values assigned to the replaceable
parameters are shifted; %1 becomes %0, %2 becomes %1, and so on. The tenth
value entered in the command line is assigned to %.9.
With SHIFT, the limit of 10 replaceable parameters can effectively be removed.
However, only 10 parameters can be active at anyone time, and there is no
way to retrieve parameters which have been "shifted out" (i.e. once a SHIFT is
executed, the parameter %0 that existed before the shift cannot be recovered).
For example,-suppose a batch file named test.bat contains four replaceable
parameters %0 thru %3. The batch file is executed with five replacement values:
test valuel value2 value3 value4 value5
The original value of %0 is lost, all values are shifted down one position, and the
fourth replacement value given on the command line is used for %3. Another
shift would use the final value on the command line, and produce the following
values:
where:
path Specifies the path to the file name you wish to create or
edit. If omitted, the current directory and active drive are
assumed.
file name Specifies the file you wish to create or edit.
/B Instructs EDLIN to ignore any embedded end-of-file marks
(I CTRL H~) in your file and process the entire file. This is
useful for editing files which are known to contain embedded
end-of-file marks.
Caution When you create or edit an EDLIN file, be certain there is enough
space on the specified disc to save the file; if there is not enough
space, you risk losing part of your data wh~n you attempt to save
it on the disc.
allows you to edit the file text. txt in the bin\ user\ioe subdirectory.
• With the exception of the Edit command, all commands consist of a single
letter.
• With the exception of the End and Quit commands, commands may be
preceded and/or followed by parameters.
• Commands and string parameters may be entered in either uppercase or
lowercase letters, or a combination of both.
• Commands and parameters may be separated by delimiters for readabil-
ity; however, a delimiter is only required between two adjacent line num-
bers. Delimiters are spaces or commas.
For example, to delete line 6, the command 6D is the same as the command
6 D.
• You can refer to line numbers relative to the current line in your EDLIN
file. Use a minus sign (-) followed by a number to indicate a line preceding
the cu~rent line. Use a plus sign (+) followed by a number to indicate a
line following the current line. For example:
-10,+10 L
displays 10 lines preceding the current line, the current line, and 10 lines
following the current line. Note the use of the comma between adjacent
line numbers.
Mnewpage>
• You can enter multiple commands on one line usmg an appropriate
separator. When you enter an Edit command «line», subsequent
commands must be separated from <line> by a semicolon. For all
other commands, one command may follow another separated by either a
comma or a space. In the case of a Search or Replace command, however,
<string> must be ended by I CTRL HI] instead of I Return I.
In the next example, the command instructs EDLIN to search for "This
string", then display the preceding five lines and the following five lines
containing the matched string. If no match is found for the search string,
the lines listed will be those lines relative to the current line:
S This string ICTRLI-QD -5.+5L
• You can insert a control character (such as I CTRL ~@]) into text by
preceeding it with I CTRL HI), then typing the letter (such as C) without
I CTRL I. I CTRL ~[YJ tells MS-DOS to recognize the next letter as the
corresponding control character.
You can also use a control character in any of the string argmnents for
the Search or Replace commands using this method. For example:
D S I CTRL ~[YJ Z is the command to search for the first occurrence
of I CTRL ~0 in a file.
D R I CTRL ~[YJ Z [CTRL ~0 f 00 is the comnland to replace all
occurrences of I CTRL H~ with "foo".
D S I CTRL ~[YJ C I CTRL 1-0 bar is the command to replace all
occurrences of I CTRL H~J with "bar".
D To insert I CTRL ~[YJ into the text, simply type I CTRL}[YJv.
• The I CTRL ~0 character is read as an end-of-file mark by EDLIN. If
I CTRL ~0 appears in your file, you use the IB switch to tell EDLIN to
ignore these control characters and show you the entire file.
• The current line is the last line edited or the line currently being edited.
EDLIN marks the current line with an asterisk (*). For example:
1: This is the first line of my new file.
2: *
• As with MS-DOS commands, EDLIN commands become effective only
after you press I Return I.
b. Enter a pound sign (#) to specify the line after the last line in
memory. This has the same effect as specifying a number greater
than the number of lines in memory.
c. Enter a period (.) to specify the current line. The current line
indicates the location of the last change to the file, but it is not
necessarily the last line displayed. The current line is marked by
an asterisk (*) between the line number and the first character of
text in the line. For example:
10:*FIRST character of text
2. <n> indicates you must specify the number of lines. This parameter is
used only with the Write and Append commands. Thus, when you use
the <n> parameter, you enter the number of lines you wish to load from,
or write to, the disc.
3. <string> indicates you must enter one or more characters to represent
text to be searched for, replaced, or deleted. This parameter is used with
the Search and Replace commands. Each <string> must be terminated
by I CTRL ~m or I Return I (see the Replace command for details). No spaces
should be left between a string and its command letter, unless you want
those spaces to be part of the string.
Purpose
The Append command adds the specified number of lines from a disc file to the
end of the file being edited in memory.
Syntax
[<n>]A
<n> is the number of lines you wish to append from your disc file to the
file in memory.
Operation
When you start ED LIN and specify an existing file, ED LIN will load lines until
memory is 75% full.
If your file is too large to load completely, you will have to edit that portion of
the file that was loaded, then save some of the edited lines to the disc in order to
free memory for more lines. You can then load the remaining lines into memory
using the Append command. (Refer to the Write command for information on
how to save edited lines to a disc.)
If you do not specify the number of lines to append, lines are appended to memory
until available memory is 75% full; no action will be taken if available memory is
already 75% full.
When the Append command has read the last line of a file into memory, the
message:
End of input file
is displayed.
Example
To load 23 lines from the specified disc file to memory, enter:
23a
Purpose
The Copy command copies a range of lines to a specified line number. If you use
the <count> option, the Copy command can be repeated a specified number of
times.
Syntax
Operation
If the <count> parameter is not specified, lines are copied once.
If either first line or last line is omitted, the default is the current line. This
results in the current line being copied to that location.
Your file is renumbered automatically after the copy is completed, and the first
of the copied lines becomes the current line. For example:
1.5.8c
copies lines 1 through 5 to line 8 and line 8 becomes the current line.
If line numbers overlap, you will receive the following error message:
Entry error
is in error because it instructs EDLIN to copy lines 3 through 20 and insert them
before line 15.
When copying is completed, EDLIN displays the * command prompt.
Examples
Assume the following file is in memory and ready to edit:
1: People usually pOint at what they want,
2: which is why Hewlett-Packard developed
3: HP Touch -- a special touch sensitive
4: screen that's available with
5:*HP Series 300 computers.
To copy lines and place them within this text, you must specify <dline> to tell
EDLIN where to put them. To copy lines 2 through 5 and place them before line
7, enter:
2,5,7c
Purpose
The Delete command deletes a specified range of lines in a file.
Syntax
[<fiine>] [, <lline>] 0
<fiine> is the first line in the range of lines to be deleted.
< lline > is the last line in the range of lines to be deleted.
Operation
EDLIN supplies default values for the first line and the last line if one or both
are omitted. If you omit the first line, as in:
, <lline>d
deletion begins with the current line and ends with the line specified by <lline>.
The comma is required to indicate the missing first line parameter.
If you omit the last line parameter, as in:
<line>d or <line>,d
enter the following EDLIN command, which deletes from the current line (3) to
line 6:
,6d
Purpose
The Edit command allows you to edit one line of text.
Syntax
[<line>]
<line> is the number of the line you want to edit; it may be expressed as a
decimal integer, a pound sign (#), a period (.), or I Return I.
Operation
Any of the entries for <line>, described in the section on EDLIN Command
Options, can be used depending on the line you wish to edit.
When you have specified a line number and pressed I Return I, EDLIN will display
the line; below the line to be edited, EDLIN will display the line number. If you
only press I Return I, EDLIN will assume you meant the line after the current line.
To replace the line with a n~w line, simply type the new line and enter it into your
file by pressing I Return I. If you wish to edit the line without retypi"ng it, you can
use any of the MS-DOS editing keys described in the chapter titled "Executing
Commands" in Using the Series 300 DOS Coprocessor. The existing line serves
as the template until the I Return 1 key is pressed.
If you decide not to edit the line, you can keep the present line by positioning the
cursor under the first character or past the last character on the line and pressing
I Return I. Use the arrow keys to move the cursor.
To edit the fourth line, enter the line number, press I Return I, and see the following
display:
4:*four.
4:*
You can either continue to add lines starting with line 5, or leave the edit mode
by pressing I Return I.
Purpose
The End command ends the editing session, saves the edited file on the disc, and
returns you to the MS-DOS command prompt.
Syntax
Operation
The End command saves the edited file on the disc under the name entered
when you accessed EDLIN, renames the original input file by adding the .BAK
extension, and exits EDLIN. If the input file was created during the editing
session, no .BAK file is created.
Because the End command has no options, you cannot tell EDLIN on which drive
to save your file. Your file will be saved on the disc in the current directory of the
active drive unless you named a different drive and directory when you entered
EDLIN.
Caution You must be certain that your disc contains enough free space
for your entire file. If there is not enough space available, the
save operation will be aborted and all or part of your file will
be lost. In this case, your original file will not be renamed with
a filename extension of .BAK, and the portion of data that was
saved to the disc, if any, will have an extension of .$$$.
When your End command has been executed, you will be returned to the MS-
DOS command prompt.
Purpose
The Insert command inserts lines of text immediately before the specified line.
When you create a new file, the Insert command allows you to begin writing
(inserting) lines.
Syntax
[<line>] I
<line> is the line number before which you wish to insert lines.
Operation
When you enter the <line> Insert command, lines are inserted immediately
before the line number specified. Entering the Insert command without
specifying <line>, or by specifying <line> as a period (.), causes lines to be
inserted immediately before the current line. Successive line numbers appear
automatically each time a line is entered by pressing I Return I.
When the insert is completed, the line immediately following the inserted lines
becomes the current line, and all line numbers following the inserted lines are
incremented by the number of lines inserted.
If you specify a line number greater than the last line in your file, or if you specify
the pound sign (#) as the line number, lines are inserted after the last line in
memory. In this case, the last line inserted becomes the current line.
Press I CTRL HBreak 1or I CTRL H1J to leave Insert mode and return to the EDLIN
prompt.
and press I CTRL H~]' Now enter L to list the file. The result is:
1: This is a sample file used to demonstrate
2: dynamic line number generation
3: See what happens when you use
4: First new line of text
5: Second new line of text
6:*Delete and Insert
7: (the D and I commands)
8: to edit text
9: in your file.
Purpose
The List command displays a specified range of lines; the current line remains
unchanged.
Syntax
Operation
If you enter the List command with both options specified, the specified range
will be listed. Default values are supplied by EDLIN if one or both of the options
are omitted.
If you omit both options, 23 lines will be displayed-II lines before the current
line, the current line, and 11 lines following the current line. If there are fewer
than 11 lines before the current line, additional lines following the current line
will be displayed to make a total of 23 lines.
If you omit the first line option and specify the last line option, as in:
• <line>L
listing will begin 11 lines before the current line and end with the specified last
line. (Note that the beginning comma is required to indicate the omitted first
option.) If the specified last line is more than 11 lines before the current line, the
listing will be the same as if you had omitted both options.
If you omit the last line option, as in:
<fline>L
(11 lines)
Purpose
The Move command moves one line or a range of lines to the line specified.
Syntax
Operation
If either the first line or last line parameter is omitted, it will default to the
current line. When the move has been completed, the first line moved becomes
the current line, and lines are renumbered according to the direction of the move.
For example, the command:
, +25, 100m
moves text from (current line) to (current line + 25) to line 100, and line 100
becomes the new current line.
If the line number parameters overlap, EDLIN will display the following error
message:
Entry Error
Example
To move lines 20 through 30 to line 100, enter:
20,30, 100m
Purpose
The Page command lists a specified range of lines one page (23 lines) at a time.
Syntax
[<fline>)[, <lline>] P
<fline> is the first line in the range of lines to be listed.
< lline > is the last line in the range of lines to be listed.
Operation
The Page command pages through a range of lines or an entire file, displaying 23
lines at a time. It differs from the List command in that it changes the current
line to the last line displayed.
If the first line parameter is omitted, it defaults to the current line plus one. If
the last line parameter is omitted, 23 lines are listed, and the new current line
becomes the last line displayed.
Example
To display the first 23 lines of your file, and move the current line to the last line
listed, enter:
lp
Purpose
The Quit command ends the current editing session without saving any changes
or additions.
Syntax
Operation
When you enter the Quit command, EDLIN prompts you to make certain you
want to exit EDLIN without saving changes made during the current editing
session. The following message is displayed:
Abort edit (YIN)?
Press [Y] if you want to quit the editing session. No editing changes will be saved,
and no .BAK file will be created. (Refer to the End command in this chapter for
more information about the .BAK file.)
Press []] to continue the editing session.
Caution When you start EDLIN and enter an existing file name, EDLIN
erases the previous copy of the file with the extension of .BAK to
make room for the new copy. If you respond Y to the Abort edit
(Y IN)? message, the backup copy of your file will be deleted.
Purpose
The Replace command replaces all occurrences of a string of text in the specified
range with a specified string of text, or with blanks.
Syntax
[<jline>J[, <lline>1(? ] R [<stringl >1
I [CTRL 1-[IJ<string2>]
<fline> specifies the first line to search for < stringl >.
<lline> specifies the last line to search for <stringl >.
? instructs EDLIN to display an "OK?" prompt to verify correct-
ness of each replacement.
<stringl > is the text to be replaced.
ICTRL ~[IJ separates <string2> from <stringl >.
< string2 > is the text to replace <stringl >.
Operation
If one or both of the line parameters is omitted, EDLIN supplies default values. If
you omit the first line parameter, searching begins with the line after the current
line. If you omit the last line parameter ~ the search ends with the last line in
memory. If you omit both line parameters, EDLIN will search from the line
following the. current line to the last line in memory.
The Replace command displays changed lines each time they are changed. You
can specify the optional? parameter to request the "0. K.?" prompt after each
display of a modified line. This allows you to type Y (yes) if you want to keep
the line in its modified form. Enter any other alphanumeric character except Y if
you do not want the the modification; the line will be kept in its original form. In
either case, the search continues for further occurrences of the string, including
multiple occurrences within the same line.
Example
Assume the following file is ready to edit:
1: This is a sample file
2: used to demonstrate 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 is no problem
10: because the line numbers are dynamic;
11: they will go all the way to 65529.
12:*This is the last line.
Because of the syntax requirements of this command, EDLIN does not differen-
tiate between individual words and strings within words; for this reason, it is a
good idea to use the ? parameter to check and verify replacements before they
are made. The same command entered with the? parameter:
2. 12?Rand! CTRL 1-[IJorl Return I
4: Delete or Insert
5: (The D or I commands)
Purpose
The Search command searches a range of lines to locate a specified string of text.
Syntax
Operation
The string you wish to have matched by the Search command must be exact as
to uppercase and lowercase letters. For example, if you enter a search string in
all uppercase letters, only uppercase occurrences will be matched.
When the first line containing the specified string has been found and displayed,
the search will end unless you have used the 7 option. The first line found that
matches the specified string becomes the current line. If no match is found, the
message Not found will be displayed.
If the 7 option is included in the command, EDLIN will display the first line
with a matching string; it will then prompt you with the message o. K.? If you
press either 1YJ or I Return I, the line will become the current line and the search
will terminate. If you press any other alphanumeric key, the search will continue
until another match is found, or until all lines have been searched and the Not
found message has been displayed.
If you omit either of the first line or last line parameters, the system provides
default values. If you omit the first line parameter, <line> defaults to the line
following the current line. If you omit the last line parameter, <Uine> defaults
Examples
Assume the following file is ready to edit:
1: This is a sample file that
2: will demonstrate
3: the Search command
4: using the
5: optional? parameter
6: and the required <string>
7:*parameter.
or
1, Sand
or
1Sand
Purpose
The Transfer command merges the contents of a specified file to a specified
location in the file currently being edited.
Syntax
[<line>] T [<pathname>}
<line> specifies the line number location where <pathname> will be
merged with the current file.
<pathname> specifies the file to be merged with the current file.
Operation
The contents of the file specified by <pathname> will be inserted ahead of the
specified line in the file being edited, and all line numbers will be adjusted
beginning with the first line merged.
If <line> is omitted, it defaults to the current line.
The file being merged is read from the current directory of the specified drive or
the active drive. If a path was specified when you started EDLIN, that path will
be the current directory for that drive for the duration of the current EDLIN
session; subsequent Transfer commands for that drive must be satisfied from the
same directory.
Purpose
The Write command writes a specified number of lines from memory to the disc.
Syntax
[<n>] W
<n> is the number of lines, starting with line 1, you wish to write to disc.
Operation
When you start EDLIN, lines are read into your system's memory until memory
is 75% full. The remaining portion of memory is kept available to add data during
editing.
If your file is too large to fit into memory, or if it becomes too large as a result of
editing, you must save (write) some lines on to your disc to create more room in
memory for editing, or for the remainder of your EDLIN file. The Write command
allows you to save a specified number of lines from memory on to your disc so
you can add more lines to memory. Use the Append command, described earlier
in this chapter, to add more lines.
Lines are saved (written on your disc) beginning with line 1. Lines remaining in
memory are renumbered starting with 1.
All DEBUG commands can be aborted at any tinle by pressing I CTRL HBreak I.
I CTRL HNum lock I suspends the display of data so that you can read it before it
scrolls off the display; and you can restart the display by pressing allY alphabetic
or nunleric key.
Any combination of uppercase and lowercase letters may be used in DEBUG
commands and their parameters.
Parameter definitions are the same for each DEBUG command that uses them.
The DEBUG parameters and their definitions are shown below:
Parameter Action
<drive> A one-digit hexadecimal value that indicates which drive a file
will be loaded from or written to. These values designate the
drives as follows: 0 = A:, 1 = B:, 2 = C:, ...
<byte> A two-digit hexadecimal value to be placed in or read from an
address or register.
<ree> A 1- to 3-digit hexadecimal value that indicates the logical record
number on the disc and the number of disc sectors to be written
or loaded. Logical records correspond to sectors.
<value> Up to four hexadecimal digits that specify a port number; or the
number of times a command should be repeated.
Note that double quote marks are not necessary in the following
strings:
"This "string" is not needed"
'This ""string"1I is not needed"
DEBUG
or
Because no file name has been specified, current memory, disc sectors, or disc
files can be worked on using any of the DEBUG conlmands.
is displayed. You must reload the program using the Name and
Load commands for it to run properly.
When you use this method, the file you specify will be loaded into memory. MS-
DOS determines the lowest segment after the end of its resident portion. MS-DOS
will load a Program Segment Prefix (PSP) at this address. Refer to the MS-DOS
Programmer's Reference Manual (an optional manual you may order) for details
about the PSP. The PSP is IOOH bytes long. The program file is then loaded in
after it.
If the file has an extension of either .EXE or .HEX, the DS and ES segment
registers point to the PSP, and the CS, SS, SP, and IP registers are set to the
value specified in the .EXE or .HEX file. .HEX files are assumed to be in Intel
.HEX format and are converted into executable format as they are loaded.
For all other files, all segment registers point to the PSP, the IP register is set to
IOOH, and the SP register is set to FFFEH.
DEBUG also places the number of bytes in the program as a doubleword value in
BX:CX. The Least Significant word is placed in CX, the Most Significant word
in BX.
The initial values for the flags are:
NV UP E1 PL NZ NA PO NC
An <arglist> may be specified only if <file name> is present. The <arglist> is
a list of filename parameters and switches that are to be passed to <file name>.
Thus, when <file name> is loaded into memory, it is loaded as if it had been
started with the command:
A><file name> <arglist>
Here, <file name> is the file to be debugged, and the <argiist> is the command
line to be passed to the program when it is executed.
Purpose
The Assemble command assembles 8086, 8087, and 8088 mnemonics directly into
memory.
Syntax
A [<address>]
Operation
All numeric values are hexadecimal and must be entered as 1 - 4 characters. Prefix
mnemonics (such as JMP for Jump) must be specified in front of the opcode to
which they refer; or they may be entered on a separate line.
The segment override mnemonics are CS:, DS:, ES:, and SS:. The mnemonic for
the far return is RETF. String manipulation mnemonics must explicitly state the
string size. For example, use ~10VSW to move word strings, and MOVSB to
move byte strings.
The assembler will automatically assemble short, near, or far jumps and calls,
depending on the byte displacement to the destination address. These may be
overridden with the NEAR or FAR prefix. For example:
0100:0500 JMP 502 a 2-byte short jump
0100:0502 JMP NEAR 505 ; a 3-byte near jump
0100:0505 JMP FAR 50A ; a 5-byte far jump
The NEAR prefix may be abbreviated to NE, but the FAR prefix cannot be
abbreviated.
DEBUG cannot tell whether some operands refer to a word memory location
or to a byte memory location. In such a case, the data type must be explicitly
stated with one of the prefixes "WORD PTR" or "BYTE PTR." Acceptable
abbreviations are "WO" and "BY" respectively. For example:
NEG BYTE PTR [128]
DEC WO [S1]
DW 1000,2000,3000, "BACH"
JA 200
JNBE 200
Press the I Return I key without typing an op code to terminate the Assemble
command; you can terminate the command at any byte position.
Purpose
The Compare command compares the portion of memory specified by <range>
to a portion of the same size beginning at a specified address.
Syntax
C> <range><address>
Operation
If <range> and <address> specify identical areas of memory, no comparison is
made and you are returned to the DEBUG command prompt.
If <range> and <address> are different, the non-matching bytes are displayed
in the following format:
<address1> <byte1> <byte2> <address2>
Example
To compare the block of memory from 100 to 1FFH with the block of memory
frOIn 300 to 3FFH, enter:
C100,1FF 300
or
C100L100 300
Purpose
The Dump command displays the contents of the specified region of memory.
Syntax
D [<range>]
Operation
If you enter the D cOlnmand without parameters, 128 bytes are displayed at the
first address after the address displayed by the previous Dump command. If a
range of addresses is specified, the contents of the range are displayed.
The dump is displayed in two portions: a hexadecimal dump with each byte
shown as a hexadecimal value, and an ASCII durnp with bytes shown as their
corresponding ASCII characters. Nonprinting characters are denoted with a
period (.) in the ASCII portion of the display. Each display line shows 16 bytes
with a hyphen between the eighth and ninth bytes. Each displayed line begins
on a 16-byte boundary.
If you enter the command:
dcs:Ol00 L 20
or
cs:Ol00 011F
the display is formatted as described above. Each line begins with an address:
incremented by 16 from the address on the previous line. Each subsequent D
the display will be formatted as described above, but 20H bytes will be displayed.
If you then type the command:
DCS:l00 115
the display will still be formatted in the same way but only the bytes in the range
of lines from 100H to 115H in the CS segment will be displayed.
Purpose
The Enter cornmand enters byte values into memory at the specified address.
Syntax
Operation
If < address> is specified without the optional list, DEBUG displays the address
and its contents, then waits for your input. At this point, DEBUG expects you
will perform one of the following actions:
1. Replace a current byte value with a new value by entering the new value
after the current value. If the value you enter is not a legal hexadecimal
value, or if lnore than two digits are typed, the illegal extra character( s)
are not echoed.
2. Use the space bar to advance to the next byte; to change its value, simply
type the new value after the current value. If you space beyond an 8-byte
boundary, DEBUG starts a new display line with the address displayed
at the beginning.
3. Type a hyphen (-) to return to the preceding byte. If you decide to
change a byte prior to the current position, the hyphen returns the current
position to the previous byte, and a new line is started with the address
and its byte value displayed.
4. Press I Return I to terminate the Enter command. You can press I Return I to
ternlinate the cOlllInand at any byte position.
If the optional list of values is entered with the Enter comnland, byte values are
replaced automatically with new values. If an error occurs, no byte values are
replaced.
(The underscore represents the cursor.) To change this value to 41, type 41 as
shown below:
04BA:0100 EB.41_
To step through the subsequent bytes, press the SPACE bar to see:
04BA:0100 EB.41 10. 00. BC.
Now, to change lOR to 6FR, type the hyphen as many times as needed to return
the cursor to byte 0101R (value lOR), then replace lOR with 6FR:
04BA:0100 EB.41 10. 00. BC.42
04BA:0102 00.
04BA:0101 10.6F
Press I Return I to terminate the Enter connnand and return to the DEBUG
conlmand prompt.
Purpose
The Fill command fills the addresses In the specified range with the values
specified in the list.
Syntax
F <range><list>
Operation
If the specified range contains more bytes than the number of values in the
specified list, the list will be used repeatedly until all bytes in the range are filled.
If the list contains more values than the number of bytes in the range, the extra
values in the list will be ignored. If any of the memory in the range is not valid
(bad or non-existent), you will receive an error message. If a segment value is
not specified in the range, DS is assumed.
Example
Assume that you have entered the following DEBUG command:
F04BA:l00 L 100 42 45 52 54 41
DEBUG fills memory locations 04BA:IOO through 04BA:IFF with the bytes
specified. The five values are repeated until all lOOH bytes are filled.
Purpose
The Go command executes the program currently in memory.
Syntax
Operation
If the Go command is entered without parameters, the program in memory will
be executed as if it had been executed from the MS- DOS prompt.
If the =<address> parameter is set, execution begins at the specified address.
The equal sign (=) is required so that DEBUG can distinguish the start address
from breakpoint address( es).
When additional addresses are set, program execution stops at the first of those
addresses encountered, regardless of its position in the address list. When
program execution reaches a breakpoint, the registers, flags, and decoded
instructions are displayed for the last instruction executed. The result is the
same as if you had typed the Register command for the breakpoint address.
Up to ten breakpoints may be set. Breakpoints may be set only at addresses
containing the first byte of an 80826 opcode. If more than ten breakpoints are
set, DEBUG will return the BP error message.
The user stack pointer must be valid and have six bytes available for the Go
command. The Go command uses an IRET instruction to cause a jump to the
program under test. The user stack pointer is set, and the user flags, Code
Segment register, and Instruction Pointer are pushed on the user stack.
Thus, if the user stack is not valid or is too small, the operating system may crash.
An interrupt code (OCCH) is placed at the specified breakpoint address( es).
When an instruction with the breakpoint code is encountered, all breakpoint
addresses are restored to their original instructions. If execution is not halted
Example 1
Assume that you have entered the following command:
GCS:7550
Example 2
Assume the IP is set to lOOH, the command
G 200
execution would have begun at lOOH and continued to the end of the program.
If you had entered
G=100 200H
Purpose
The Hex command performs hexadecimal arithmetic on the two parameters
specified.
Syntax
H <value>< value>
Operation
This command is useful in calculating offsets from current or known addresses.
DEBUG first adds the two specified values, then subtracts the second value from
the first value. The results of these operations are displayed on one line; first the
sum, then the difference.
Example
You have entered the following DEBUG command:
H19F lOA
DEBUG first sums the two values, then subtracts lOAH from 19FH. The following
result is displayed:
02A9 0095
Purpose
The Input command inputs and displays one byte from the port specified by the
value parameter.
Syntax
I <value>
Operation
A 16-bit port address may be specified as the value.
Example
Assume that you have entered the following command:
12F8
and that the byte at the port is 42H. DEBUG inputs the byte and displays the
following value:
42
Because MS-DOS function calls can be used inside programs, you should not find
it necessary to use the Input command.
Purpose
The Load command loads a disc file or absolute disc sectors into memory.
Syntax
L [<address> [<drive><rec><rec>]]
Operation
To debug a disc file rather than absolute disc sectors, the file to be loaded must
have been named either when DEBUG was started, or using the DEBUG Name
command. Both the command to start DEBUG and the Name command create
a non-extended File Control Block at CS:5C. BX:CX is the number of bytes read.
If you enter the Load command without any parameters, DEBUG loads the
named file into memory beginning at address CS: 100 and sets BX:CX to the
number of bytes loaded.
If the Load command is entered with just an address parameter, loading begins
at the memory address specified.
If L is entered with all the parameters, absolute disc sectors are loaded rather
than a file. The specified records are taken from the specified drive and DEBUG
begins loading with the first record specified, and continues until the number of
sectors specified in the second record have been loaded.
Example
Assume that the following commands have been entered:
B>DEBUG
-NFILE.COM
DEBUG loads FILE. COM and displays the DEBUG prompt. Assuming that you
want to load only portions of a file or certain records from disc, you can enter:
L04BA:100 2 OF 60
DEBUG will then load 109 (6D hex) records from drive 2 (C:) beginning with
logical record number 15 (OFH) into memory starting at address 04BA:OIOO.
When the records have been loaded, DEBUG again returns the "-" pronlpt.
If the file to be loaded has an . EXE extension, it is relocated to the load address
specified in the header of the .EXE file; the address parameter is always ignored
for .EXE files. The header itself is stripped from the .EXE file before it is loaded
into memory; thus the size of an .EXE file on disc will differ from its size in
memory.
If the file named with the Name command or specified when DEBUG is started
is a .HEX file, then entering the L command with no parameters causes DEBUG
to load the file beginning at the address specified in the .HEX file. If the L
command includes the address parameter, DEBUG adds the specified address to
the address found in the .HEX file to determine the start address for loading the
file. Registers BX:CX contain the a doubleword count of the number of bytes in
the program. The Least Significant word is stored in CX, the Most Significant
word in BX.
Purpose
The Move command moves the block of memory in the specified range to the
location beginning at the specified address.
Syntax
M <range>< address>
Operation
If you instruct DEBUG to make an "overlapping" move (that is, one in which
part of the block overlaps some of the current address) the move will be performed
without loss of data because addresses that could be overwritten are moved first.
The sequence for moves from higher addresses to lower addresses is to move the
data beginning at the block's lowest address, then to work toward the highest.
The sequence for moves from lower addresses to higher addresses is to move the
data beginning at the block's highest address and to work toward the lowest.
Example
Assume that you enter:
MCS:100 110 CS:500
DEBUG will first move address CS:I10 to address CS:510; then CS:I0F to
CS:50F, and so on until CS: 100 is moved to CS:500. To see the results of the
Move, use the Dump command and specify the address specified for the Move
command. DEBUG will assume the segment of all addresses to be DS unless a
segment is specified.
Purpose
The Name command sets a filename for a later Load or Write comnland, and/or
sets filename parameters.
Syntax
Operation
a
If you start DEBUG without naming file to be debugged, you must use the
Narne command before a file can be loaded. The Name command also accepts
parameters that are used by the file being debugged.
Assume you have entered the following commands:
B>DEBUG
-NFILE1.EXE
-L
-G
A File Control Block (FCB) is set up at CS:5C for the first filename parameter
given to the Name command. If a second parameter is entered, then an FCB is
set up for it beginning at CS:6C.
The number of characters in the Name command, exclusive of the "N" itself, is
given at location CS:80. The actual stream of characters in the Name command,
again exclusive of the letter "N," begins at CS:81. Note that this stream
of characters may contain switches and delimiters that would be legal in any
command typed at the MS-DOS command level.
In this instance, the Go command executes the file in memory as if the following
command line has been typed from MS-DOS:
B>PROG PARAMl PARAM2/C
Purpose
The Output command sends the specified byte to the specified output port.
Syntax
a <value> <byte>
Operation
A 16-bit port address is allowed in the output command. If you enter:
02F8 4F
Purpose
The Procedure command executes one instruction and displays the contents of
all registers and flags and the decoded instruction.
Syntax
P [= <address>] [<value>]
Operation
The Procedure command operates exactly as the Trace command with the
exception that when a subroutine is encountered during a trace operation, it
is executed and the trace is resumed at the first line following the subroutine.
This command is most useful to skip over either a tested or well known procedure
in order to see the returned values of the next instruction in the current procedure.
One such example might be to execute MS-DOS function calls by tracing to
INT 21H, (the MS-DOS interrupt for an MS-DOS Function call) then to type
P and execute the function. DEBUG will return at the next instruction in your
sequence.
See the section on the Trace command later in this chapter for details on the
operation of this command.
Purpose
The Quit command terminates the DEBUG utility and returns the user to the
MS-DOS command prompt.
Syntax
Operation
The Quit command uses no parameters and terminates DEBUG without saving
the file currently in memory. You are returned to the MS-DOS command level.
Example
To end the current debugging session, enter:
Q
Purpose
The Register Command displays the contents of one or more CPU registers.
Syntax
Operation
When DEBUG is started, the segment registers are set to the bottom of free
memory, the Instruction Pointer is set to OlOOH, all flags are cleared, and the
remaining registers are set to zero.
If no register-name parameter is used, the Register command dumps the register
save area and displays the contents of all registers and flags.
If a register-name is entered, the l6-bit value of that register is displayed in
hexadecimal, followed by a colon (:) prompt. You can then either enter a <value>
to change the register, or you can press I Return I if no change is needed.
Valid register-names are:
AX BP SS
BX SI CS
CX DI IP
DX DS PC
SP ES F
Any other entry for register-name will result in a BR error message (see the
section entitled DEBUG Error Messages for an explanation).
Zero ZR NZ
Auxiliary AC NA Carry
Carry CY NC
When you type the command "RF", the flags are displayed in a row at the
beginning of a line in the order shown above. At the end of the list of flags,
DEBUG displays a hyphen (-); you may enter new flag values as alphabetic pairs
in any order. You do not have to leave spaces between the flag entries.
If more than one value is entered for a flag, DEBUG returns a DF error message.
If you enter a flag code other than those shown above, DEBUG returns a BF
error message. In both cases, the flags up to the error in the list are changed;
flags at the point of the error and following are not changed.
To exit the R command, press the I Return I key. Flags for which new values were
not entered remain unchanged.
DEBUG displays all registers, flags, and the decoded instruction for the current
location. If the location is CS: IIA, then the display will look similar to this:
AX=OEOO BX=OOFF CX=0007 DX=OlFF SP=039D BP=OOOO S1=005C D1=OOOO
DS=04BA ES=04BA SS=04BA CS=04BA IP=OllA NV UP DI NG NZ AC PE NC
04BA: 011A CD21 INT 21
If you enter:
RF
Now, if you enter a valid flag designation, in any order, with or without spaces,
as In:
NV UP D1 NG NZ AC PE NC - PLEICY I Return I
Debug will respond only with the DEBUG prompt. To see the changes, you
should enter either the R or RF command to see the following display:
RF
NV UP E1 PL NZ AC PE CY -
You can press I Return I to leave the flags this way, or specify new flag values.
Purpose
The Search command searches the specified range for the specified list of bytes.
Syntax
S <range>< list>
Operation
The list may contain one or more bytes, each separated by a space or comma
delimiter. If the list contains more than one byte, only the first address of the
byte string is returned. Otherwise, all addresses of the byte in the range are
displayed. If no match is found, no address is displayed.
Example
If you enter:
SCS: 100 110 41
Purpose
The Trace command executes one instruction and displays the contents of all
registers and flags and the decoded instruction.
Syntax
T [= <address>] [<value>]
Operation
If the optional =<address> parameter is entered, tracing occurs at the specified
address. The optional value causes DEBUG to execute and trace the number of
steps specified by < value>.
Because the Trace command uses the hardware trace mode of the 80286
microprocessor, you can also trace instructions stored in Read Only Memory.
Example
When you type
T
DEBUG displays the state of the registers and flags after the last instruction is
executed, and decodes the next instruction to be executed. Assuming that the
current position is 04BA:OllA, DEBUG might return this information:
AX=OEOO BX=OOFF CX=0007 OX=01FF SP=0390 BP=OOOO S1=005C 01=0000
DS=04BA ES=04BA SS=04BA CS=04BA 1P=011A NV UP 01 NG NZ AC PE NC
04BA: 011A C021 1NT 21
If you enter:
T=011A 10
DEBUG executes sixteen (10 hex) instructions beginning at OllA in the current
segment, and then displays all registers and flags for each instruction as it is
executed.
Purpose
The U nassemble command disassembles bytes and displays their corresponding
source statements with their addresses and byte values.
Syntax
U [<range>]
Operation
If you enter the U command without parameters, 20 hexadecimal bytes are
disassembled at the first address after the address displayed by the previous
Un assemble command.
If you type the U command with the <range> parameter, then DEBUG
disassembles all bytes in the range. If the <range> is given as an <address>
only, then 20H bytes are disassembled.
The display of disassembled code has the same appearance as a listing for an
assembled file.
If you enter:
U04ba:Ol00 0108
If the bytes in some addresses are altered, the disassembler alters the instruction
statements. The U command can be typed for the changed locations, the new
instructions viewed, and the disassembled code used to edit the source file.
Purpose
The Write command writes the file being debugged to a disc file.
Syntax
w[ < address> [< drive> < ree > < ree >]]
Operation
If you enter W with no parameters, BX:CX must already be set to the number
of bytes to be written; the file is written beginning from CS:IOO.
If the W command is entered with just an address, then the file is written
beginning at that address. Again, BX:CX must be set before you use the Write
command.
Note that if a file is loaded and modified, the name, length, and starting address
are all set correctly to save the modified file, so long as the length has not changed.
The file must have been named either when DEBUG was called, or with the N
(Name) command, described earlier in this section. Both the DEBUG call and
the N arne command format a filename properly in the normal format of a File
Control Block at CS:5C.
If the W command is entered with parameters, the write begins from the memory
address specified; the file is written to the specified drive; DEBUG writes the
file beginning with the logical record number specified by the first <rec>; and
DEBUG continues to write the file until the number of sectors specified in the
second <rec> have been written.
Non-Assembly
Assembly Source
Source
Compiler Assembler
Libraries Listing
MS-liNK
.lIB .MAP
Memory
B
-------FOO-
I C I
Any number of other segments can be placed between the segments in a group.
Thus, the offset of FOO can exceed the combined size of all of the segments in
the group (up to a total of 64 Kbytes). An operand of DGROUP:FOO returns
the offset of FOO from the beginning of the first segment of DGROUP (above,
Segment A).
Segments are grouped according to declared class names. MS-LINK loads all of
the segments that belong to the first class name it meets, and then loads all of
the segments that belong to the next class name it meets, and so on until it has
loaded all of the classes.
For example, if your assembly program contains the following segments, they will
be loaded in the indicated order:
A SEGMENT 'FOO' FOO
B SEGMENT 'BAZ' A
C SEGMENT 'BAZ' E
Note A, E, B, C and D are segment names; FOO, BAZ and ZOO are
classes.
If you are writing an assembly language program, you can control the ordering
of classes in memory by writing a dummy module and listing it first in response
to the MS-LINK Obj ect Modules prompt. In this dummy module, you should
B SEGMENT 'CONST'
BENDS
C SEGMENT 'DATA'
C ENDS
Be careful to declare in this module all of the classes to be used in your program.
Otherwise, you will lose full control over the ordering of the classes.
You can also use this method if you want to load one or more memory-combined
types as the last segments of your program. To do so, add MEMORY between
SEGMENT and 'MEMORY' in line (9) above.
It is important to understand that these segments will be loaded last only because
you specified this order, not because of any actions that are part of the linking
or assembly operations.
MS-LINK works with one or more input files (which are the object modules), and
produces two output files. MS-LINK can also create a virtual memory file, and
can be instructed to search through from zero to eight library files.
You can specify each type of file, according to the following format:
[<d:>]<filename>[<.ext>]
In this specification,
• d: designates the drive the file is on.
Output Files
MS-LINK produces the following two types of output files:
• RUN files
• LIST files
MS- LINK appends to the nanles of these files the extensions listed below.
Type of File Default Extension
Run .EXE (cannot be changed by the user)
List . MAP (can be changed by the user)
If this message appears, do not remove the disc from the indicated drive until
linking operations are finished. Otherwise, MS-LINK can behave erratically, and
might return the following error message:
Unexpected end of file on VM.TMP
MS-LINK writes the contents of VM.TMP to the file name that you enter in
response to the "Run File:" prompt.
It is important to understand that VM. TMP is not a permanent working file.
MS-LINK deletes it when the linking session ends. Therefore, do not assign the
name "VM.TMP" to any file that you, the compiler, or the assembler creates.
Caution If a file that you have named VM. TMP is present on the disc
that is in the default drive, and if MS-LINK needs to create a
VM. TMP file, then MS- LINK will delete the existing VM. TMP
file and will create a new VM. TMP file. Any data in the first
VM. TMP file will be lost.
Running MS-LINK
To run MS- LINK, you must perform the following three actions:
• Enter a command to load and start MS- LINK.
• Enter filenames in response to the four MS-LINK prompts.
• Specify the settings of the optional switches that control other MS-LINK
features.
MS-LINK then displays four text prompts on the screen, one at a time. Your
responses to these prompts command MS-LINK to perform specific tasks.
These four prompts are discussed in detail in the section below entitled
"Command Prompts."
The optional switches are described III more detail In the section entitled
"Switches."
The entries that follow the word LINK are your responses to the four prompts.
As indicated above, the entry fields for the different prompts must be separated
by a comma.
In this statement,
o bj ect-list is a list of object modules, separated by a plus-sign or a
space.
runfile is the name of the file that will receive the executable output.
listfile is the name of the file that will receive the listing.
lib-list is a list of the library Inodules to be searched, separated by
a blank space.
/switch is one or more optional switches, which you can specify after
any of the response entries (either directly before any of the
commas, or after <lib-list>, as shown above).
The following items list the default extensions that MS-LINK assumes if you do
not specify filename extensions in the first four items in the command line.
N arne of Response Field Default Filename Extension
<object-list> .OBJ
< runfile > .EXE
<listfile> .MAP
< lib-list> .LIB
To select the default extension for a response field, you need only enter a second
comma, not preceded by a space, after a first comma, as shown in the following
example:
LINK DEER+COMET+PRANCER+VIXEN/M/P .. DEERLIST.COBLIB.LIB
This statement loads MS-LINK, and then loads the following object modules:
DEER.OBJ
COMET.OBJ
PRANCER.OBJ
VIXEN.OBJ
MS-LINK then does the following things, in the order listed below:
• Links the object modules
• Searches the library file COBLIB.LIB
• Creates a list file named DEERLIST.MAP
• Produces a global symbol map (as instructed by the 1M switch)
• Pauses (as instructed by the IP switch)
When you use this method, MS-LINK displays each prompt in turn, followed by
the response( s) from the response file. If the response file does not contain one
or more answers to each prompt (in the form of either a filename, a command
character, or I Return I, MS-LINK will display the prompt for which a response is
missing, and will wait for you to enter a valid response from the keyboard. Once
you have done so, MS-LINK continues the linking session.
The second line instructs MS- LINK to pause (to let you swap discs) before
generating the .EXE file which defaults to DEER.EXE. (You may wish to review
the section below entitled "Switches" before using the /PAUSE switch. However,
in brief, this switch halts linking operations just before MS-LINK writes the .EXE
file. You must press the I Return I key to resume linking operations.)
In response to the third line, MS-LINK assigns the name DEERLIST .MAP to
the output files.
Last, as instructed in the fourth line, MS-LINK will search the library file
COBLIB.LIB.
Command Prompts
MS-LINK executes the commands that you enter in response to the following
four text prompts:
• Object Modules [.OBJ]
• Run File [First-Object-filename.EXE]
• List File [NUL.MAP]
• Libraries [.LIB]
After you enter a response to one prompt, the next prompt appears. After you
enter a response to the last prompt, MS-LINK automatically starts linking the
object files. At this point, you do not need to enter any further commands.
Once the link session has ended, MS-LINK returns control to MS-DOS. The re-
appearance of the MS-DOS prompt (for example, c: \» on the screen indicates
that the MS-LINK session was successful. If the link session did not end
successfully, the appropriate MS-LINK error message appears on the screen.
MS-LINK prompts you for the names of the object, run, and list files, and for
the name of the library file( s). If a prompt has a default response, that default
response appears in brackets after the prompt. (The "Object Modules:" prompt
is followed only by a default filename-extension response because this prompt has
no default filename response; instead, it requires that you enter a filename.)
Origin Group
00D7:0 DGROUP
0000:0 PGROUP
If this prOInpt is passed over, the default NUL.MAP is specified, and MS-LINK
does not generate a listing file.
In response, you need only type the letter designating the desired drive (for
example, "B"), without entering a colon after the letter, after inserting the disc
with the library file on it.
To find references, MS-LINK uses a method known as a "dictionary-indexed
library search." Under this approach, MS-LINK finds definitions for external
references via access to an index, instead of searching for each reference by
scanning a file sequentially from beginning to end. This method saves time during
a linking session that requires a library search.
When using object modules generated by a compiler, you should know that the
compiler may assume the existence of certain default library files. For example,
MS-COBOL (Version 1.10) assumes that the library files COBOL1.LIB and
COBOL2.LIB exist. In this case, if you are using MS-LINK to join COBOL
object (.OBJ) modules, you should enter the names of these library files.
Because a semicolon appears directly before the I Return I in the response to the
Run Module prompt, none of the subsequent prompts will appear, and MS-LINK
will assume the default responses to them (including NUL.MAP for the listing
file) .
CTRL-C
To end an M8-LINK session at any time, press I CTRL I and @] simultaneously.
If you enter an incorrect response (such as an undesired or misspelled filename),
you must end the M8- LINK session by entering I CTRL ~@], and then begin a new
M8-LINK session.
Note that I CTRL HBreak I is equivalent to I CTRL ~@].
However, if you have typed an erroneous response but have not entered it (that
is, if the cursor is still on the line that contains the mistake), you can press the
8J key to delete each erroneous character, and then type a correct response.
or
Insert System Disc in A: and
strike any key to continue.
009F:OOOB DEVICE_LIST
009F:0013 FINAL_DOS_LOCATION
009F:OOOO SYSINIT
009F:OOOB DEVICE_LIST
009F:0012 BUFFERS
However, do not remove a disc that is to receive the List file, or a disc that
contains the VM. TMP file (that is, if MS-LINK created a VM. TMP file).
Example 1
This example demonstrates the linking of object modules from several discs and
several directories, and the use of the "+" command character to enter a series
of responses to the Object Modules prompt. Note, too, the use of the semicolon
(;) to select default filenames for the Run File and List File, and to pass over the
Library search.
B>link
Microsoft 8086 Object Linker
Version 3.00 (C) Copyright Microsoft Corp 1983, 1984, 1985
Object Modules [.OBJ]: MAIN+SECOND+BIGFILE+
Object Modules [.OBJ]: E:\BASIC\FNTOUCH+
Object Modules [.OBJ]: C:CHAR
Run File [MAIN.EXE]: ;
B>
Example 2
In this example, the user has supplied the name of the Runfile as RUN _FILE.
Otherwise, the Linker would have used the name of the first Object Module and
named the Run File MAIN.EXE. Note use of the semicolon to skip over the
remaining prompts.
B>LINK
Microsoft 8086 Object Linker
Version 3.00 (C) Copyright Microsoft Corp 1983, 1984, 1985
B>
B>TYPE MAIN.MAP
Origin Group
0007:0 DGROUP
0000:0 PGROUP
B>
B>
Example 5
Example 5 is the same as Example 1, except that the user has placed all entries
specifying Object Modules on the command line (the Command-Line Method),
separated with the "+" command character:
B>LINK MAIN+SECOND+BIGFILE+E:\BASIC\FNTOUCH+C:CHAR;
Microsoft 8086 Object Linker
Version 3.00 (C) Copyright Microsoft Corp 1983, 1984, 1985
B>
B>TYPE MAIN.MAP
Origin Group
00D7:0 DGROUP
0000:0 PGROUP
B>
B>LINK COLINKOBJS
B>
If the Linking session had not been successful, error messages would have been
displayed before control was returned to MS-DOS.
B>LINK COINVALID
B>
Example 9
In this example, the user failed to specify a Library File and the Link session
paused. The user entered the library file so the session could continue.
B>TYPE THREE. PAR
main second bigfile
mainprog
mainmap
B>link COthree.par
Microsoft 8086 Object Linker
Version 3.00 (C) Copyright Microsoft Corp 1983. 1984. 1985
B>
Origin Group
FOEE:O DGROUP
0002:0 PGROUP
B>LINK
Microsoft 8086 Object Linker
Version 3.00 (C) Copyright Microsoft Corp 1983. 1984. 1985
Example 11
Because the /HIGH switch was used in this example, COMMAND. COM was
overwritten in memory. The Operating System notified the user with an error
message instructing him to insert the disc with the COMMAND. COM file and
start again. In the second try, the user omitted the /HIGH switch and the Linking
session was successful.
B>LINK SAMPLE,A:SAMPLE/HIGH;
B>A:
A>B:
B>LINK SAMPLE,A:SAMPLE;
B>A:
A>SAMPLE Simple linker example
A>B:
B>
B>
Origin Group
0003:0 DGROUP
0002:0 PGROUP
Origin Group
0003:0 DGROUP
0002:0 PGROUP
B>
The <action> can be reading or writing. The drive designator indicates the drive
in which the error occurred. For example, attempting to write to a disk in drive
A that had a write-protect tab produces the following error message:
Write protect error writing drive A
Abort, Retry, Ignore?
The copy in memory of one of the allocation tables has error. Run CHKDSK
with the IF option, and if the error persists, the disk is unusable. Reformat it
before using it again.
Command: EDLIN
Cause: You entered a Q session without saving any editing
changes.
Action: Enter Y to exit without saving the editing changes to disk.
Enter N to cancel the command and continue the editing
session. Use E to exit EDLIN and save editing changes.
Command: DOS
Command: MODE
Cause: You specified printer redirection and the specified serial
port is not present in the system, or you specified a port
other than COM! or COM2.
Action: Re-enter command line.
Command: MODE
Cause: You specified a device other than LPTn or COMn. MODE
only affects the parallel ports, serial ports, and screen.
Action: Re-enter command line.
Command: MODE
Cause: You specified something other than P to initialize a port as
the printer device.
Action: Re-enter command line.
Command: MODE
Cause: You specified a value other than 1 or 2 for the number of
stop bits.
Action: Re-enter command line.
Command: MODE
Cause: You specified a value other than 7 or 8 for the number of
data bits.
Action: Re-enter command line.
Command: MODE
Cause: An invalid parameter was given in the command line.
Action: Re-enter command line.
Command: KEYB
Cause: There is no currently loaded CON code page, or the
DEVICE=DISPLAY.SYS directive was not given in
CONFIG.SYS.
Action: For CON, prepare and select a code page, or set the
directive in CONFIG.SYS. Then, restart DOS.
Command: CHKDSK
Cause: The file has an invalid sector. number. The problem exists
in the FAT, not in the file. CHKDSK truncates the file at
the end of the last valid sector.
Action: If rerunning CHKDSK does not fix the problem, you
can restore the backup copy of the file (be aware that
RESTORE has some limitations).
Command: CHKDSK
Cause: The size of the indicated file is inconsistent with the
amount of data allocated to the file.
Action: If you specified IF, the file is truncated at the end of the
last valid cluster. If you did not specify IF, the message is
just information. CHKDSK takes no action, so you should
re-run the command with IF.
Command: DEL,ERASE
Cause: Appears when you instruct DOS to delete all of the files in
a directory.
Action: Enter Y to proceed, N to abort the command.
APPEND/ASSIGN Conflict
Command: APPEND
Cause: You tried to use APPEND after running ASSIGN.
Action: Cancel the ASSIGN, execute APPEND, and then execute
ASSIGN again.
Command: DOS
Command: FC
Command: DOS
Cause: DOS can't find the file containing the device drivrr (wlwn'
its specified in the file CONFIG.SYS) in the root dirrctory
of the boot disk, or an error is detected in the driver as its
being loaded. The name of driver (filename) is display()d in
the error message. In either case, the device driver is not
incorporated into DOS.
Action: Check the spelling of the filename in CONFIG.SYS or copy
the file containing the device driver into the root dirrctory
of the boot disk.
Command: DOS
Cause: DOS cannot find the file COMMAND. COM (or the file
containing the alternate command processor specified
in the CONFIG.SYS file using the SHELL command)
in the root directory of the boot disk or if an error was
encountered as the file was being loaded.
Action: Copy the file containing the command processor into the
root directory of the boot disk or check the spelling of the
SHELL filename in the CONFIG.SYS file.
Command: KEYB
Cause: KEYBOARD .SYS is corrupted, or KEYB could not find
the file.
Action: Try again, making sure you specify the drive and path to
the file. If you get the message again, the file is corrupt.
Fix the file according to directions given in your user's
guide for editing KEYBOARD.SYS.
Command: PRINT
Cause: You specified the IT switch in the PRINT command.
Action: Thy the command again without the switch.
Command: CHKDSK
Cause: The command cannot reach the specified subdirectory. All
subdirectories beneath this directory will not be verified.
Action: No action required.
Command: CHKDSK
Cause: The command cannot return to the root directory while it
is verifying the tree directory structure. CHKDSK cannot
continue checking the subdirectories in the root.
Action: No action required.
Command: CHKDSK
Cause: A drive has been specified that is redirected over the
network. CHKDSK can only operate on local disk drives.
Action: Do not specify a disk drive that is not local.
Command: COpy
Cause: An attempt was made to copy a file from a device and the
IB option was specified. This mode is invalid due to the
fact that COpy needs to be able to detect the end-of-file
character from the device.
Action: Re-enter the command line and omit the IB option
or specify the I A option after the device name in the
command line.
Command: EDLIN
Cause: The filename specified to edit has an extension of .BAK.
Command: BACKUP
Cause: You used BACKUP with IF and the destination disk is a
hard disk.
Action: Try again without the switch, or use flexible disks for the
backup.
Command: FORMAT
Comma,nd: FORMAT
Canse: A drive was specified that is redirected over the network.
Command: CHKDSK
Command: RECOVER
Cans(': A drive has been specified that is redirected over the
nrtwork.
Adion: Do not specify a drive that is not local.
Command: CHKDSK
Cause: CHKDSK cannot recover directory (the current or parent
directory) in directoryname (the directory having damage).
Action: Copy files from the directory as possible, erase the files
in the subdirectory, and remove the subdirectory. Then,
restore the files from your backup (See RESTORE and
BACKUP before you do anything.).
Command: CHKDSK
Cause: The parent directory (indicated by the dual periods) is
defective.
Action: No action required.
Command: FASTOPEN
Cause: You used FASTOPEN on a drive affected by an ASSIGN,
JOIN, or SUBST.
Action: Undo the effects of the appropriate command, and try
again.
Command: CHKDSK
Cause: CHKDSK became confused and could not get to a parent
directory.
Action: Restart DOS and rerun CHKDSK. If the command still
fails, the disk has a serious flaw. Retire a flexible disk. Try
to reformat a hard disk.
Command: MODE
Cause: For MODE /STATUS, a space is available, but no code
page exists for the space. For a MODE SELECT, the
selected code page is not prepared. On using MODE for
the console device named CON:, the selected code page
might not have the font for the current video mode.
Action: To solve this problem, use MODE with PREPARE to
reload the appropriate code page and re-execute MODE
with SELECT. On getting the error again, edit the
DEVICE=DISPLAY.SYS line, increasing the value of
sub/onts. Then, restart DOS.
Command: MODE
Command: MODE
Command: KEYB
Command: KEYB
Cause: You specified a key code and code page, but a different
code page is active for CON (the console).
Action: Run KEYB to see the current situation. Then, use the
MODE CON CODEPAGE SELECT command to activate
the appropriate code page.
Command: KEYB
Cause: Your CONFIG.SYS file has a DEVICE=DISPLAY.SYS
directive, but the keyboard code used with KEYB needs a
code page that is not yet prepared.
Action: Run KEYB without parameters to see the current
situation. Then, use a MODE CON CODEPAGE
PREPARE command to prepare the code page for the
keyboard code you want to use.
Command: DISKCOMP
Cause: One or more locations on the indicated side and track of
the two disks contain differing information.
Action: You may not need to do anything. The differences may be
due to previously copying files. Commands and programs
may work fine and merely be stored on differing locations.
Running CHKDSK can indicate if one or both disks
contain bad locations.
Command: MODE
Cause: Your command initialized the asynchronous
communications adapter: y is the adapter number; bbbb
is the baud rate; p is the parity; d is the number of data
bits; s is the number of stop bits; and t is the retry on a
time-out.
Action: None required
Command: CHKDSK
Cause: The FAT has a bad pointer to filename.
Action: If you did not use IF, rerun CHKDSK with this option.
Command: CHKDSK
Cause: A disk has filename stored in xxx noncontiguous pieces.
This is not serious, but it slows performance.
Action: For a flexible disk, copy the files to another flexible disk. If
many files have this condition on a hard disk, backup the
disk, reformat the disk, and then restore the files.
Command: COpy
Cause: The same file has been specified as both a source and
the destination drive. The following command shows an
example:
COPY FILEl +FILE2 FILEl
FILEi is overwritten before it can be copied.
COHUllctnd: (;JIKDSK
Command: CHKDSK
Command: DISKCOPY
Command: DISKCOPY
Command: CHKDSK
Cause: An error(s) has been detected on the disk, but the IF
option was been specified.
Action: Run CHKDSK again with the IF option.
Command: MODE
Cause: You executed KEYB previously to executing MODE with
SELECT. A conflict now exists between the current code
page for the keyboard and the code page specified by
MODE for the console. The code page for the console goes
to the specified code page, but the keyboard code page is
unchanged.
Action: To use the new code page on the console, execute KEYB
with an appropriate keyboard code because executing
KEYB automatically switches the keyboard's code page.
Command: MODE
Causes: The error occurs during a MODE with CODEPAGE.
Xxxxxx can be: Prepare, Refresh, Select, Status, or write of
font file to device. The error could be due to the following
things:
• The device does not support code page switching.
• CONFIG.SYS has no line for including a device
driver.
• The value of added_ codepages does not allow more
code pages.
• The code page information file is corrupted or
nonexistent.
• MODE with PREPARE had no name for the file
for the code page.
• The code page number was incorrect.
• The device detected a transmission error.
• The device is turned off or not selected.
• You ran MODE REFRESH ahead of MODE
SELECT or CHCP.
Action: Try the following before running MODE CODEPAGE:
1. Use MODE SELECT instead of MODE
REFRESH. Specify an appropriate device name,
code page number, and full file name for the page
file. Make sure the device is ready.
2. Examine the CONFIG.SYS file for the following:
a. DISPLAY.SYS for the console;
PRINTER.SYS for the printer.
b. Specify appropriate parameters
throughout.
c. Check additional code pages, editing the
number as required.
d. Restart DOS and try MODE CODEPAGE
again.
You have a hardware problem if you still get the error.
Command: MODE
Cause: You used MODE PREPARE and specified a possible code
page whose information page does not have the font.
Action: All existing code pages for the device disappear. You must
then prepare them again. Then, restart DOS and try the
command again.
Directory is joined
Command: CHKDSK
Cause: A directory on the disk being checked has been joined.
Action: Unjoin the directory and run CHKDSK again.
Command: JOIN
Cause: An attempt was made to join to a non-empty directory.
Action: Join to a new directory which is empty, or empty the
directory and rerun JOIN.
Command: CHKDSK
Cause: A subdirectory does not contain the parent or current
directory entries.
Action: Delete the subdirectory with RMDIR and recreate it using
MKDIR.
Command: CHKDSK
Cause: One of the two File Allocation Tables for drive x has a
defective sector in it. DOS automatically uses the good
FAT.
Action: Copy the files to another disk and reformat the disk. If the
sectors for the FAT are still defective, discard the disk.
Command: CHKDSK
Cause: One of the two File Allocation Tables for drive x has a
defective sector in it. DOS automatically uses the good
FAT.
Action: Copy the files to another disk and reformat the disk. If the
sectors for the FAT are still defective, discard the disk.
Command: EDLIN
Cause: EDLIN could not save your file due to a lack of disk space.
Action: Delete enough files to make room for your document and
re-enter it with EDLIN.
Command: FORMAT
Cause: Your command detected a bad track on the disk where the
system files should reside.
Action: This disk should only be used for data. Use another disk if
you want to make a system disk.
Command: DISKCOMP
Cause: The disks being compared have differing densities.
Action: Compare disks of similar densities.
Divide overflow
Command: DOS
Cause: A program attempted to divide by 0, or a logic error
caused an internal malfunction.
Action: Correct error in program. If the program is purchased,
contact your dealer.
Command: MODE
Cause: You get one of the two messages. Both indicate you are
adjusting the display for the color/graphics adapter.
Action: Answer with Yonce a display is centered according to
your needs. Before typing Y, type N if necessary to shift
the display left or right.
Command: RENAME
Cause: Either the file being renamed does not exist, or the new file
name already exists.
Action: Be sure the file being renamed exists, and that the new file
name does not exist.
Command: EDLIN
Cause: The entire file has been read into memory. If the file has
been read in sections (using the Append command) this
message is displayed when the last section is read.
Action: No action required.
Command: CaMP
Cause: One or both of the files being compared do not contain
End- of-file markers.
Action: No action required.
Entry error
Command: EDLIN
Cause: A command has a syntax error.
Action: Retype the command with the correct syntax.
Command: CHKDSK
Cause: An error condition was detected in one of the subdirectory
entries. The message is preceded by one or two periods to
indicate which entry.
Action: CHKDSK attempts to correct the error when the IF
option is specified.
Command: MODE
Cause: DOS detected a disk error while reading the information
file for a code page during a MODE PREPARE. You
probably have a bad sector. The MODE PREPARE aborts
and does not change the prepared fonts.
Action: Run RECOVER on the information file. If RECOVER
reports bad sectors, reformat or discard the disk. Then,
copy . CPI from your DOS startup disk to the hard disk
and try the command again.
Command: BACKUP
Cause: You: omitted the logfile name, used an invalid file name,
gave an incorrect disk drive, or gave an invalid path.
Action: Check your use of the IL switch, and try again.
Command: Several
Cause: Too much data was sent to a device. DOS was unable to
write the data to the specified device.
Action: Send less data to the device.
Command: CHKDSK
Cause: CHKDSK detected an error and the IF option was not
specified. Corrective action taken by CHKDSK is not
written to the disk.
Action: Rerun CHKDSK with the IF option.
Command: PRINT
Cause: A printer time-out error was detected, or there was a long
printer operation such as a form feed. This message is only
displayed when the PRINT command in executed.
Action: Turn the printer on, or return it to on-line status if
appropriate. If the error occurs during a long printer
operation, ignore the message.
EXEC failure
Command: DOS
Cause: An error is found while reading a command, or the FILES
directive in the CONFIG.SYS file is set too low.
Action: Increase the value for FILES and restart DOS, or check the
integrity of the disk.
Command: MODE
Cause: MODE PREPARE does not find the specified information
file for the code page.
Action: Check the spelling, drive, and pathname. Make necessary
corrections and try the command again.
Command: MODE
Cause: MODE CODEPAGE could not open a device named
devicename.
Action: Check the device name. Be sure CONFIG.SYS has the
device driver. Ensure that the device is connected and
turned on. Then, try the command again.
Command: DOS
Cause: A disk may be defective.
Action: Run CHKDSK to check the disk.
Command: DOS
Action: Check what you want to do, and run the command again.
Command: EXE2BIN
Cause: The input file is not in the correct format.
Action: Execute the command again with an option that accounts
for the desired format. If you get the error again, the file
cannot be converted.
Command: DOS
Cause: You tried to add a filename or replace a file that already
exists in the directory, or when you tried to edit a
protected file (see PROTECT). If the file already exists, it
is a read-only file and cannot be replaced.
Action: Run CHKDSK on the disk to determine the cause.
File is READ-ONLY
Command: EDLIN
Cause: You tried to change a file that is des.ignated read-only.
Action: Change the permission for the file, and then rerun EDLIN
to make changes.
Command: PRINT
Cause: Disks were switched while a file was queued up, but it had
not started to print.
Action: Reissue the PRINT command for that filename.
Command: CHKDSK
Cause: Two or more files are cross linked.
Action: Make a copy of the file you want to keep, and then delete
files that are cross linked.
Command: EDLIN
Cause: You did not specify a filename at the time you started
EDLIN.
Action: Specify a file to edit in the command line to start EDLIN.
Command: COMP
Cause: Two files are different sizes. The compare operation
terminates.
Action: No action required.
Command: FIND
Command: FIND
Cause: You specified too many, or not enough, options in the
command line.
Action: Re-enter the command correctly.
Command: FIND
Command: FIND
Cause: The program could not read the specified file.
Action: Run CHKDSK to ensure the integrity of the disk and try
again.
Command: FIND
Cause: You typed a command incorrectly.
Action: Check the syntax, and try again.
Command: CHKDSK
Cause: The file directory entry contains an invalid pointer to
the data area. If you specified the IF switch, the file is
truncated to a zero length file.
Action: No action required.
Command: EXE2BIN
Cause: The source (EXE) file contained information indicating
that a load segment is required for the file.
Action: Specify the absolute segment address at which the finished
module is to be located.
Command: MODE
Cause: MODE PREPARE found the specified code page file but
the file has inappropriate contents. The information file for
the code page has been destroyed, or you specified a name
of an existing file and the file is not an information file for
a code page.
Action: You lose prepared code pages for the device, so copy the
information file for the code page from your DOS startup
disk. Make sure it has appropriate contents, and try the
command again.
Format failure
Command: FORMAT
Cause: DOS could not format the disk. The message is usually
displayed with an explanation as to why DOS could not
format the disk.
Action: Restart FORMAT with a new disk.
Command: DISKCOPY
Command: MODE
Incorrect parameter
(~ornrnand: SHARE
Command: MODE
Cause: You used MODE with LPTx: or COMy:. Specifying the P
option gives the first messagej not specifying P gives the
second message.
Action: None required.
(~ommand: DOS
Cause: DOS is copying or formatting.
Action: Insert a disk in the appropriate drive and press an
alphanumeric key to begin processing.
Command: DOS
Cause: The disk containing a specified batch file is not in the
originally specified drive.
Action: Reinsert the disk containing the batch file in the
appropriate drive.
Command: FORMAT
Cause: You specified FORMAT IS, but the disk in the default
drive does not contain DOS system files.
Action: Insert a disk with the files IO.SYS and DOS.SYS in the
specified drive.
Command: FORMAT
Cause: The memory configuration is insufficient to transfer the
DOS system files IO.SYS and MSDOS.SYS (the /S switch)
Action: Re-boot the system with fewer device drivers, virtual disks,
or more memory, and then try again.
Command: CHKDSK
Cause: CHKDSK always recovers lost files into the root directory.
In this case, your root directory is full.
Action: Delete unused files in the root directory, and try again.
Command: DOS
Cause: The pipe operation makes use of temporary files on the
disk which are automatically deleteq after a piping process
is completed. An error has occurred in one of these files.
Action: Check the integrity of your disk with CHKDSK. Try again
with a new disk.
Command: MODE
Cause: You specified a baud rate other than UO, 150, 300, 600,
1200, 2400, 4800, or 9600.
Action: Re-enter command line with valid baud rate.
Command: FORMAT
Cause: The volume label cont.ains invalid. or too rnaIly~ characters.
Action: Use a LABEL command to ensure that the volume laoe!
contains no more than 11 alphanumeric characters.
Command: KEYB
Cause: You specified a nonexist{'nt code page.
Action: Determine the appropriate value, and try agaiu.
Invalid COMMAND.COM.
Command: DOS
Cause: The program you have just run has used up almost d,ll of
memory. DOS must now reload the COMMAND.COM file
from disk. However, DOS cannot find COMMAND.COM
on the disk, or the copy it found is invalid.
Action: Insert a disk into the default drive that contains a copy of
the COMMAND.COM version you used to start DOS.
Command: DOS
Cause: You specified a country nmnber in you CONFIG.SYS file
that is not in til(' t abk of count ries configured in thi~
implementation of DOS.
Action: See the COUNTRY COlllIlland for a lbt of coulltry ('Od(,8.
Command: KEYB
Cause: You specified a nonexistent key code.
Action: Determine the appropriate value, and try again.
Command: CHKDSK
Cause: A directory contains invalid information.
Invalid date
Command: DOS
Cause: The specified device was not CON, NUL, AUX, or PRN.
Action: Try again with a valid device name.
Invalid directory
Command: DOS
Cause: The specified directory either does not exist or is invalid, or
you tried to access a protected directory (see PROTECT).
Action: Enter the directory name correctly.
Command: DOS
Cause: An invalid drive was detected in the PATH string.
Action: Issue a new PATH command with no invalid drives in it.
Invalid parameter
Do not specify filename(s).
Command Format: DISKCOMP d: d: [/1 ][/8]
Command: DISKCOMP
Cause: One or more filenames were encountered. DISKCOMP
only accepts drive designators.
Action: Reissue the command using an appropriate syntax.
Invalid parameter
Do not specify filename{s).
Command Format: DISKCOPY d: d: [/1]
Command: DISKCOPY
Command: DOS
Cause: DOS displays the message when a valid path name or
filename to the COPY command needs to be specified, or
when you try to access a protected file (see PROTECT).
Action: Run the command again with an appropriate name.
. Command: RMDIR
Cause: You are unable to remove the directory requested for one of
the specified reasons,· or you tried to remove a protected
directory (see PROTECT).
Action: Be sure the directory name exists and is empty, then
reissue the command.
Command: CHKDSK
Cause: The specified subdirectory does not exist, or it is invalid.
Action: Check to see that you typed the subdirectory name
correctly.
Command: BACKUP
Cause: The hard disk is full.
Action: Delete unnecessary files, and try again, or back up on
flexible disks.
Command: EDLIN
Cause: The replacement string in a Replace command caused the
line to expand beyond 253 characters.
Action: Divide the long line into two lines and retry the Replace
command.
Command: PRINT
Cause: PRINT displayed the message when you first the command
and you were asked to specify the device to be used as the
as the print spooler. This message also appears if PRINT
is set up for a device that does not exist.
Action: Specify a device name that exists in your system.
Command: DOS
Cause: A program has written into "free" memory, preventing
DOS from allocating that memory. The error is usually
fatal.
Action: Restart DOS, and if the error persists, make a new copy of
the DOS disk from your backup copy of the system disk. If
this error occurs consistently with purchased software, see
your dealer.
-More-
Command: MORE
Cause: The program which has piped its output to MORE has
produced more than one screen of data.
Action: Press the spacebar to view more of the file or directory.
Command: MORE
Cause: MORE does not run on versions of DOS prior to 2.0.
Action: Use the correct version of MORE and DOS.
Command: EDLIN
Cause: You must specify a destination line number when copying
and inserting lines with EDLIN.
Action: Reissue the command, including the destination line
number.
Command: DOS
Cause: The command requires either an ON or an OFF argument.
Action: Reissue the command, specifying either ON or OFF.
Command: PRINT
Cause: This prompt appears the first time that PRINT is run,
requesting the PRINT output device.
Action: Specify the device you want to print on.
Command: EDLIN
Cause: EDLIN did not find a file with the name you specified.
Action: 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.
Command: MODE
Cause: You executed MODE jSTATUS and have not yet executed
MODE SELECT on a device.
Action: Run MODE SELECT, and try again.
Command: DOS
Cause: COMMAND.COM could not open a file because there are
not enough file handles available in the system.
Action: Restart DOS. Add or increase the number in the FILES
statement in CONFIG.SYS. Then restart DOS again.
No path
Command: PATH
Cause: There is no PATH variable set in the environment.
Action: No action required.
Command: EDLIN
Cause: You tried to save a file to the root directory but it is
full. Subdirectories are not limited in size as is the root
directory.
Action: Delete extraneous files from the root, or specify a file name
in a subdirectory. Re-enter your text into EDLIN.
Command: SYS
Cause: There is not enough room for the system files on the
destination disk.
Action: Delete some files to make room for the system files or use
another disk. You may need to reformat the disk to put
the system on it.
Command: EDLIN
Cause: There is not enough room in memory to hold the file
during a Transfer command.
Action: Free some memory by writing some of the text to a disk
before reissuing the Transfer command.
Command: EDLIN
Cause: You specified a Search or Replace command that was
unable to find another occurrence of the specified Search or
Replace string.
Action: No action required.
O.K.?
Command: EDLIN
Cause: This prompt occurs during Search and Replace command
processing.
Action: If you press any key except Y or I Return I, the search or
replace process continues.
Command: KEYB
Cause: You prepared code ,pages for the console, but the specified
keyboard code is not compatible with them.,
Action: Examine the code pages to note what is wrong with them.
Then, make changes that let the code page work with the
key board code. .
Command: CHKDSK
Cause: You specified an invalid path name.
Action: Check your command, and try again.
Command: MODE
Cause: The specified port (LPTn: or COMn:) is not present in the
system.
Action: Specify a port that is in the system.
Command: RECOVER
Cause: This prompt appears before you recover a disk or file.
Action: Press a key to begin the recover process. Use CQID-I Break I
to end the process.
Command: PRINT
Cause: There is no room in the list of files waiting to be printed.
Action: Wait until some of the waiting files have been printed, or
remove some of them from the queue. Reissue the PRINT
command.
Command: CHKDSK
Cause: The disk being used is not recognized by this version of
DOS. The disk was either created by another system with
a format that is not supported on this version of DOS or is
not an DOS disk.
Action: If the IF parameter was used, reissue the command
without IF. This displays possible corrections. The disk
may then be recovered with IF, or reformatted.
Command: CHKDSK
Cause: There is not enough memory in your machine to process
CHKDSK for this disk.
Action: Remove some drivers or virtual disks, or obtain more
memory for your system.
Command: DOS
Cause: You must acquire more memory to run your application. It
is possible that some programs you have run are still using
some memory.
Action: You can try to restart DOS, but if you still get the
message, you must acquire more memory.
Command: PRINT
Cause: Available memory has been reduced by several thousand
bytes to process the print command concurrent with other
processes.
Action: No action required.
Command: FORMAT
Cause: You should reinsert the disk being formatted in the
indicated drive.
Action: Insert the disk to be formatted in the specified drive.
Command: FC
Cause: After FC has detected many differences, it gives up and
displays this message.
Action: Edit the files to remove the reported differences and try
again.
Command: VDISK
Cause: It is necessary to adjust the sector size specified in the
DEVICE=VDISK.SYS command in the CONFIG.SYS file.
Action: Change sector size.
Command: -DOS
Cause: The specified device driver loaded by CONFIG.SYS uses a
sector size larger than that of any other device driver on
the system. You cannot run this device driver.
Action: No action required.
Command: SHARE
Cause: You tried to install SHARE more than once.
Action: No action required.
Command: SORT
Cause: You tried to run SORT on an incorrect version of DOS.
Action: Use the correct version of SORT and DOS.
Command: SORT
Cause: The disk is full.
Action: Remove some extraneous files from the disk, and try again.
Command: SORT
Cause: There is not enough memory to run the SORT program.
Action: Reduce the amount of data to be sorted.
Command: DOS
Cause: The SHELL command in the CONFIG.SYS file is
incorrect. The place that you have told DOS to find
COMMAND.COM does not exist, or COMMAND.COM is
not in that place.
Action: Start the SHELL program from the root directory.
Command: DOS
Cause: This prompt occurs during command processing and is
always accompanied by another message. This message is
also displayed if you have inserted a Pause command in
a batch file. Usually, you are asked to insert disks into
appropriate drives before this prompt.
Action: Perform the specified task, then press a key.
Command: FIND
Cause: You typed a command line that FIND cannot interpret.
Action: Check the syntax, and try again.
Command: BACKUP
Cause: The destination disk has a problem.
Action: For a flexible disk, try a different disk. For a hard disk, run
CHKDSK, and try again if the disk is alright.
Command: DISKCOPY
Cause: The target disk is write-protected.
Action: Write-enable the disk and reinsert it.
Command: DISKCOPY
Cause: Read, write, or verify errors occurred during the copying
process. The target disk may be incomplete.
Action: Compare the two disks with DISKCOMP. Try again. You
might need a new destination disk.
Command: DOS
Cause: You pressed ~}{KJ while you were in batch mode. DOS
asks if you want to end batch processing.
Action: Press Y to end processing. Press N to continue the batch
job.
Command: EDLIN
Cause: DOS could not open the BAK file, or a file to edit, due to
lack of system file handles.
Action: Increase the value of the FILES command in the
CONFIG.SYS file.
Command: FORMAT
Cause: The FORMAT command cannot accommodate defective
sectors on the disk.
Action: Format another disk.
Command: KEYB
Cause: KEYB installs into a predetermined amount of memory.
You added code pages to the console (using other
commands), and you have now attempted to use KEYB
again.
Action: To use additional code pages, restart DOS and run the
MODE commands for code pages before you run KEYB.
Command: CONFIG.SYS
Cause: You have an invalid directive in the CONFIG.SYS file.
Action: The chapter named "System Configuration" in this manual
lists valid directives.
Command: CHKDSK
Cause: There has been an unrecoverable error in directory.
Action: If you type Y, CHKDSK converts the bad directory into a
file. You can then fix the directory yourself, or delete it.
Command: DISKCOPY
Cause: You get this message after several unsuccessful attempts
are made to write data to the specified track and sector on
the disk in the indicated drive.
Action: You can RECOVER as many files as possible, copy the files
to another disk, and try to reformat the disk.
Command: VDISK
Cause: The virtual disk drive cannot be installed due to an
incorrect buffer size.
Action: Change buffer size.
Command: VDISK
Cause: The virtual disk drive cannot be installed due to
insufficient memory. The system has insufficient memory
when less than 64 Kbytes of system memory would be left
after the virtual disk is installed.
Action: Change buffer size.
Command: VDISK
Cause: You specified the IE switch, but the system does not have
extended memory, or the amount of available extended
memory is insufficient to contain the virtual disk even after
adjusting the parameters.
Action: Ensure that you have enough extended memory to run
VDISK, or reduce the size of VDISK.
Command: FORMAT
Cause: You specified the IV switch in the FORMAT command.
Action: Specify a volume label or press I Return I to indicate that you
do not want a volume label for the disk.
Command: FORMAT
Cause: There is data on the hard disk you are trying to format.
Action: If you want to lose the data and format the disk, press Y
(for "Yes"). If you do not want the files on your hard disk
erased press N (for "No"). Copy the files to a flexible disk
and repeat the FORMAT command.
Command: RECOVER
Cause: The root directory is too full for RECOVER processing.
Action: Delete some files in the root directory to free space.
Command: BACKUP
Cause: No files on the source disk matched your specification.
Action: Run DIR to list your files. Then, try again with an
appropriate specification.
Command: EXE2BIN
Cause: The amount of data read was less than the size of the
header. This is a warning message only.
Action: None required.
Overview
MS-DOS includes special configuration commands that can be placed in a system
file, named config.sys. config.sys can be created using EDLIN or any word
processor that creates unformatted files. Each time MS:-DOS is booted, the
configuration commands in config.sys are executed. With the exception of
BREAK, configuration commands can only be used within config.sys.
MS-DOS also allows you to add extensions to MS-DOS using device drivers.
Device drivers allow peripheral devices not already supported by MS-DOS to be
added to the system, and provide enhanced support for certain standard system
components. Four device drivers are provided with your system: VDISK.SYS,
ANSLSYS, PEMM.SYS and NETDRVR.SYS.
The configuration commands and supplied device drivers are detailed in the
remaining pages of this chapter. For instructions for editing and using config.sys,
see your Using the Series 300 DOS Coprocessor or SoftPC User's Guide manual.
Purpose
ANSLSYS is a device driver that can be loaded with the DEVICE command.
The ANSI.SYS driver supports extended keyboard and screen display features.
Syntax
DEVICE = ANSI>SYS
Operation
When this driver is installed, ANSI standard terminal escape sequences will be
executed by the standard input and output device. ANSLSYS replaces the CON
device driver. The sequences are described in the appendix titled Extended Screen
and Keyboard Control.
Purpose
The BREAK command enables or disables extended I CTRL HBreak I and I CTRL H:f:J
checking.
Syntax
BREAK = ON I OFF
Operation
MS-DOS checks for a I CTRL HBreak I or I CTRL HQJ keyboard sequence during
all standard I/O, standard printer, and standard auxiliary operations. If the
extended checking is enabled, MS-DOS will also check during disc operations.
The default state of the extended checking is off when MS-DOS is booted;
however, the config.sys file provided with the DOS Coprocessor software includes
the command:
BREAK = ON
which enables the extended I CTRL HBreak I and I CTRL HQJ checking.
Note
Purpose
The BUFFERS command specifies the number of disc I/O buffers.
Syntax
BUFFERS = <n>
Operation
<n> is the number of buffers, and may range from 1 to 99. The default number
of buffers used by MS-DOS is 3. To increase the number of buffers to 10, place
the command:
BUFFERS = 10
in the config.sys file.
The use of buffers may increase the speed of certain applications. As data is
read from the disc, it is stored in a buffer. The buffers are used by MS-DOS in
a manner that ensures that the most recently read data is in one of the buffers.
The performance of applications that perform a large number of random reads
and writes on a data file may be increased by using additional buffers. As the
number of buffers increases, the chances increase that the data requested by
the application program is already in one of the buffers. Thus, MS-DOS can
retrieve the data from memory instead of from disc, which speeds up program
performance.
For applications which perform mostly sequential read and write operations, there
is little performance gain from an increased number of buffers.
There is no precise formula to calculate the optimum number of buffers. Different
values must be tried to determine the number of buffers that yields maximum
performance. In general, applications which perform large amounts of random
data access will perform best with between 10 and 25 buffers.
Many application programs tell you how to set the BUFFERS command for
optimum performance.
Purpose
Selects the display format for the system time and date, currency symbol, and
decimal separator based on the selected country.
Syntax
COUNTRY = <nnn>
Operation
<nnn> is a three-digit country code. The country code for each country is listed
below.
Notes
Purpose
The DEVICE command is used to load installable device drivers into the system.
Syntax
Operation
DEVICE loads a file containing an installable device driver. The driver IS
incorporated into the resident portion of MS-DOS.
To install the MS-DOS virtual disc drive, VDISK, enter the command:
DEVICE = VDISK.SYS
The size of the resident portion of MS-DOS will be increased by the Size of each
device driver installed.
Note
1. Four installable device drivers are provided with the DOS Coprocessor.
They are VDISK.SYS, which provides the ability to use system RAM as a
virtual disc, ANSI.SYS, which provides ANSI display terminal emulation
for the standard output device, PEMM.SYS which provides access to
expanded memory compatible with the Lotus/Intel/Microsoft Expanded
Memory Specification, which provides support for accessing the HP-UX
file system via drive D:.
Purpose
The FCBS command specifies the number of File Control Blocks (FCBs) which
can be concurrently open with the share attribute set.
Syntax
Operation
<x> sets the maximum number of files which can be concurrently open, and
<y> the number of open files which are "protected" (see below). The command
line:
FCBS = 10.5
in the config.sys file will allow 10 shared files open concurrently, with the first 5
"protected" .
Some application programs use FCBs to keep track of files they are using.
The <x> parameter specified in the FCBS command determines the maximum
number of files which can be accessed with FCBs if the SHARE command has
been issued. The default value is 4 and the range is 1 to 255.
MS-DOS keeps track of which FCB (or file) was least recently used. If an
application program attempts to open more files than specified and file-sharing
has been loaded, MS-DOS will close the least recently used file prior to opening
the requested file. The <y> parameter protects the first y files from being closed
in this manner. If <y> is set equal to <x>, then files will not be closed and the
application program will be unable to open any files in excess of the maximum.
If the <y> parameter is not entered, MS-DOS will set it to O.
Purpose
The FILES command specifies the number of file handles which can be open
concurrently.
Syntax
FILES= <n>
Operation
<n> is the number of file handles MS-DOS is to reserve space for. The default
number is 8 and can range from 8 to 255. The command line:
FILES = 10
in the config.sys file will reserve enough room for 10 file handles.
A pplications may create their own FCBs or they may open handles to access
files. When an application opens a handle, MS-DOS creates a control block for
the program. The FILES command determines the amount of space MS-DOS
reserves for these control blocks, and hence the maximum number of handles
which may be open concurrently.
Notes
1. Each handle over 8 increases the size of the resident size of MS-DOS by
48 bytes.
2. There is no limit to the number of files an application program may have
open when those files are opened through FCBs instead of handles, unless
the SHARE command has been executed, in which case the maximum is
set by the FCBS command.
3. This number is the total number of handles open for the entire system.
A process may have a maximum of 20 files open at any time.
Purpose
The LASTDRIVE command sets the maximum number of drives which may be
accessed on the system.
Syntax
LASTDRIVE = <d>
Operation
<d> is any letter A through Z. The LASTDRIVE command sets the last valid
drive letter for the system. The command line:
LASTDRIVE =G
in the config.sys file will provide 7 disc drive letters, A: through G:. The default
value is 5 drives, A: through E:.
Each block device driver, subdirectory assigned via the SUBST command, and
disc drive requires a drive designator. If the total of these exceeds five, a
LASTDRIVE command must be placed in the config.sys file to increase the
number of valid drive letters.
Note
Purpose
The DEVICE command loads PEMM.SYS, a device driver that provides for
accessing the expanded memory compatible with the Lotus/Intel/Microsoft
Expanded Memory Specification (version 4.0).
Syntax
DEVICE=PEMM. SYS IH:nnn IV
Switch provides verbose information
Provides a handle to programs
Operation
The examples shown in the table illustrate how to use the command. The
following Notes provide additional information.
Purpose
The SHELL command allows an alternate command processor to be selected.
Syntax
Operation
The SHELL command substitutes an alternate command processor specified
in the command line to replace COMMAND.COM. PAM is an example of an
alternate comlnand processor. It is substituted for COMMAND. COM using the
following command line:
SHELL = PAMCODE.COM ROOT
Note
Purpose
VDISK.SYS is a device driver that can be loaded with the DEVICE command.
The VDISK block device driver allows a portion of the computer's RAM to be
used as a disc drive.
These block devices (which emulate a physical disc drive) are sometimes referred
to as "RAM discs" or "virtual discs". The virtual discs can be used in the
same manner as other system disc drives with the exception of a few MS-DOS
commands such as FORMAT, CHKDSK, etc. VDISK.SYS will allow either
system RAM or extended memory (above 1 Mbyte) to be used as the virtual
disc. In addition, more than one virtual disc at a time can be installed in your
system.
Virtual discs are much faster than physical disc drives, but their contents will be
lost when the system is reset or loses power.
Since the contents of a virtual disc are lost when the system is turned off or reset,
files must be transferred to the disc when the system is started, and back to a
flexible or hard disc before the system is reset. This task can be accomplished with
either the MS-DOS COpy or BACKUP/RESTORE commands. DISKCOPY
will not work with a virtual disc.
Syntax
DEVICE = [<d> :] [<path>]VDISK.SYS [<bbb>] [<888>] [<ddd>]
[lEI: <m>]]
where x is the drive designator assigned to the VDISK. Below this message the
values of the three parameters are displayed as shown.
Buffer size: <bbb>
Sector size: <sss>
Directory entries: <ddd>
Notes
1. You must place DEVICE = VDISK.SYS lines following all other DEVICE
lines in the config.sys file.
2. This driver is not supported on SoftPC.
NAME
dos2ux, ux2dos - convert ASCII file format
SYNOPSIS
dos2ux file .. .
ux2dos file .. .
DESCRIPTION
Dos2ux and ux2dos read each specified file in sequence and write it to standard output, convert-
ing to HP-UX format or to DOS format, respectively. Each file can be either DOS format or HP-
UX format for either command.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
If no input file is given or if the argument - is encountered, dos2ux and ux2dos read from stan-
dard input. Standard input can be combined with other files.
'EXAMPLES
The following prints file myfile on the display:
dos2ux myfile
The following converts file! and file2 to DOS format, then concatenates them together, placing
them in file3.
ux2dos filet file2 > file3
RETURN VALUE
Both commands return 0 if successful or 2 if the command failed. The only possible failure is
the inability to open a specified file, in which case the commands print a warning.
WARNINGS
Command formats resembling:
dos2ux file! file2 > file!
overwrite the data in file! before the concatenation begins, causing a loss of the contents of
file!. Therefore, be careful when using shell special characters.
SEE ALSO
doschmod(l), doscp(l), dosdf(l), dosls(1), dosmkdir(1), dosrm(l), dosif(4).
NAME
doschmod - change attributes of a DOS file
SYNOPSIS
doschmod [-u] mode device :file ...
DESCRIPTION
Doschmod is the DOS counterpart of chmod(l).
There is one option:
-u Disable argument case conversion. In the absence of this option, all DOS file
names are converted to upper case.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
The attributes of each named file are changed according to mode, which is an octal number in
the range 000 to 0377. Mode is constructed from the logical OR of the following modes:
200 Reserved. Do not use.
100 Reserved. Do not use.
040 Archive. Set whenever the file has been written to and closed.
020 Directory. Do not modify.
010 Volume Label. Do not modify.
004 System file. Marks files that are part of the DOS operating system.
002 Hidden file. Marks files that do not appear in a DOS directory listing using
the DOS DIR command.
001 Read-Only file. Marks files as read-only.
SPECIAL WARNING
Specifying inappropriate mode values can make files andj or directories inaccessible, and in cer-
tain cases can damage the file system. To prevent such problems, do not change the mode of
directories and volume labels.
Normal users should have no need to use mode bits other than 001, 002, and 040.
EXAMPLES
The following marks file jdev jrfd9122:memo.txt as a hidden file:
doschmod 002 /dev jrfd9122:memo.txt
The following marks file driveC:autoexec.bat read-only:
doschmod 001 driveC:autoexec.bat
SEE ALSO
chmod(l), dos2ux(1), doscp(l), dosdf(l), dosls(l), dosmkdir(l), dosrm(l), chmod(2), dosif(4).
NAME
doscp - copy to or from DOS files
SYNOPSIS
doscp [-fvu] filel file2
doscp [-fvu] filel [file2 ... ] directory
DESCRIPTION
Doscp is the DOS counterpart of cp(l). Doscp copies a DOS file to a DOS or HP-UX file, an HP-UX
file to an HP-UX or DOS file, or HP-UX or DOS files to an HP-UX or DOS directory. The last
name in the argument list is the destination file or directory.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
The file name - (dash) is interpreted to mean standard input or standard output depending
upon its position in the argument list.
Options
There are several options:
-f Unconditionally write over an existing file. In the absence of this option, doscp
asks permission to overwrite an existing HP-UX file.
-v Verbose mode. Doscp prints the source name.
-u Disable argument case conversion. In the absence of this option, all DOS file
names are converted to upper case.
Note: Shell metacharacters (*, ?, and [... J) can be used when specifying HP-UX file names, but
cannot be used when specifying a DOS file name, because file name expansion is done by the
shell and the DOS utilities do not recognize metacharacters.
RETURN VALUE
Doscp returns 0 if all files are copied successfully. Otherwise, it prints a message to standard
error and returns with a non-zero value.
EXAMPLES
Copy the files in the HP-UX directory abc to the DOS volume stored as HP-UX file hard_disk:
doscp abc/* hard_disk:
Copy DOS file /backup/log through the HP-UX special file /dev/dd9127 to HP-UX file logcopy
located in the current directory:
doscp /dev /rfd9127:/backup/log logcopy
Copy DOS file zulu on the volume stored as HP-UX file bb to standard output:
doscp bb:zulu -
SEE ALSO
cp(l), dos2ux(1), doschmod(l), dosdf(l), dosls(l), dosmkdir(l), dosrm(l), dosif(4).
NAME
dosdf - report number of free disk clusters
SYNOPSIS
dosdf device[:]
DESCRIPTION
Dosdf is the DOS counterpart of df(1). It prints the cluster size in bytes and the number of free
clusters on the specified DOS volume.
SEE ALSO
df(l), dos2ux(1), doschmod(l), doscp(l), dosls(l), dosmkdir(l), dosrm(l), dosif(4).
NAME
dosls, dosll - list contents of DOS directories
SYNOPSIS
dosls [-aAudl] device: [file]
dosH [-aAudl] device: [file]
DESCRIPTION
Dosis is the DOS counterpart of Is(1).
For each directory named, dosls lists the contents of that directory. For each file named, dosls
repeats its name and any other information requested. If invoked by the name dosll, the -1
option is implied.
Options
There are several options:
-a List all directory entries. In the absence of this option, hidden files, system files,
and files whose names begin with a dot (.) are not listed.
-A Same as -a, except the current directory and the parent directory are not listed.
For the superuser, this option defaults to being set, and IS disabled by -A.
-u Disable 'argument case conversion. In the absence of this option, all DOS file
names are converted to uppercase.
-d If an argument is a directory, list only its name. Often used with -I to get the
status of a directory.
-I List in long format, giving file attribute, size in bytes, and the date and time of
last modification for each file, as well as listing the DOS volume label. Long
listing is disabled if dosll is invoked with the -I option.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
EXAMPLES
These examples assume that a DOS directory structure exists on the device accessed through
HP-UX special file /dev /rdsk/Osl.
The following example lists all of the files in the root directory of the DOS directory structure:
dosls -a /dev /rdsk/Osl:
The following example produces a long-format listing of all the information about the DOS
directory /dos/math, but does not list the files in the directory:
dosls -Id /dev /rdsk/Osl:/dos/math
SEE ALSO
dos2ux(l), doschmod(1), doscp(l), dosdf(1), dosmkdir(1), dosrm(l), Is(1), dosif(4).
NAME
dosmkdir - make a DOS directory
SYNOPSIS
dosmkdir [-u] device: directory ...
DESCRIPTION
Dosmkdir is the DOS counterpart of mkdir(l). It creates specified directories. The standard
entries, . for the directory itself and .. for its parent, are made automatically.
There is one option:
-u Disable argument case conversion. In the absence of this option, all DOS file
names are converted to uppercase.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
DIAGNOSTICS
Dosmkdir returns 0 if all directories were successfully created. Otherwise, it prints a message to
standard error and returns non-zero.
EXAMPLES
To create an empty subdirectory named numbers under the directory /math/lib on the device
accessed through HP-UX special file /dev /rfd9122, use:
dosmkdir /dev /rfd9122:/math/lib/numbers
SEE ALSO
dos2ux(1), doschmod(l), doscp(l), dosdf(l), dosls(l), dosrm(l), mkdir(l), dosif(4).
NAME
dosrm, dosrmdir - remove DOS files or directories
SYNOPSIS
dosrm [-friu] device :file .. .
dosrmdir [-u] device :file .. .
DESCRIPTION
Dosrm and dosrmdir are DOS counterparts of rm(l) and rmdir(l), respectively.
Dosrm removes the entries for one or more files from a directory. If a specified file is a direc-
tory, an error message is printed unless the optional argument -r is specified (see below).
Dosrmdir removes entries for the named directories, provided they are empty.
Options
The options are:
-f (force) Unconditionally remove the specified file, even if the file is marked
read-only.
-r Cause dosrm to recursively delete the entire contents ofa directory, followed by
the directory itself. Dosrm can recursively delete up to 17 levels of directories.
-i (interactive) Cause dosrm to ask whether or not to delete each file. If -r is also
specified, dosrm asks whether to examine each directory encountered.
-u Disable argument case conversion. In the absence of this option, all DOS file
names are converted to uppercase.
A DOS file name is recognized by the presence of an embedded colon (:) delimiter; see dosif(4)
for DOS file naming conventions.
EXAMPLES
These examples assume that a DOS directory structure exists on the device accessed through the
HP-UX special file jdev jrfd9122.
This example recursively combs through the DOS directory jtmp and asks if each DOS file
should be removed (forced, with no file mode checks):
dosrm -irf jdev jrfd9122:jtmp
The following example removes the DOS directory doug from the DOS volume stored as HP-UX
file hard_disk: .
dosrmdir hard_disk:doug
SEE ALSO
dos2ux(1), doschmod(l), doscp(l), dosdf(1), dosls(l), dosmkdir(l), rm(l), rmdir(l), dosif(4).
NAME
DOSIF - DOS Interchange Format description
DESCRIPTION
DOSIF (DOS Interchange Format) is the name given to the media format used by the DOS
operating system. This format is based upon that used in IBM PC and PC AT, HP Vectra, and HP
150 systems.
The DOS utilities described in Section 1 (referred to hereafter as dos*(1)) are provided for read-
ing data from and writing data to DOSIF volumes. Use these utilities to retrieve information
from a DOSIF volume.
The dos*(1) utilities are the only HP-UX commands that can interact directly with the contents
of a DOSIF volume. The only other way to interact with the contents of a DOSIF volume is to
use an HP-UX DOS emulation or coprocessor facility such as SoftPC or the DOS Coprocessor.
Mount(l) cannot be used on a DOSIF volume because the operating system does not recognize
it.
When constructing file names for dos*(1) commands, start with the HP-UX path name of the
DOSIF volume, then add a colon (:) followed by the file name:
device_file: file
or
path_name: file
Note: This file naming convention is suitable for use only in arguments to the dos*(1) utilities.
It does not constitute a legal path name for any other use in HP-UX.
Note: Shell metacharacters (*, ?, and [ ... J) can be used to name HP-UX files, but cannot be used
when specifying a DOS file name, because file name expansion is done by the shell and the
dos* (1) utilities do not recognize metacharacters.
By convention, if the HP-UX device name and a trailing colon are specified, but no file or direc-
tory name is provided (for example, /dev /rfd.O:), the root U) of the DOS file system is assumed.
EXAMPLES
Specify DOSIF file /dos/ivy accessed through HP-UX special file /dev /rfd9127:
/dev /rfd9127:/dos/ivy
Specify DOSIF file /math accessed through the DOS volume stored as HP-UX file
/users/mydir/driveC:
/users/mydir/driveC:/math
SEE ALSO
dos2ux(1), doschmod(I), doscp(I), dosdf(I), dosls(I), dosmkdir(l), dosrm(l).
A
A (append) command (EDLIN) 4-9
A (assemble) command (DEBUG) 5-11
Abort, Ignore, Retry prompt A-2
absolute paths 1-6
Addressing, memory 5-6
ANSI.SYS device driver B-2
APPEND 2-2
Append command (EDLIN) 4-9
Assemble (A) command (DEBUG) 5-11
ASSIGN 2-4
ATTRIB 2-6
B
BACKUP 2-8
Batch files (.BAT) 3-1
Batch processing
Description 3-1
Displaying messages 3-12
ECHO command 3-6
Execution 3-2
FOR command 3-8
GOTO command 3-10
IF command 3-11
Labels 3-10
Limitations 3-1
PAUSE command 3-12
Posi tional parameters 3-2, 3-14
REM command 3-13
Replaceable parameters 3-2, 3-14
SET command 3-4
SHIFT command 3-14
Index-1
BREAK 2-14
BREAK command B-3
BUFFERS command B-4
c
C (compare) command (DEBUG) 5-13
C (copy) command (EDLIN) 4-10
characters
reserved 1-8
wildcard 1-10
CHCP 2-16
CHDIR 2-18
CHKDSK 2-20
Class 6-4
CLS 2-22
Code segment 5-6
COMMAND 2-24
Command processors B-15
Command-line method (MS-LINK) 6-13
commands
APPEND 2-2
·ASSIGN 2-4
ATTRIB 2-6
BACKUP 2-8
BREAK 2-14
CHCP 2-16
CHDIR 2-18
CHKDSK 2-20
CLS 2-22
COMMAND 2-24
COMP 2-26
COPY 2-28
CTTY 2-32
DATE 2-34
DEL 2-36
DIR 2-38
DISKCOMP 2-40
DISKCOPY 2-42
DOS2UX 2-48
DOSMOUNT 2-44
ERASE 2-50
Index-2
EXE2BIN 2-52
EXIT 2-54
FASTOPEN 2-56
FC 2-58
FDISK 2-62
FIND 2-64
FOR150 2-70
FORMAT 2-66
GRAFTABL 2-72
GRAPHICS 2-74
internal and external 1-15
JOIN 2-78
KEYB 2-80
LABEL 2-84
MKDIR 2-86
MODE communications 2-94
MODE display adapter 2-92
MODE information 2-88
MODE parallel printer 2-90
MODE prepare codepage 2-98
MODE reestablish codepage 2-104
MODE select codepage 2-102
MODE serial printing 2-96
MODE status 2-106
MORE 2-108
NLSFUNC 2-112
PATH 2-116
PRINT 2-118
PROMPT 2-122
RECOVER 2-124
REDIR 2-128
RENAME 2-130
REPLACE 2-132
RESTORE 2-136
RMDIR 2-140
running them 1-17
SELECT 2-142
SET 2-144
SORT 2-148
SUBST 2-150
SYS 2-152
Index-3
TIME 2-154
TREE 2-156
TYPE 2-158
using symbols 1-14
UX2DOS 2-160
VER 2-162
VERIFY 2-164
VOL 2-166
XDIR 2-168
Commands
BREAK (configuration file) B-3
BUFFERS (configuration file) B-4
Conditional execution (batch files) 3-11
COUNTRY (configuration file) B-6
DEVICE (configuration file) B-8
ECHO (batch files) 3-6
FCBS (configuration file) B-9
FILES (configuration file) B-11
FOR (batch files) 3-8
GOTO (batch files) 3-10
IF (batch files) 3-11
Interrupting execution B-3
Iterative execution (batch files) 3-8
LASTDRIVE (configuration file) B-12
PAUSE (batch files) 3-12
PEMM-SYS (configuration file) B-13
REM (batch files) 3-13
SHELL (configuration file) B-15
SHIFT (batch files) 3-14
Common combinations 6-6
COMP 2-26
Compare (C) command (DEBUG) 5-13
Conditional command execution (batch files) 3-11
Config.sys file B-1
Configuration commands
ANSI.SYS B-2
BREAK B-3
BUFFERS B-4
COUNTRY B-6
DEVICE B-8
FCnS B-9
Index-4
FILES B-11
LASTDRIVE 3-12
PEMM-SYS B-13
SHELL B-15
VDISK.SYS B-16
Configuration file B-1
COpy 2-28
Copy (C) command (EDLIN) 4-10
COUNTRY command B-6
Crash, system 5-7
Creating
Files 4-1
CTTY 2-32
Currency symbol format, setting B-6
cursor and prompt 1-4
o
D (delete) command (EDLIN) 4-13
D (dump) command (DEBUG) 5-14
Data segment 5-6
Date
Format, setting B-6
DATE 2-34
DEBUG
Assemble (A) command 5-11
Command parameters 5-3
Command syntax 5- 2
Compare (C) command 5-13
Description 5-1
Dump (D) command 5-14
Enter (E) command 5-16
Error messages 5-41
Fill (F) command 5-18
Flags 5-9
Go (G) command 5-19
Hex (H) command 5-21
Input (I) command 5-22
Load (L) command 5-23
Move (M) command 5-25
Name (N) command 5-26
Output (0) command 5-29
Index-5
Procedure (P) command 5-30
Quit (Q) command 5-31
Register (R) command 5-32
Search (S) command 5-35
Starting 5-8
System crash recovery 5-7
Trace (T) command 5-36
Unassemble (U) command 5-38
Write (W) command 5-40
Decimal separator format, setting B-6
DEL 2-36
Delete (D) command (EDLIN) 4-13
DEVICE command B-8
Device drivers
ANSI.SYS B-2
Loading B-1, B-8
VDISK.SYS B-16
Device errors A-2
DIR 2-38
directories 1-7
Disc errors A-2
Discs
Input/Output buffers B-4
Valid drive letters, setting B-12
Virtual B-16
DISKCOMP 2-40
DISKCOPY 2-42
Display
Displaying a message (batch files) 3-12
Extended display control B-2
Turning on and off during batch processing 3-6
DOS
command parts 1-5
Error messages A-1
interface 1-4
internal and external commands 1-15
parts of a command 1-12
prompt and cursor 1-4
running a command 1-17
running commands 1-3
specifying a command name 1-5
Index-6
specifying devices 1-5
specifying directories 1-7
specifying drives and disks 1-5
specifying files 1-8
specifying paths 1-6
using symbols 1-14
DOS commands
BREAK (configuration file) B-3
BUFFERS (configuration file) B-4
COUNTRY (configuration file) B-6
DEVICE (configuration file) B-8
ECHO (batch files) 3-6
FCBS (configuration file) B-9
FILES (configuration file) B-11
FOR (batch files) 3-8
GOTO (batch files) 3-10
IF (batch files) 3-11
LASTDRIVE (configuration file) B-12
PAUSE (batch files) 3-12
PEMM-SYS (configuration file) B-13
REM (batch files) 3-13
SHELL (configuration file) B-15
SHIFT (batch files) 3-14
DOS2UX 2-48
DOSMOUNT 2-44
Drive letters B-12
Drivers B-2, B-16
Drivers, loading B-8
DSALLOCATE switch (MS-LINK) 6-25
Dump (D) command (DEBUG) 5-14
E
E (end) command (EDLIN) 4-18
E (enter) command (DEBUG) 5-16
ECHO command (batch files) 3-6
Edit command (EDLIN) 4-16
Editing files 4-1
EDLIN
A (append) command 4-9
C (copy) command 4-10
Command options 4-7
Index-7
Command options 4-7
Command syntax 4-6
D .(delete) command 4-13
Description 4-1
E (end) command 4-18
Edit command 4-16
Entering control characters 4-5
Hints for using 4-5
I (insert) command 4-19
L (list) command 4-21
M (move) command 4-24
P (page) command 4-25
Q (quit) command 4-26
R (replace) command 4-27
S (search) command 4-30
T (transfer) command 4-33
Usage 4:. 3
W (write) command 4-34
End (E) command (EDLIN) 4-18
Enter (E) command (DEBUG) 5-16
ERASE 2-50
Error messages
DEBUG 5-41
DOS A-I
MS-LINK 6-39
EXE2BIN 2-52
EXIT 2-54
extensions
commonly used ones 1-9
reserved 1-9
external commands 1-15
Extra segment 5-6
F
F (fill) command (DEBUG) 5-18
FASTOPEN 2-56
FC 2-58
FCBS command B-9
FDISK 2-62
File control blocks B-9
file names
Index-8
reserved 1-9
files 1-8
Files
Batch (.BAT) 3-1
Config.sys B-1
Creating 4-1
Editing 4-1
Editing large files 4-9, 4-34
File control blocks (FCB) B-9
File handles B-11
MS-LINK files 6-9
Opening B-11
FILES command B-11
filespec 1-12
Fill (F) command (DEBUG) 5-18
FIND 2-64
FOR command (batch files) 3-8
FOR150 2-70
FORMAT 2-66
G
G (go) command (DEBUG) 5-19
Go (G) command (DEBUG) 5-19
GOTO command (batch files) 3-10
GRAFTABL 2-72
GRAPHICS 2-74
Group 6-4
H
H (hex) command (DEBUG) 5-21
Handles, file B-11
Hex (H) command (DEBUG) 5-21
HIGH switch (MS-LINK) 6-25
Index-9
interface for DOS 1-4
internal commands 1-15
Interrupting command execution B-3
Iterative command execution 3-8
J
JOIN 2-78
K
KEYB 2-80
Keyboards B-2
L
L (list) command (EDLIN) 4-21
L (load) command (DEBUG) 5-23
LABEL 2-84
LASTDRIVE command B-12
Letters, drive B-12
Library files 6-20
LINENUMBERS switch (MS-LINK) 6-26
Linking programs 6- 2
List files 6-19
List (L) command (EDLIN) 4-21
Load (L) command (DEBUG) 5-23
M
M (move) command (DEBUG) 5-25
M (move) command (EDLIN) 4-24
MAP switch (MS-LINK) 6-26
Memory
Addressing 5-6
Offset 5-6
MKDIR 2-86
MODE
communications 2-94
display adapter 2-92
display status 2-106
general information and errors 2-88
parallel printer 2-90
prepare code page 2-98
redirect printing to serial 2-96
Index-10
reestablish code page 2-104
select code page 2-102
MORE 2-108
Move (M) command (DEBUG) 5-25
Move (M) command (EDLIN) 4-24
MS-DOS
Error messages A-I
MS-LINK
Combination handling 6-6
Command characters 6-21
Definitions 6-4
Description 6-2
Dummy modules 6-8
Error messages 6-39
Examples 6-29
Files used 6-9
Memory requirements 6-2
Optional switches 6-23
Starting 6-11
N
N (name) command (DEBUG) 5-26
Name (N) command (DEBUG) 5-26
NLSFUNC 2-112
o
o (output) command (DEBUG) 5-29
Object modules 6-18
Offset, memory 5-6
options 1-11
Options, EDLIN command 4-7
Output (0) command (DEBUG) 5-29
P
P (page) command (EDLIN) 4-25
P (procedure) command (DEBUG) 5-30
Page (P) command (EDLIN) 4-25
Paragraph 6-5
parameters 1-11
parts of a DOS command 1-5, 1-12
PATH 2-116
Index-11
paths 1-6
PAUSE command (batch files) 3-12
PAUSE switch (MS-LINK) 6-28
PEMM-SYS command B-13
Plus sign 6-21
Positional parameters 3-2, 3-14
PRINT 2-118
Private combinations 6-6
Procedure (P) command (DEBUG) 5-30
Program debugging 5-1
Programs, linking 6-2
PROMPT 2-122
prompt and cursor 1-4
Public combinations 6-6
Q
Q (quit) command (DEBUG) 5-31
Q (quit) command (EDLIN) 4-26
Quit (Q) command (DEBUG) 5-31
Quit (Q) command (EDLIN) 4-26
R
R (register) command (DEBUG) 5-32
R (replace) command (EDLIN) 4-27
RECOVER 2-124'
REDIR 2-128
reference tasks 1-1
Register (R) command (DEBUG) 5-32
relative paths 1-6
REM command (batch files) 3-13
RENAME 2-130
REPLACE 2-132
Replace (R) command (EDLIN) 4-27
Replacing batch file parameters 3-2, 3-4, 3-14
reserved characters 1-8
reserved extensions 1-9
reserved file names 1-9
Response-file method (MS-LINK) 6-15
RESTORE 2-136
RMDIR 2-140
Run files 6-19
Index-12
running a DOS command 1-17
running DOS commands 1-3
s
S (search) command (DEBUG) 5-35
S (search) command (EDLIN) 4-30
Screen
Displaying a message (batch files) 3-12
Extended screen control B-2
Turning on and off during batch processing 3-6
Search (S) command (DEBUG) 5-35
Search (S) command (EDLIN) 4-30
Segment register 5-6
Segments 5-6, 6-4
SELECT 2-142
Semicolon 6-22
SET 2-144
SHELL command B-15
Shells B-15
SHIFT command (batch files) 3-14
SORT 2-148
specifying
a command name 1-5
devices 1-5
directories 1-7
drives and disks 1-5
paths 1-6
specifying files 1-8
Stack combinations 6-6
Stack segment 5-6
\ STACK switch (MS-LINK) 6-28
SUBST 2-150
switches 1-11
symbols in a DOS command 1-14
SYS 2-152
System crash 5-7
System localization B-6
T
T (trace) command (DEBUG) 5-36
T (transfer) command (EDLIN) 4-33
Index-13
tasks 1-1
Text-prompt method (MS-LINK) 6-13
Time
Format, setting B-6
TIME 2-154
Trace (T) command (DEBUG) 5-36
Transfer (T) command (EDLIN) 4-33
TREE 2-156
TYPE 2-158
u
U (unassemble) command (DEBUG) 5-38
Unassemble (U) command (DEBUG) 5-38
UX2DOS 2-160
V
VDISK.SYS device driver B-16
VER 2-162
VERIFY 2-164
Virtual discs B-16
Virtual memory file (VM.TMP) 6-11
VOL 2-166
w
W (write) command (DEBUG) 5-40
W (write) command (EDLIN) 4-34
wildcard characters 1-10
Write (W) command (DEBUG) 5-40
Write (W) command (EDLIN) 4-34
X
XDIR 2-168
Index-14
FliOW HEWLETT
a!~ PACKARD
HP Part Number
98870-90050
Microfiche No. 98870-99050 98870-90651
Printed in U.S.A. E0989 For Internal Use Only