IBM DOS 1.1 May82
IBM DOS 1.1 May82
----
-- ---
- ----
--- Personal Computer
-
--_.-
------ --- Computer Language
Series
Disk
Operating
System
Second Edition (May 1982)
Version 1.10
Changes are periodically made to the information herein; these
changes will be incorporated in new editions of this
publication.
Prerequisite Publication
Regardless of your background or previous programming
experience, you should look at the Guide to Operations
before reading this manual. The chapter on "Using
DOS" should be especially helpful to you before you
approach the more detailed information that appears in
this manual.
Data Security
The IBM Personal Computer is a powerful and useful
tool to help you with your personal and business
information processing needs. (As with any information
system, inadvertent errors may occur and information
may be misused.) We suggest that when processing
sensitive or highly valuable information, you take steps
to ensure your data and programs are protected from
accidental or unauthorized disclosure, modification,
destruction, or misuse. Simple measures, such as:
removing diskettes when not in use, keeping backup
copies of valuable information, or installing the
equipment in a secure facility, can go a long way to
maintain the integrity and privacy of your information.
iv
Summary of Changes
v
• Tables of values for single sided and dual sided
diskette maps are included (Appendix C).
CAUTION
The DOS 1.10 commands should never be executed
when you are running DOS 1.00, and the DOS 1.00
commands should never be executed under DOS 1.10.
Because of the internal changes required for DOS 1.10,
any attempt to run Level 1.00 commands on a 1.10
system (or vice versa) may result in the loss of data.
vi
CONTENTS
Preface . . . . . . . . . . . . . iii
Prerequisite Publication . . iii
Organization of this manual iii
Data Security . iv
Summary of Changes . . . . . . v
ix
The DEBUG Commands . . . . . . . . . 6-11
Information Common to All DEBUG
Commands . 6-11
Compare Command . 6-13
Dump Command . 6-14
Enter Command . 6-17
Fill Command 6-20
Go Command .. 6-21
Hexarithmetic Command 6-24
Input Command 6-25
Load Command . 6-26
Move Command 6-29
Name Command 6-30
Output Command 6-32
Quit Command . . 6-33
Register Command 6-34
Search Command . 6-39
Trace Command 6-40
Un assemble Command 6-42
Write Command 6-45
Summary of DEBUG Commands 6-49
INDEX . . . . . . . . . . . . . . . . . . .. .X-I
xi
Figures
xii
CHAPTER 1. INTRODUCTION
Contents
What is DOS? . . . . . . . . . . 1-3
What Are the Parts of DOS? 1-3
1-1
1-2
What Is DOS?
1-3
IBMDOS.COM contains a file manager and a series
of service functions that can be used by programs
which are designed to run under DOS's control.
1-4
A Few Words about Files
What Is a File?
A file is a collection of related information. A file on
your diskette is like a folder in a file cabinet.
1-5
How Many Files Can I Have?
Single sided diskettes may contain up to 64 files;
double sided diskettes may contain up to'112 files.
Files on your diskette vary in size just like files in a
file cabinet. If your files contain a lot of information,
your diskette fills up with fewer than 64 (or 112)
files.
1-6
Formatting Your Diskettes
You must format every diskette before it can be used
by DOS. You do not need to use FORMAT every time
you want to put information on a diskette-only the •
first time you use a diskette.
1-7
• Use the DISKCOPY command. DISKCOPY
creates an exact image of an entire diskette on
another diskette. You can use this command to
copy either the DOS diskette or your own
diskette. DISKCOPY is the fastest way of copying
a diskette because it copies everything, including
DOS if it exists, in one operation.
Now that you are more familiar with DOS and files,
let's start up DOS.
1-8
CHAPTER 2. STARTING DOS
Contents
How to Start DOS . . . . . . . . . . . . . 2-3
If Your Computer Power Is Off . . . . 2-3
If Your Computer Power Is Already On 2-4
What Happens When You Start DOS? . 2-4
How to Enter the Date and Time .2-5
Specifying the Default Drive . 2-6
2-1
2-2
How to Start DOS
2-3
If Your Computer Power Is Already On
2-4
How to Enter the Date and Time
When the command processor is loaded, the following
message and prompt are displayed:
4-1-82 or 04/01/1982
2-5
After you enter a valid time, you see this:
A>
2-6
Automatic Program Execution
2-7
Important Notes about Diskette
and Drive Compatibility
2-8
Single-Drive Systems
A>COPY COMMAND.COM B:
Insert diskette for drive B:
and strike any key when ready
1 File(s) copied
A>_
2-9
Now that you know how to start the system and specify
drives, you should learn about the keys on your
keyboard that you can use with DOS.
2-10
Control Keys
2-11
Control Key Function
rrl y.,yo .
'. l:,r", ...:..
.~uJ' J,e.
J
G H J I( l
, • J> • • ' •
•V, •
2-12
Control Key Function
2-13
Control Key Function
"I'
,'" ""
~~------------~--~~~~
2-14
Control Key Function
2-15
DOS Editing Keys
Since the line remains in the input buffer, you can use
that line as a template for editing purposes. The DOS
editing keys operate on that copy of the line. You
can repeat or change the line by using the DOS editing
keys, or you can enter an entirely new line.
2-16
DOS Editing Key Function
.)
W
",~
", ""i
~~----------~--~--
2-17
DOS Editing Key Function
2-18
DOS Editing Key Function
2-19
Examples of Ways to Use DOS Editing Keys
The following examples show how you use the DOS
editing keys with the Line Editor (EDLIN) program.
Notes:
To Start EDLIN
1. Insert your DOS diskette into drive A.
2-20
If you want the EXAMPLES file to reside on the
diskette in your default drive, enter:
EDLIN EXAMPLES
or
EDLIN B:EXAMPLES
New file
*
Notice that the prompt for EDLIN is an asterisk
(*).
New file
*1
1:*
2-21
5. Type Editing is easy. on line 2 and press Enter.
Example 1
Let's delete the first two characters in the word This and
then copy the remainder of the line.
2-22
If you want to continue with the next example:
Example 2
Now we'll change line I; then, using Esc, we will cancel
the change. A back slash (\) will be displayed to
indicate that the displayed line has been cancelled.
2-23
The screen looks like this:
Example 3
Now let's copy one character by using F I or ~. (F I or
~ is the opposite of Del. Del skips over one character
in the template.)
2:*Editing is easy.
2:*
2:*Editing is easy.
2:*Edi
2-24
Example 4
Now let's use the F2 key. Remember, the F2 key copies
all characters from the template to the screen up to, but
not including, the first occurrence of a specified
character.
2:*Editing is easy.
2:*
2:*Editing is easy.
2:*Editin
2:*Editing is easy.
2:*Editing is easy._
2-25
Example 5
Now let's scan and locate specific characters within the
template by using the F 4 key. This is a way to skip
over characters. The cursor does not move when you
use this key and no characters are ~splayed.
2-26
Example 6
Now we'll move the currently displayed line into the
template by using the F5 key. Pressing F5 is the same
as pressing Enter, except that the line is not sent to your
progra~An @ character is displayed to indicate that
the new fIne is now the template.
2. Press F5.
2-27
3. To remove the word not from the replacement
line, press F 1 eight times:
Example 7
Let's look at an example using the Ins key. The Ins
key serves as an on/off switch for entering and leaving
insert mode. You can press the Ins key to enter insert
mode, and press the Ins key again to leave the insert
mode.
2-28
While in the insert mode of operation, any characters
that you enter are inserted in the line being displayed.
The characters do not replace characters in the
template.
2-29
4. Enter one blank space and the three characters
tax.
1. Press Ctrl-Break.
2-30
CHAPTER 3. DOS COMMANDS
Contents
Introduction 3-3
3-2
Introduction
3-3
Types of DOS Commands
• Internal
• External
3-4
Format Notation
3-5
DOS Command Parameters
Parameter Definition
3-6
Parameter Definition
Examples:
B:myprog.COB
A:yourprog
DAT A FI L E. pas
cobfile
3-7
Reserved Device Names
Certain names have special meaning to DOS. DOS
reserves the following names as system devices:
Notes:
3-8
Global Filename Characters
Two special characters? and * can be used within a
filename and its extension. These special characters give
you greater flexibility with the DOS commands.
The ? Character
[] IR J~B?D E<XYZ
ABCDE .XYZ
ABIDE .XVZ
ABODE .XYZ
The * Character
DIR AB*.XYZ
3-9
Here are some example files that might be listed by the
DIR command:
ABCDE .XYZ
ABC357 .XYZ
ABIDE .XYZ
ABIIOU .XYZ
ABO$$$ .XYZ
AB .XYZ
Example 1
DIR A:INPUT.???
or
DIR A:INPUT.*
Example 2
DIR A:????????XYZ
or
DIR A:*.XYZ
3-10
Exmnple 3
DIR A:ABC?????E??
or
DIR A:ABC*.E*
3-11
Detailed Descriptions of the DOS Commands
COpy oldfile.rel;newfile.rel
RENAME,thisfile thatfile
3-12
• Files are not required to have filename
extensions when you create or rename them;
however, you must include the filename extension
when referring to a file that has a filename
extension.
• You can use the control keys and the DOS editing
keys described in Chapter I while entering DOS
commands.
3-13
Batch Processing
Notes:
3-14
Batch Processing
3-15
Batch Processing
1. Enter:
2. Now, enter:
BASIC MENU
3-16
Batch Processing
1 File(s) copied
A>_
The file ASMFILE.BAT, which consists of three
commands, now resides on the diskette in the default
drive.
Notes:
3-18
CHKDSK (Check Disk)
Command
CAUTION
The DOS 1.10 commands should never be executed
when you are running DOS 1.00, and the DOS 1.00
commands should never be executed under DOS 1.10.
Because of the internal changes required for DOS 1.10,
any attempt to run Level 1.00 commands on a 1.10
system (or vice versa) may result in the loss of data.
3-20
COMP (Compare Files)
Command
Remarks: The files that you compare may be on the same drive or
on different drives. Both filenames are optional, but if
you omit them, DOS prompts you for them. You are
also prompted to insert the appropriate diskettes.
COMP waits for you to press a key before it starts
comparing the files.
Files compare ok
Notes:
3-22
COpy
Command
or
3-23
COpy
Command
3-24
COpy
Command
Option 1
Use this option to copy a file with the copied file having
the same filename and extension. For example:
COPY filespec
or
COPY filespec d:
3-25
COpy
Command
COpy B:MYPROG
COpy *.* B:
copies all the files from the diskette in default drive A
to the diskette in drive B, with no change in the
filenames or in the extensions. The filenames are
displayed as the files are copied. This method is very
useful if the files on the diskette in drive A are
fragmented.
Option 2
Use this option when you want the copied file to have a
different name from the file that is being copied. For
example:
or
3-26
COpy
Command
For example:
You can also use reserved device names for the copy
operation. For example:
3-27
COpy
Command
When you press F6, and then press Enter, the COpy
operation ends and saves the infonnation you entered.
In this example, the information is saved in a file named
fileA.
Option 3
For example:
3-28
COpy
Command
COpy A.COM+B.COM
• ASCII - /A
• Binary - /B
For example,
3-29
COpy
Command
3-30
COpy
Command
COpy B:XYZ.ASM+
COpy B:XYZ.ASM+" B:
3-31
DATE
Command
Notes:
Example: In this example, once you press Enter, the date known
to the system is 7/24/82.
A>DATE
Current date is Mon 1-18-1982
Enter new date: 7/24/82
3-33
DEL
Command
3-34
DIR (Directory)
Command
Purpose: Lists either all the directory entries, or only lists those
for specified files. The information provided in the
display for each file includes its size in decimal bytes
and the date the file was last written to.
3-35
DIR (Directory)
Command
Option 1
DIR
or
DIR d:
A>DIR
FILEl A 100 11-17-81 9:56a
FILE3 A 104755 12-01-82 4:13p
9X 2600 2-28-92 10:04p
FILEl 1104 2-27-82 12:13p
4 File(s)
Option 2
or
DIR d:filename.ext
DIR FllE3.A
A>DIR FllE3.A
FIlE3 A 104755 12-01-82 4:13p
1 File(s}
If you enter:
DIR *.A
or
A>DIR *.A
FllEl A 100 11-17-81 9:56a
FIlE3 A 104755 12-01-82 4:13p
2 File(s}
3-37
DIR (Directory)
Command
If you enter:
DIR FILE1
A>DIR FILE1
FILE1 A 100 11-17-81 9:56a
FILE1 1104 2-27-82 12: 13p
DIR FILEt
displays the entry for FILE I, but not for FILE I.A.
3-38
DISKCOMP (Compare Diskette)
Command
3-39
DISKCOMP (Compare Diskette)
Command
Notes:
3-40
DISKCOMP (Compare Diskette)
Command
3-41
DISKCOPY (Copy Diskette)
Command
Remarks: The first parameter you specify is the source drive. The
second parameter is the target drive.
3-42
DISKCOPY (Copy Diskette)
Command
Notes:
For example:
COPY A:*.* B:
3-44
ERASE
Command
~rpose: Deletes the file with the specified filename from the
designated drive, or deletes the file from the default
drive if no drive was specified.
or
DEL filespec
Notes:
3-45
ERASE
Command
A>ERASE A:myprog.l
3-46
EXE2BIN
Command
3-47
EXE2BIN
Command
348
EXE2BIN
Command
ORG 100H
START:
•
•
•
END START
3-49
FORMAT
Command
Remarks: You must format all new diskettes (by using either the
FORMAT or DISKCOPY command) before the
diskettes can be used by DOS.
IBMBIO.COM
IBMDOS.COM
COMMAND.COM
Notes:
A>FORMAT B:/S
3-51
FORMAT
Command
Formatting ...
3-52
MODE
Command
or
or
MODE LPT#:=COMn
3-53
MODE
Command
where:
For example:
MODE lPT1:132,8
where:
3-54
MODE
Command
MODE 80,R,T
where:
3-55
MODE
Command
For example,
MODE COM1:12,N,8,1,P
MODE COM1:12""P
3-56
MODE
Command
MODE LPT#:=COMn
where:
Notes:
3-57
PAUSE
Command
3-58
REM (Remark)
Command
3-59
RENAME (or REN)
Command
Remarks: You can use the abbreviated form REN for the
RENAME command. You can also use the global
characters? and * in the parameters. For more
information about global characters, refer to "Global
Filename Characters" in this chapter.
The command:
3-60
SYS (System)
Command
IBMBIO.COM
IBMDOS.COM
format: SYS d:
3-61
TIME
Command
Remarks: If you enter a valid time with the TIME command, the
time is accepted, and the system prompt appears.
Otherwise, the TIME command issues the following
prompt:
where:
Notes:
3-62
TIME
Command
Example: In this example, once you press Enter, the time known
to the system is changed to 13:55:00.00.
A>TIME
Current time is 00:25: 16.65
Enter new time: 13:55
3-63
TYPE
Command
Notes:
TYPE B:myprog.one
3-64
Summary of DOS Commands
3-65
Command Type Purpose Format
3-66
Command Type Purpose Format
3-67
3-68
CHAPTER 4. THE LINE EDITOR (EDLIN)
Contents
Introduction 4-3
4-1
4-2
Introduction
4-3
How to Start the EDLIN Progrnm
EDLIN filespec
CAUTION
When you start EDLIN, EDLIN erases the backup
copy (.BAK) of the file, if one exists, to ensure
adequate space on the diskette for the updated file.
EDLIN then allocates a new file with the filename
that you specify in the EDLIN command and an
extension of .$$$. The file with an extension of
.$$$ contains the updated file, and is ultimately
renamed to the specified filespec by the End Edit
command.
4-4
• If the specified file does not exist on the drive, a
new file is created with the specified name. The
following message and prompt is displayed:
New file
*
You can now create a new file by entering the
desired lines of text. To begin entering text, you
must enter an I command to insert lines.
4-5
The ED LIN Command Parameters
Parameter Definition
OR
4-6
Parameter Definition
line OR
4-7
Parameter Definition
4-8
The EDLIN Commands
4-9
• Use the control keys and DOS editing keys,
described in Chapter I, while using EDLIN. They
are very useful for editing within a line, while the
ED LIN commands can be used for editing
operations on entire lines.
4-10
Append Lines
Command
Format: [n] A
To edit the remainder of the file that will not fit into
memory, you must write edited lines in memory to
diskette before you can load unedited lines from diskette
into memory by using the Append Lines command.
Refer to the Write Lines command for information on
how to write edited lines to diskette.
,.
Notes:
4-11
Delete Lines
Command
,lineD
deletion starts with the current line and ends with the
line specified by the second parameter. The beginning
comma is required to indicate the omitted first
parameter.
lineD
or
line,D
4-12
Delete Lines
Command
Example: Assume that you want to edit the following file. The
current line is line 29.
5,25 D
4-13
Delete Lines
Command
Lines 5-25 are deleted from the file. Lines 26-29 are
renumbered to 5-8. Line 5 becomes the current line.
,6 0
Lines 5-6 are deleted from the file. Lines 7-8 are
renumbered to 5-6. Line 5 is still the current line, but
now it has different text.
2 0
o
4-14
Delete Lines
Command
4-15
Edit Line
Command
Purpose: Allows you to edit a line of text. You must enter the
line number of the line to be edited, or enter a period
(.) to indicate the current line.
Format: [line]
Remarks: If you just press Enter, you specify that the line after
the current line is to be edited.
The line number and its text are displayed and the line
number is repeated on the line below.
You can use the control keys and the editing keys,
described in Chapter 1, to edit the line, or you can
replace the en tire line by typing new text.
When you press the Enter key, the edited line is placed
in the file and becomes the current line.
*6
6: This is a sample unedited line.
6:*
4-16
Edit Line
Command
*6
6: This is a sample unedited line.
6: This is a sample_
*6
6: This is a sample unedited line.
6: This is a sample edited line._
4-17
End Edit
Command
Format: E
4-18
Insert Lines
Command
Format: [line] I
When you create a new file, you must enter the Insert
Lines command before text can be inserted.
4-19
Insert Lines
Command
Example: Assume that you want to edit the following file. Line 3
is the current line.
*41
4:*
*4
4:*First new line of text
5:*Second new line of text
6:*
4-20
Insert Lines
Command
4-21
List Lines
Command
,line L
line L
or
line, L
4-22
List Lines
Command
Example: Assume that you want to edit the following file. Line 15
is the current line.
5,25 l
4-23
List Lines
Command
1,3 L
3 L
3: line deletion
4: and dynamic
5: line number generation.
•
•
•
15:*This is the current line (note the asterisk)
•
•
•
25: See what happens
4-24
List lines
Command
4: and dynamic
5: line number generation.
•
•
•
15:*This is the current line (note the asterisk)
•
•
•
25: See what happens
26: to the lines
4-25
Quit Edit
Command
Format: Q
Example: Q
Abort edit (V IN)?_
4-26
Replace Text
Command
If you omit the first line, the search begins with line 1.
If you omit the second line, the search ends with the
last line in memory. If you omit both line parameters,
the system will search all the lines in memory for
occurrences of the first string.
4-27
Replace Text
Command
Example: Assume that you want to edit the following file. Line 7
is the current line.
1,7 Rand
4-29
Search Text
Command
4-30
Search Text
Command
Example: Assume that you want to edit the following file. Line 7
is the current line.
1,7 Sand
or
1, Sand
or
,7 Sand
or
Sand
4-31
Search Text
Command
*1,7 Sand
3: the Search Text command.
*4,7 Sand
6: and required string
*
Line 6 now becomes the current line in the file.
*1,7 ? Sand
3: the Search Text command.
O.K.? N
6: and required string
O.K.? Y
*
4-32
Write Lines
Command
Format: [n] W
4-33
Summary of EDLIN Commands
Command Fonnat
End Edit E
Quit Edit Q
4-34
CHAPTER 5. THE LINKER (LINK)
PROGRAM
Contents
Introduction 5-3
Files 5-4
Input Files 5-4
Output Files 5-4
VM.TMP (Temporary File) 5-5
Definitions . 5-6
Segment 5-6
Group . 5-7
Class . . 5-7
5-1
5-2
mtroduction
5-3
Files
Input Files
Output Files
Default Override
Type .ext .ext Used by
lOne of the optional compiler packages available for use with the IBM
Personal Computer DOS.
5-4
VM.TMP (Temporary File)
LINK uses as much memory as is available to hold the
data that defines the load module being created. If the
module is too large to be processed with the available
amount of memory, the linker may need additional
memory space. If this happens, a temporary diskette
file called VM.TMP is created on the DOS default
drive.
5-5
Definitions
Segment
A segment is a contiguous area of memory up to
64K-bytes in length. A segment may be located
anywhere in memory on a paragraph (16-byte)
boundary. Each of the four segment registers defines
a segment. The segments can overlap. Each 16-bit
address is an offset from the beginning of a segment.
The contents of a segment are addressed by a
segment register/offset pair.
5-6
Group
A group is a collection of segments that fit together
within a 64K-byte segment of memory. The segments
are named to the group by the assembler or compiler.
A program may consist of one or more groups.
Class
A class is a collection of segments. The naming of
segments to a class affects the order and relative
placement of segments in memory. The class name is
specified by the assembler or compiler. All portions
assigned to the same class name are loaded into
memory contiguously.
5-7
Command Prompts
Prompt Responses
5-8
Notes:
5-9
Detailed Descriptions of the
Command Prompts
5-10
After a VM.TMP file has been opened, if you specified
an object module on the same drive that VM.TMP
is on and LINK cannot find it, the linker session ends
with the message:
Fatal error
Cannot find file filespec
The default filename for the run file prompt is the first
filename specified on the object module prompt.
5-11
Note: If the list file is allocated to a file on
diskette, that diskette must not be removed until
the LINK has ended.
Fatal error
Cannot find file filespec
Libraries [. LIB] :
You may either list the file specifications for your
libraries, or just press the Enter key. If you press the
Enter key, LINK defaults to the library provided as part
of the Compiler package. The Compiler package also
provides the location of the library. For linking
objects from just the MACRO Assembler, there is
no automatic default library search.
5-12
LINK searches the library files in the order in which
they are listed to resolve external references. When
LINK finds the module that defines the external
symbol, the module is processed as another object
module.
libraries [.LlB]: B:
Linker Parameters
At the end of any of the four linker prompts, you may
specify one or more parameters that instruct the linker
to do something differently. Only the / and first letter
of any parameter are required.
5-13
/DSALLOCATION
/HIGH
5-14
The /HIGH parameter is used with the
/DSALLOCATION parameter.
/LINE
/MAP
/PAUSE
5-15
ISTACK:size
5-16
How to S tart the Linker Program
LINK
5-17
As soon as you have entered the last filename, the linker
begins to run. If the linker finds any errors, it displays
the errors on the screen as well as in the listing file.
5-18
When you use this command line, the prom pts
described in Option I are not displayed if you specified
an entry for all four files or if the command line ends
with a semicolon.
Examples:
LINK module
The object module is MODULE.OB]. A
prompt is given, showing the default of
MODULE.EXE. After the response is
entered, a prompt is given showing the
default of NUL.MAP. After the response
is given, a prompt is displayed showing
the default extension of .LIB.
LINK module;
If the semicolon is added, no further
prompts are displayed. The object
module of MODULE.OB] is linked, the
run file is put into MODULE.EXE, and no
list file is produced.
5-19
LINK module,,;
This is similar to the preceding example,
except the list file is produced in
MODULE.MAP.
LINK module"
Using the same example, but without the
semicolon, MODULE.OBJ is linked, and the
run file is produced in MODULE.EXE, but
a prompt is given with the default of
MODULE.MAP.
LINK module"NUL;
No list file is produced. The run file is in
MODULE.EXE. No further prompts are
displayed.
5-20
From your keyboard, enter:
LIN K @filespec
Example
runfile/p
printout
Command line
LINK @RESP1+mymod,@RESP2;
Notes:
5-21
Example Linker Session
Once we enter:
b:link
Notes:
5-22
Once LINK locates all libraries, the linker map displays
a list of segments in the relative order of their
appearance within the load module. The list looks like
this:
5-23
Now, because we specified the IMAP parameter, the
public symbols are displayed by name and by value.
For example:
0492:0003H ABSNnn
06CD:029FH ABSRnn
0492:00A3H ADDNnn
06CD:0087H ADDRnn
0602:000FH ALLHnn
•
•
•
0010:1BCEH WT4Vnn
0010:1D7EH WTFVnn
0010:1887H WTIVnn
0010:19E2H WTNVnn
0010:11B2H WTRVnn
OOOO:OOO1H MAIN
OOOO:OO10H ENTGnn
OOOO:OO10H MAINnn
0OO3:0000H BEGXnn
0OO3:0095H ENDXnn
•
•
•
F82B: F31 CH CRCXnn
F82B:F31 EH CRDXnn
F82B: F322H CESXnn
F82B:F5B8H FNSUnn
F82B:F5EOH OUTUnn
5-24
The addresses of the public symbols are in the
segment:o!!set format, showing the location relative
to zero as the beginning of the load module. In some
cases, an entry may look like this:
F8CC:EBE2H
5-25
Load Module Memory Map
Low Memory
64K Segment
bases
Load Module
Code
I.)
High Memory
5-26
How to Determine the Absolute Address of a Segment
The linker map displays a list of segments in the relative
order of their appearance within the load module: The
information displayed shows a 20-bit hex address of
each segment relative to location zero. The addresses
that are displayed are not the absolute addresses of
where these segments are actually located. To
determine where relative zero is actually located, we
must use DEBUG. DEBUG is described in detail in
Chapter 6.
Using DEBUG,
5-27
Messages
All messages, except for the warning messages, cause
the LINK session to end. Therefore, after you locate
and correct a problem, you must rerun LINK.
5-28
CHAPTER 6. THE DEBUG PROGRAM
Contents
Introduction 6-3
Go Command. 6-21
6-2
Introduction
6-3
How to Start the DEBUG Program
DEBUG DISKCOMP.COM A: B:
• The segment registers (CS, DS, ES, and SS) are set
to the bottom of free memory; that is, the first
segment after the end of the DEBUG program.
6-4
• The remaining registers (AX, BX, ex, DX, BP, SI,
and DI) are set to zero. However, if you start the
DEBUG program with a filespec, the ex register
contains the length of the file in bytes. If the file
is greater than 64K, the length is con tained in
registers BX and ex (the high portion in BX).
Notes:
6-5
The DEBUG Command Parameters
Parameter Definition
CS:OIOO
4BA:OIOO
100
Notes:
6-6
Parameter Definition
• address address
For example:
-
6-7
Parameter Definition
CS:I00 L 11
Notes:
to be loaded or written.
6-8
Parameter Definition
6-9
Parameter Definition
6-10
The DEBUG Commands
6-11
• You can use the control keys and the DOS editing
keys, described in Chapter I, while using the
DEBUG program.
6-12
Compare
Command
6-13
Dump
Command
Format: D [address]
or
D [range]
6-14
Dump
Command
Option 1
D address
or
6-15
Dump
Command
Option 2
D range
For example:
04BA:0100 42 45 52 54 41 20 54 00
BERTA T.
04BA:0108 20 42 4F 52 47
BORG
6-16
Enter
Command
Option 1
E address list
For example:
Memory locations ds: 100 through ds: 104 are filled with
the five bytes specified in the list.
Option 2
For example:
E address
6-18
Enter
Command
For example:
E cs: 100
04BA:0100 EB.
04BA:0100 EB.41
6-19
Fill
Command
Purpose: Fills the memory locations in the range with the values
in the list.
Remarks: If the list contains fewer bytes than the address range,
the list is used repeatedly until all the designated
memory locations are filled.
6-20
Go
Command
Option 1
G [=address]
6-21
Go
Command
Option 2
G [=addressJ address
[address . .. J
Notes:
6-22
Go
Command
6-23
Hexarithmetic
Command
Example: H OF 8
17 07
6-24
Input
Command
Purpose: Inputs and displays (in hexadecimal) one byte from the
specified port.
Format: I portaddress
Example: I 2F8
68
6-25
Load
Command
Option 1
6-26
Load
Command
Option 2
or
L address
6-27
Load
Command
For example:
DEBUG
-N myprog
-L
6-28
Move
Command
Notes:
The 17 bytes of data from CS: 100 through CS: 110 are
moved to the area of memory beginning at DS:500.
6-29
Name
Command
The file control blocks are set up for the use of the
Load and Write commands, and to supply required
filenames for the program being debugged.
Example: DEBUG
-N myprog
-L
DEBUG myprog
-N filel file2
6-30
Name
Command
-
6-31
Output
Command
6-32
Quit
Command
Format: Q
Remarks: The file that you are working on in memory is not saved
by the Quit command. You must use the Write
command to save the file.
Example: -0
A>
6-33
Register
Command
Format: R [registername]
AX BP SS
BX SI CS
CX DI IP
DX DS PC
SP ES F
6-34
Register
Command
R AX
AX F1E4
or
AX F1E4
:FFF
6-35
Register
Command
I st line - 4 registers
2nd line - 4 registers
3rd line - 4 registers
4th line - I register and 8 flag settings
5th line - next instruction information
6-36
Register
Command
Overflow (yes/no) OV NV
Direction (decrement/increment) DN UP
Interrupt (enable/disable) EI DI
Sign (negative/positive) NG PL
Zero (yes/no) ZR NZ
Parity (even/odd) PE PO
Carry (yes/no) CY NC
RF
If all the flags are in a set condition, the response is:
OV DN EI NG ZR AC PE CV -
6-37
Register
Command
OV ON EI NG ZR AC PE CV - PONZOINV
RF
The response will be:
NV ON 01 NG NZ AC PO CV -
6-38
Search
Command
04BA:0104
04BA:010D
S CS:100 L 11 41 "AB" E
6-39
Trace
Command
Example: T
T 10
6-40
Trace
Command
-
-
6-41
Unassemble
Command
Format: U [address]
or
U [range]
Notes:
6-42
Unassemble
Command
Option 1
or
U address
6-43
Unassemble
Command
Option 2
U range
For example:
U 04BA:100 L 7
or
U 04BA:100 L 8
or
U 04BA:100 L 9
6-44
Write
Command
Option 1 .
Notes:
6-45
Write
Command
W lFD 1 100 A
Option 2
or
W address
6-46
Write
Command
6-47
Write
Command
6-48
Summary of DEBUG Commands
6-49
Command Purpose Fonnat
6-50
MlPENDlXES
Contents
A-I
A-2
APPENDIX A. MESSAGES
•
Ambiguous switch: z
A-3
Attempt to access data outside of segment bounds
BF
DEBUG. Bad flag. An invalid flag code setting was
specified. Try the Register (R F) command again with
the correct code.
A-4
BP
BR
A-5
Canno t find library libname
Enter new drive letter
A-6
COMn: bbbb,p,d,s,t initialized
Compare error(s) on
Track xx, side xx
A-7
Compare more files (YIN)?
Comparing n side(s)
Copy complete
Copying n side(s)
A-8
Data error writing drive x
Abort, Retry, Ignore?
DF
DEBUG. Double flag. Conflicting codes were specified
for a single flag. A flag can be changed only once per
Register (R F) command.
A-9
Disk error reading drive x
Abort, Retry, Ignore?
Notes:
A-tO
Disk error writing drive x
Abort, Retry, Ignore?
Diskettes compare OK
Divide overflow
A-11
Do you see the leftmost 9? (Yin)
Entry error
A-12
EOF mark not found
A-I3
File creation error
File n empty
Files compare OK
Format failure
A-IS
lliegal Device Name
Insert disk with batch file and strike any key when ready
A-16
Insert diskette(s) with files to compare
and strike any key when ready
A-17
Insufficient memory
Invalid date
A-I8
Invalid numeric parameter
Invalid parameter
Invalid parameters
Invalid switch: z
Invalid time
A-19
Line too long
Split the long line into shorter lines; then issue the
Replace Text command again.
Not found
A-21
Not ready error reading drive x
Abort, Retry, Ignore?
Out of paper
Printer fault
A-23
Resident portion of MODE loaded
A-24
Stack size exceeds 65535 bytes
A-25
There was/were number errors detected
A-27
Unrecoverable write error on target
Track xx, side x
10 Mismatches-aborting compare
DOS Structure
DOS consists of the following three components:
B-1
When these function routines are invoked by a
user program, they accept high-level information
(for device input/output) via register and control
block contents, then (for device operations)
translate the requirement into one or more calls
to IBMBIO to complete the request.
DOS InitiaIization
When the system is started (either System Reset or
power ON with the DOS diskette in drive A), the boot
record is read into memory and given control. It checks
the directory to assure that the first two files listed are
IBMBIO.COM and IBMDOS.COM, in that order. (An
error message is issued if not.) The boot record then
reads these two files into memory from absolute diskette
sectors (the file allocation table is not used to locate the
sectors for these files), starting at segment X'60', offset
o (absolute memory address X'600'), and jumps to that
location (the first byte of IBMBIO.COM).
B-2
The last remaining task of initialization is for
IBMBIO.COM to load COMMAND.COM at the
location set up by DOS initialization. IBMBIO.COM
then passes control to the first byte of COMMAND.
B-3
3. A transient portion is loaded at the highest end of
memory. This is the command processor itself,
containing all of the internal command processors,
the batch file processor, and a routine to load and
execute external commands (files with filename
extensions of .COM or .EXE). This portion of
COMMAND produces the system prompt (such as
A> ), reads the command from the keyboard (or
batch file) and causes it to be executed. For
external commands, it builds a Program Segment
Prefix control block immediately following the
resident portion of COMMAND, loads the program
named in the command into the segment just
created, sets the terminate and CTRL-BREAK exit
address (interrupt vectors X'22' and X'23 ') to
point to the resident portion of COMMAND, then
gives control to the loaded program.
B-4
Note: COMMAND.COM should only be replaced
by experienced programmers because of the
significant amount of function in the DOS
command processor.
B-5
Diskette/File Management Notes
Through the INT 21 (function call) mechanism, DOS
provides methods to create, read, write, rename, and
erase files. Files are not necessarily written sequentially
on diskette-space is allocated as it is needed, and the
first location available on the diskette is allocated as
the next location for a file being written. Therefore,
if considerable file creation and erasure activity has
taken place, newly created files will probably not be
written in sequential sectors.
B-6
The Disk Transfer Area (DTA)
The Disk Transfer Area (also commonly called buffer)
is the memory area DOS will use to contain the data for
a\l disk reads and writes. This area can be at any
location within memory, and should be set by your
program. (See function call X"l A'.)
Error Trapping
DOS provides a method by which a program can receive
control whenever a disk read/write error occurs, or when
a bad memory image of the file allocation table is
detected. When these events occur, DOS executes an
INT X'24' to pass control to the error handler. The
default error handler resides in COMMAND.COM, but
any program can establish its own by setting the INT
X'24' vector to point to the new error handler. DOS
provides error information via the registers and provides
Abort, Retry, or Ignore support via return codes.
(Refer to "DOS Interrupts and Function Calls" in
Appendix D.)
B-7
General Guidelines
The following guidelines and tips should assist in
developing applications using the DOS disk read and
write functions:
B-8
6. If the amount of data being transferred is less than
one sector (512 bytes), DOS will buffer the data
for the requesting program in an internal buffer
within IBMDOS.COM. Because there is only one
disk buffer , performing less-than-sector-size
operations in a random manner or against multiple
files concurrently causes DOS to frequently
change the contents of the buffer. If such
operations are in output mode, this forces DOS
to write a partially full sector to make the buffer
available for any other diskette operation.
B-9
The program is in a file named TEST.COM, and was
invoked from the keyboard by the command TEST
FILEI B:PGMl.COM.
B-IO
4. Set the FCB current record and random record
fields to zero, and the record size field to the
desired size.
TEST should:
B-11
2. Determine where PGM l.COM should reside in
memory and set up a segment for it, induding a
Program Segment Prefix (call X'26'). This copies
the terminate and CTRL-BREAK exit addresses
just set into the new segment's Program Segment
Prefix.
B-12
9. Set the DT A to offset X'80' into the new segment.
B-13
B-14
APPENDIX C. DOS DISKETTE
ALLOCATION
Track 0 sector 8
to Data area.
Track 39 sector 8
C-l
Files are not necessarily written sequentially on the
diskette. Diskette space for a file in the data area is
allocated one cluster at a time, skipping over clusters
already allocated. The first free cluster found will be the
next cluster allocated, regardless of its location on the
diskette. This permits the most efficient utilization
of diskette space because clusters made available by
erasing files can be allocated for new files. (Refer to
the description of the "DOS File Allocation Table.")
C-2
DOS Diskette Directory
12-21 Reserved.
where:
C-3
24-25 Date the file was created or last updated. The
mm/dd/yy are mapped in the bits as follows:
where:
mm is 1-12
dd is 1-31
yy is 0-119 (1980-2099)
C-4
Note: If the diskette was formatted with
the /S option (FORMAT command), the
first three files in the directory are
IBMBIO.COM, IBMDOS.COM, and
COMMAND.COM.
C-5
DOS File Allocation Table
C-6
Note: The values FFO-FF7 are used to
indicate reserved clusters (FF7 indicates
bad clusters), and FFS-FFF are used as
end-of-file marks.
C-7
How to Use the File Allocation Table
Obtain the starting cluster of the file from the
directory en try.
3. a
Use MOY instruction to move the word at the
calculated FAT offset into a register.
Diskette Maps
On the following pages, you will find tables of values
for a Single Sided Diskette Map and a Dual Sided
Diskette Map. The columns in these tables have the
following meanings:
TT Track
S Sector
H Side
SEC Relative Sector
CLU DOS Cluster Number
C-8
TT S H SEC CLV TT S H SEC CLV TT S H SEC CLV TT S H SEC CLV
o 1 0 0 0 o 2 0 1 0 o 3 0 2 0 o 4 0 3 0
o 5 0 4 0 o 6 0 5 0 o 7 0 6 0 o 8 0 7 2
1 108 3 1 209 4 1 3 0 A 5 1 4 0 B 6
1 5 0 C 7 1 6 0 D 8 1 7 0 E 9 1 8 0 F A
2 1 0 10 B 2 2 0 11 C 2 3 0 12 D 2 4 0 13 E
2 5 0 14 F 2 6 0 15 10 2 7 0 16 11 2 8 0 17 12
3 1 0 18 13 3 2 0 19 14 3 3 0 lA 15 3 4 0 IB 16
3 5 0 lC 17 3 6 0 ID 18 3 7 0 IE 19 3 8 0 IF lA
4 1 0 20 IB 4 2 0 21 lC 4 3 0 22 ID 4 4 0 23 IE
4 5 0 24 IF 4 6 0 25 20 4 7 0 26 21 4 8 0 27 22
5 1 0 28 23 5 2 0 29 24 5 3 0 2A 25 5 4 0 2B 26
5 5 0 2C 27 5 6 0 2D 28 5 7 0 2E 29 5 8 0 2F 2A
6 1 0 30 2B 6 2 0 31 2C 6 3 0 32 2D 6 4 0 33 2E
6 5 0 34 2F 6 6 0 35 30 6 7 0 36 31 6 8 0 37 32
7 1 0 38 33 7 2 0 39 34 7 3 0 3A 35 7 4 0 3B 36
7 5 0 3C 37 7 6 0 3D 38 7 7 0 3E 39 7 8 0 3F 3A
8 1 0 40 3B 8 2 0 41 3C 8 3 0 42 3D 8 4 0 43 3E
8 5 0 44 3F 8 6 0 45 40 8 7 0 46 41 8 8 0 47 42
9 1 0 48 43 9 2 0 49 44 9 3 0 4A 45 9 4 0 4B 46
9 5 0 4C 47 9 6 0 4D 48 9 7 0 4E 49 9 8 0 4F 4A
10 1 0 50 4B 10 2 0 51 4C 10 3 0 52 4D 10 4 0 53 4E
10 5 0 54 4F 10 6 0 55 50 10 7 0 56 51 10 8 0 57 52
11 1 0 58 53 11 2 0 59 54 11 3 0 5A 55 11 4 0 5B 56
11 5 0 5C 57 11 6 0 5D 58 11 7 0 5E 59 11 8 0 5F 5A
- - - - - - -
(j
I
\0 Figure 7 (Part 1 of 4). Single Sided Diskette Map
S3XION3ddV
-
('j
o
I TT
12
12
S
1
5
H
0
0
SEC
60
64
CLV
5B
SF
TT
12
12
S
2
6
H
0
0
SEC
61
65
CLV
5C
60
TT
12
12
S
3
7
H
0
0
SEC
62
66
CLV
5D
61
TT
12
12
S
4
8
H
0
0
SEC
63
67
CLV
5E
62
13 1 0 68 63 13 2 0 69 64 13 3 0 6A 65 13 4 0 6B 66
13 5 0 6C 67 13 6 0 6D 68 13 7 0 6E 69 13 8 0 6F 6A
14 1 0 70 6B 14 2 0 71 6C 14 3 0 72 6D 14 4 0 73 6E
14 5 0 74 6F 14 6 0 75 70 14 7 0 76 71 14 8 0 77 72
15 1 0 78 73 15 2 0 79 74 15 3 0 7A 75 15 4 0 7B 76
15 5 0 7C 77 15 6 0 7D 78 15 7 0 7E 79 15 8 0 7F 7A
16 1 0 80 7B 16 2 0 81 7C 16 3 0 82 7D 16 4 0 83 7E
16 5 0 84 7F 16 6 0 85 80 16 7 0 86 81 16 8 0 87 82
17 1 0 88 83 17 2 0 89 84 17 3 0 8A 85 17 4 0 8B 86
17 5 0 8C 87 17 6 0 8D 88 17 7 0 8E 89 17 8 0 8F 8A
18 1 0 90 8B 18 2 0 91 8C 18 3 0 92 8D 18 4 0 93 8E
18 5 0 94 8F 18 6 0 95 90 18 7 0 96 91 18 8 0 97 92
19 1 0 98 93 19 2 0 99 94 19 3 0 9A 95 19 4 0 9B 96
19 5 0 9C 97 19 6 0 9D 98 19 7 0 9E 99 19 8 0 9F 9A
20 1 0 AO 9B 20 2 0 Al 9C 20 3 0 A2 9D 20 4 0 A3 9E
20 5 0 A4 9F 20 6 0 AS AO 20 7 0 A6 Al 20 8 0 A7 A2
21 1 0 A8 A3 21 2 0 A9 A4 21 3 0 AA AS 21 4 0 AB A6
21 5 0 AC A7 21 6 0 AD A8 21 7 0 AE A9 21 8 0 AF AA
22 1 0 BO AB 22 2 0 Bl AC 22 3 0 B2 AD 22 4 0 B3 AE
22 5 0 B4 AF 22 6 0 B5 BO 22 7 0 B6 Bl 22 8 0 B7 B2
23 1 0 B8 B3 23 2 0 B9 B4 23 3 0 BA B5 23 4 0 BB B6
23 5 0 BC B7 23 6 0 BD B8 23 7 0 BE B9 23 8 0 BF BA
S3XION3ddV
(j
I TT S H SEC CLV IT S H SEC CLV TT S H SEC CLV IT S H SEC CLV
~
N 36 1 0 120 lIB 36 2 0 121 lIC 36 3 0 122 lID 36 4 0 123 lIE
36 5 0 124 lIF 36 6 0 125 120 36 7 0 126 121 36 8 0 127 122
37 1 0 128 123 37 2 0 129 124 37 3 0 12A 125 37 4 0 12B 126
37 5 0 12C 127 37 6 0 12D 128 37 7 0 12E 129 37 8 0 12F 12A
38 1 0 130 12B 38 2 0 131 12C 38 3 0 132 12D 38 4 0 133 12E
38 5 0 134 12F 38 6 0 135 130 38 7 0 136 131 38 8 0 137 132
39 1 0 138 133 39 2 0 139 134 39 3 0 13A 135 39 4 0 13B 136
39 5 0 13C 137 39 6 0 13D 138 39 7 0 13E 139 39 8 0 13F 13A
0 100 0 o 2 0 1 0 o 3 0 2 0 o 4 0 3 0
o 5 0 4 0 o 6 0 5 0 o 7 0 6 0 o 8 0 7 0 I
1 108 5 1 209 5 1 3 0 A 6 1 4 0 B 6
1 SOC 7 1 6 0 D 7 1 7 0 E 8 1 8 0 F 8
2 1 0 10 D 2 2 0 11 D 2 3 0 12 E 2 4 0 13 E
2 5 0 14 F 2 6 0 15 F 2 7 0 16 10 2 8 0 17 10
3 1 0 18 15 3 2 0 19 15 3 3 0 lA 16 3 4 0 IB 16 I
3 5 0 lC 17 3 6 0 ID 17 3 7 0 IE 18 3 8 0 IF 18
4 1 0 20 ID 4 2 0 21 ID 4 3 0 22 IE 4 4 0 23 IE
4 5 0 24 IF 4 6 0 25 IF 4 7 0 26 20 4 8 0 27 20
5 1 0 28 25 5 2 0 29 25 5 3 0 2A 26 5 4 0 2B 26
5 5 0 2C 27 5 6 0 2D 27 5 7 0 2E 28 5 8 0 2F 28
6 1 0 30 2D 6 2 0 31 2D 6 3 0 32 2E 6 4 0 33 2E
6 5 0 34 2F 6 6 0 35 2F 6 7 0 36 30 6 8 0 37 30
7 1 0 38 35 7 2 0 39 35 7 3 0 3A 36 7 4 0 3B 36
7 5 0 3C 37 7 6 0 3D 37 7 7 0 3E 38 7 8 0 3F 38
8 1 0 40 3D 8 2 0 41 3D 8 3 0 42 3E 8 4 0 43 3E I
8 5 0 44 3F 8 6 0 45 3F 8 7 0 46 40 8 8 0 47 40
9 1 0 48 45 9 2 0 49 45 9 3 0 4A 46 9 4 0 4B 46 I
9 5 0 4C 47 9 6 0 4D 47 9 7 0 4E 48 9 8 0 4F 48
10 1 0 50 4D 10 2 0 51 4D 10 3 0 52 4E 10 4 0 53 4E
10 5 0 54 4F 10 6 0 55 4F 10 7 0 56 50 10 8 0 57 50
11 1 0 58 55 11 2 0 59 55 11 3 0 SA 56 11 4 0 5B 56
11 5 0 5C 57 11 6 0 5D 57 11 7 0 5E 58 11 8 0 SF 58 I
(j
I
~
W Figure 8 (Part 1 of 7). Dual Sided Diskette Map
S3XION3ddV
-
('j
I
~
TT S H SEC CLU
12
12
1 0 60
5 0 64
5D
5F
TT S H SEC CLU
12
12
2
6
0
0
61
65
5D
5F
TT S H SEC CLU
12
12
3
7
0
0
62
66
5E
60
TT S H SEC CLU
12
12
4
8
0
0
63
67
5E
60 /
13 1 0 68 65 13 2 0 69 65 13 3 0 6A 66 13 4 0 6B 66
13 5 0 6C 67 13 6 0 6D 67 13 7 0 6E 68 13 8 0 6F 68 I
14 1 0 70 6D 14 2 0 71 6D 14 3 0 72 6E 14 4 0 73 6E
14 5 0 74 6F 14 6 0 75 6F 14 7 0 76 70 14 8 0 77 70
15 1 0 78 75 15 2 0 79 75 15 3 0 7A 76 15 4 0 7B 76
15 5 0 7C 77 15 6 0 7D 77 15 7 0 7E 78 15 8 0 7F 78
16 1 0 80 7D 16 2 0 81 7D 16 3 0 82 7E 16 4 0 83 7E
16 5 0 84 7F 16 6 0 85 7F 16 7 0 86 80 16 8 0 87 80
17 1 0 88 85 17 2 0 89 85 17 3 0 8A 86 17 4 0 8B 86
17 5 0 8C 87 17 6 0 8D 87 17 7 0 8E 88 17 8 0 8F 88 I
18 1 0 90 8D 18 2 0 91 8D 18 3 0 92 8E 18 4 0 93 8E
18 5 0 94 8F 18 6 0 95 8F 18 7 0 96 90 18 8 0 97 90
19 1 0 98 95 19 2 0 99 95 19 3 0 9A 96 19 4 0 9B 96
I
19 5 0 9C 97 19 6 0 9D 97 19 7 0 9E 98 19 8 0 9F 98
20 1 0 AO 9D 20 2 0 Al 9D 20 3 0 A2 9E 20 4 0 A3 9E I
20 5 0 A4 9F 20 6 0 A5 9F 20 7 0 A6 AO 20 8 0 A7 AO
21 1 0 A8 A5 21 2 0 A9 A5 21 3 0 AA A6 21 4 0 AB A6
21 5 0 AC A7 21 6 0 AD A7 21 7 0 AE A8 21 8 0 AF A8
22 lOBO AD 22 2 0 Bl AD 22 3 0 B2 AE 22 4 0 B3 AE
22 5 0 B4 AF 22 6 0 B5 AF 22 7 0 B6 BO 22 8 0 B7 BO
23 1 0 B8 B5 23 2 0 B9 B5 23 3 0 BA B6 23 4 0 BB B6
23 5 0 BC B7 23 6 0 BD B7 23 7 0 BE B8 23 8 0 BF B8 I
VI
Figure 8 (Part 3 of 7). Dual Sided Diskette Map
S3:XION3:ddV
'IT S H SEC CLU TT S H SEC CLU TT S H SEC CLU 'IT S H SEC CLU
o
-
0 '\
36
36
1
5
0
0
120
124
lID
I1F
36
36
2
6
0
0
121
125
lID
IIF
36
36
3
7
0
0
122
126
lIE
120
36
36
4
8
0
0
123
127
lIE
120
37 1 0 128 125 37 2 0 129 125 37 3 0 12A 126 37 4 0 12B 126
37 5 0 12C 127 37 6 0 12D 127 37 7 0 12E 128 37 8 0 12F 128
38 1 0 130 12D 38 2 0 131 12D 38 3 0 132 12E 38 4 0 133 12E
38 5 0 134 12F 38 6 0 135 12F 38 7 0 136 130 38 8 0 137 130
39 1 0 138 135 39 2 0 139 135 39 3 0 13A 136 39 4 0 13B 136
39 5 0 13C 137 39 6 0 13D 137 39 7 0 13E 138 39 8 0 13F 138
o 1 1 140 0 o 2 1 141 0 o 3 1 142 2 o 4 1 143 2
o 5 1 144 3 o 6 1 145 3 o 7 1 146 4 o 8 1 147 4
1 1 1 148 9 1 2 1 149 9 1 3 1 14A A 1 4 1 14B A
1 5 1 14C B 1 6 1 14D B 1 7 1 14E C 1 8 1 14F C
2 1 1 150 11 2 2 1 151 11 2 3 1 152 12 2 4 1 153 12
2 5 1 154 13 2 6 1 155 13 2 7 1 156 14 2 8 1 157 14
3 1 1 158 19 3 2 1 159 19 3 3 1 15A lA 3 4 1 15B lA
3 5 1 15C IB 3 6 1 15D IB 3 7 1 15E lC 3 8 1 15F lC
4 1 1 160 21 4 2 1 161 21 4 3 1 162 22 4 4 1 163 22
4 5 1 164 23 4 6 1 165 23 4 7 1 166 24 4 8 1 167 24
5 1 1 168 29 5 2 1 169 29 5 3 1 16A 2A 5 4 1 16B 2A
5 5 1 16C 2B 5 6 1 16D 2B 5 7 1 16E 2C 5 8 1 16F 2C
6 1 1 170 31 6 2 1 171 31 6 3 1 172 32 6 4 1 173 32
6 5 1 174 33 6 6 1 175 33 6 7 1 176 34 6 8 1 177 34
7 1 1 178 39 7 2 1 179 39 7 3 1 17A 3A 7 4 1 17B 3A
7 5 1 17C 3B 7 6 1 17D 3B 7 7 1 17E 3C 7 8 1 17F 3C
-
Q
\0
Figure 8 (Part 7 of 7). Dual Sided Diskette Map
S3XION3ddV
C-20
APPENDIX D. DOS INTERRUPTS AND
FUNCTION CALLS
Interrupts
DOS reserves interrupt types X'20' to X'3F' for its use.
This means absolute memory locations X'80' to X'FF'
are the transfer address locations reserved by DOS. The
defined interrupts are as follows with all values in
hexadecimal.
D-l
22 Terminate address. The address represented by this
interrupt is the address to which control transfers
when the program terminates. This address is
copied into the program's Program Segment Prefix
at the time the segment is created. If a program
wishes to execute a second program it must set the
terminate address prior to creating the segment into
which the new program will be loaded. Otherwise,
when the second program executes, its termination
would cause transfer to its host's termination
address. This address, as wen as the CTRL-BREAK
address below, may be set via DOS function call
X'2S'.
D-2
24 Critical error handler vector. When a critical
error occurs within DOS, control is transferred with
an INT 24H. On entry to the error handler, AH
will have its bit 7=0 (high-order bit) if the error
was a hard disk error (probably the most common
occurrence), bit 7= 1 if not.
D-3
The user stack will be in effect (the first item
described below is at the top of the stack), and will
contain the following from top to bottom:
D-4
Notes:
D-5
The number of records specified are transferred
between the given drive and the transfer address.
Logical record numbers are obtained by numbering
each sector sequentially starting from zero and
continuing across track boundaries. For example,
logical record number 0 is track 0, sector 1, side 0,
whereas logical record number X' 12' is track 2,
sector 3, side O. Numbering continues with
record numbers l40-27F on the second side of a
dual sided diskette, beginning at track 0, sector 1,
side 1.
D-7
The functions are as follows with all values in
hexadecimal.
D-8
3 Auxiliary (Asynchronous Communications
Adapter) input. Waits for a character from the
auxiliary input device, then returns that character
in AL.
Notes:
D-9
8 Console input without echo. This function is
identical to function I, except the key is not
echoed.
D-I0
D Disk reset. Selects drive A as the default drive,
sets the disk transfer address to DS:80, and flushes
all file buffers. Files changed in size but not
closed are not properly recorded in the disk
directory. This function need not be called before
a diskette change if all files written have been
closed.
D-ll
It is your responsibility to set the record size (FCB
bytes E-F) to the size you wish to think of the file
in terms of, if the default X'80' is insufficient. It is
also your responsibility to set the random record
field and/or current record field. These actions
should be done after open but before any disk
operations are requested.
D-12
If the FCB provided for searching was a normal
FCB, then the first byte is set to the drive number
used (1 =A, 2=B), and the next 32 bytes contain
the matching directory entry. Thus, the disk
transfer address contains a valid unopened normal
FCB.
D-13
15 Sequential write. On entry, DS :DX point to an
opened FCB. The record addressed by the current
block and current record fields (size determined
by the FCB record size field) is written from the
disk transfer address (or, in the case of records
less than sector sizes, is buffered up for an eventual
write when a sector's worth of data is accumulated).
The record address is then incremented. If the
diskette is full AL returns 01. A return of 02 means
there was not enough space in the disk transfer
segment to write one record, so the transfer was
ended. AL returns 00 if the transfer was
completed successfully.
D-14
17 Rename file. On entry, DS:DX point to a
modified FCB which has a drive code and file name
in the usual position, and a second file name
starting 6 bytes after the first (DS:DX+X'II') in
what is normally a reserved area. Every matching
occurrence of the first name is changed to the
second (with the restriction that two files cannot
have the same name and extension). If?s appear
in the second name, then the corresponding
positions in the original name will be unchanged.
AL returns FF if no match was found or if an
attempt was made to rename to a filename that
already existed, otherwise 00.
18 Not used
IC Not used
ID Not used
IE Not used
IF Not used
D-15
20 Not used
D-16
24 Set random record field. On entry, DS:DX point
to an opened FCB. This function sets the random
record field to the same file address as the current
block and record fields.
D-17
28 Random block write. Essentially the same as
function 27 above, except for writing and a write-
protect check. If there is insufficient space on the
disk, AL returns 0 I and no records are written.
If CX is zero upon entry, no records are written,
but the file is set to the length specified by the
random record field, whether longer or shorter
than the current file size. (Allocation units are
released or allocated as appropriate.)
D-18
The command line is parsed for a filename of the
form d :filename.ext, and if found, a corresponding
unopened FCB is created at ES:DI. If no drive
specifier is present, the default drive is assumed. If
no extension is present, it is assumed to be all
blanks. If the character * appears in the filename
or extension, then it and all remaining characters
in the name or extension are set to ?
D-19
2E Set/reset verify switch. On entry, DL must
contain 0, and AL must contain I to turn verify
on, or 0 to turn verify off. When on, DOS will
perform a verify operation each time it performs
a diskette write to assure proper data recording.
Although disk recording errors are very rare, this
function has been provided for those user
applications in which you may wish to verify the
proper recording of critical data.
D-20
~PENDIX E. DOS CONTROL BLOCKS
AND WORK AREAS
E-l
Notes:
E-3
When a program receives control, the following
conditions are in effect:
E-4
For .COM programs:
E-5
PROGRAM SEGMENT PREFIX
(offsets in hex)
Or-----------------r----------,-------------,------------------------~
Total -Long call to
INT X'20' memory Reserved DOS function dis-
size! patcher (5 bytes)2
8~----------------+---------~------------~~~--------------~
Terminate address
CTRL-BREAK
exit address
(IP, CS) (IP)
10~------~----------------~--------~
CTRL-BREAK CRITICAL ERROR
exit address exit address
~CS) (IP, CS)
Reserved
J
Unformatted parameter area
(default disk transfer area) T
~ ...
lOO~--------------------------------~-
E-6
"'!1
c:
('D
n
o
=
tt
-7
FILE CONTROL BLOCK
r - - -,- - - - - - - - - - - - - - - - T - - -, FCB --
o
=
o
I X'FF' I Zeros I Attribute I extension (")
~
I I
o J
I
Standard
Drive Filename (8 bytes) or Reserved device name
FCB
8 I
S3XION3ddV
Standard File Control Block
Byte Function
E-8
Byte Function
where:
mm is 1-12
dd is 1-31
yy is 0-119 (1980-2099)
E-9
Notes:
Byte Function
E-I0
Any reference in the DOS Function Calls (refer to
Appendix D) to an FCB, whether opened or unopened,
may use either a normal or extended FCB. If using an
extended FCB, the appropriate register should be set
to the first byte of the prefix, rather than the drive-
number field.
E-ll
E-12
APPENDIX F. EXE FILE STRUCTURE
AND LOADING
F-l
Hex Offset Contents
F-2
1. A Program Segment Prefix is built following the
resident portion of the program that is performing
the load operation.
F-3
F-4
IMPORTANT INFORMATION
G-l
Conversion
SYS B:
System transferred
COpy COMMAND.COM B:
1 File(s) copied
G-2
6) Type the following command and press the
Enter (~) key.
COpy BASIC.COM B:
1 File(s) copied
G-3
5) Run the RECOVER DATA FILES program-
when the program asks you to insert a blank,
formatted diskette, use the diskette you
formatted and labeled in step 3. This will make a
new Data Diskette with the files enlarged- your
da ta will remain in tact.
G-4
2) When you create your new Data Diskette for a
Peachtree Software Incorporated application
on 320KB diskettes and drives, the maximum
file space increases by 160,000 bytes. Add this
amount of space anywhere the Peachtree
Software Incorporated application manual
references the maximum diskette capacity to
calculate your file sizes.
Conversion
G-5
1) Check to be sure that both your 320KB drives
have been installed in your system unit.
G-6
INDEX
X-2
class 5-7 Communications Adapter,
clear condition 6-36 Auxiliary Asynchronous D-9
close file D-12 COMP command 3-21, 3-39,
cluster number, relative C-4 3-65
cluster, calculate C-8 Compare command 6-13
cluster, locate next C-6, C-8 comparing diskettes 3-39
cluster, starting C-4 comparing files 3-21
clusters B-6, C-2 comparing memory 6-13
codes, error D-3 compatibility (drive and
codes,return B-13 diskette) 2-8
codes, 8088 instruction 6-22 COM 1: - reserved device
colon 3-5, 3-8 name 3-8
Color/Graphics Monitor CON: - reserved name for
Adapter 3-53 console/keyboard 3-8
COM filename extension 3-4, concatenation 3-23, 3-28
B-4 console I/O, direct D-9
COM programs E-5 console/keyboard 3-8
comma 3-5 console/keyboard
command line routines B-5
linker 5-18 control blocks E-l
command parameters control keys 2-11,3-13,4-10,
DEBUG 6-6 6-14
DOS 3-6 COPY command 1-8,3-16,
EDLIN 4-6 3-23,3-40,3-43,3-65
command processor 1-4, copying diskettes 1-8, 3-42
2-5-2-8, B-3 copying DOS files 1-8
command processor, replacing copying files 3-23
the B-4 correcting input lines 2-16
command processor, resident create file D-14
portion of B-3 creating a .BAT file 3-16
command prompt, creating a backup diskette 1-8
DEBUG 6-12 creating a batch file 3-14
command prompt, DOS 2-6 creating a new file 4-5,4-19
command prompts, linker 5-8 critical error handler B-3, B-5
COMMAND.COM 1-4,2-4, critical error handler
3-50, 6-4, B-3, C-5, E-3 vector D-3
commands critical error handling B-3
DEBUG 6-11 CS register 6-4, 6-21, 6-23,
DOS 3-12 6-26,6-29,6-46, D-I, D-4,
EDLIN 4-9 E-3, E-4
commands, end 3-13 Ctrl key 2-4, 2-11
commands, summary of Ctrl-Break 5-9
DEBUG 6-49 CTRL-BREAK exit
DOS 3-65 address B-4, B-5, D-2
EDLIN 4-34 CTRL-BREAK handler B-3,
Communications B-5
Adapter 3-55
X-3
Ctrl-Break keys 2-11, 2-22, Register 6-34
3-13,3-15,3-58,4-9,4-16, Search 6-39
4-20, 6-11 summary of 6-49
Ctrl-Enter keys 2-12 Trace 6-40
Ctrl-NumLock keys 2-12, Unassemble 6-42
3-13, 4-9, 6-11 Write 6-45
Ctrl-PrtSc keys 2-13, 3-64 DEBUG program
Ctrl-Z character 3-29 command parameters 6-6
Ctrl-Z keys 4-28 commands 6-11
current block number E-8 common information 6-11
current disk D-15 ending 6-33
current relative record how to start 6-4
number E-9 prompt 6-12
CX register 6-5,6-28,6-47, summary of commands 6-49
D-4 what it does 6-3
CY flag set condition 6-37 default disk transfer
address 6-5
default drive
D changing the 2-6
linker 5-9
d: parameter 3-6
default 3-6 specifying the 2-6
parameter 3-6 default segment 6-6
data area C-2 defective tracks 3-50
data blocking/deblocking B-1 DEL command 3-34
date Del key 2-4, 2-17, 2-22
change 3-32 delete file D-13
enter 2-5,3-32 Delete Lines command 4-12,
get D-19 4-34
set D-19 deleting files 3-45
DATE command 3-32, 3-65 delimiters 3-12, 4-9, 6-14
date file created or destination area 6-29
updated E-9 device handler, I/O 1-3
deblocking/blocking, data B-1 device names, reserved 3-8,
DEBUG commands 3-27
Compare 6-13 DGROUP 5-14
Dump 6-14 DI flag clear condition 6-37
Enter 6-17 DI register 6-5, D-3, D-4
Fill 6-20 DIR command 3-9,3-35,3-51,
Go 6-21 3-66
Hexarithmetic 6-24 direct console I/O D-9
Input 6-25 direction flag 6-37
Load 6-26 directory 1-6, C-1
Move 6-29 directory, analyze 3-19
Name 6-30 directory entries, listing 3-35
Output 6-32 directory searches C-3
Quit 6-33
X-4
disk remarks 3-59
current D-15 display instructions 6-42
reset D-ll display output D-2, D-8
select D-l1 displaying memory 6-14
Disk BASIC 2-13 divide-by-zero B-1
disk error handling B-3 DN flag set condition 6-37
disk read, absolute D-5 DOS
disk transfer address 6-5, E-4 available functions B-5
disk transfer address, set D-15 command parameters 3-6
Disk Transfer Area control blocks E-l
(DTA) B-7 copying DOS files 1-8
disk write, absolute D-6 diskette allocation C-l
DISKCOMP command 3-39, diskette directory C-3
3-44,3-66 editing keys 2-16
DISKCOPY command 1-8, EDLIN 4-3
3-39,3-42,3-66 how to start 2-3
diskette and drive Initializa tion B-2
compatibility 2-8 memory map E-l
Diskette/File Management B-6 parts of 1-3
diskettes program segment E-3
allocating space B-6, C-6 prompt 2-6
allocation C-l structure B-1
analyze 3-50 technical information B-1
back up 3-40 work areas E-l
backing up 1-8 DOS commands
change 3-58 Batch processing 3-14
comparing 3-39 CHKDSK 3-19
copying 1-8, 3-42 common information 3-12
creating a backup 1-8 COMP 3-21·
damaged 1-8 COpy 3-23
defective tracks 1-8, 3-50 DATE 3-32
directory C-3 DEL 3-34
filenames 3-7 DIR 3-35
formatting 1-8 DISKCOMP 3-39
fragmented 3-43 DISKCOPY 3-42
handling routines B-5 ERASE 3-45
initialize 3-50 EXE2BIN 3-47
new 1-8 external 3-4
number of files 1-6 FORMAT 3-50
preparing 3-50 internal 3-4
recording format 3-50 MODE 3-53
status report 3-19 PAUSE 3-58
display REM 3-59
byte contents 6-1 7 RENAME (or REN) 3-60
flags 6-36 summary of 3-65
lines 4-22 SYS 3-61
registers 6-35 TIME 3-62
X-5
DOS commands (continued) creating a batch file 3-14
TYPE 3-64 Delete Lines 4-12
types of 3-4 Edit Line 4-16
DOS editing keys End Edit 4-18
entering DOS how to start 4-4
commands 3-13 Insert Lines 4-19
examples using 2-20-2-30 List Lines 4-22
using DEBUG 6-12 program 4-3
using EDLIN 4-10 Quit Edit 4-26
drive 3-6 Replace Text 4-27
drive - DEBUG parameter 6-7 Search Text 4-30
drive and diskette used with DOS editing
compatibility 2-8 keys 2-20
DS register 6-4, 6-5, 6-17, 6-20, Write Lines 4-33
6-29, D-4, E-4 EDLIN commands, summary
IDSALLOCA TION linker of 4-34
parameter 5-14 EDLIN prompt 2-21
DT A (Disk Transfer EI flag set condition 6-37
Area) B-7 ellipsis 3-5
dual sided diskette emptying the template 2-28
allocation C-2 End Edit command 4-5,4-18,
number of files 1-6 4-34
dummy device 3-8 end-of-file 3-29
dummy parameters 3-17, 3-18 end-of-fi1e mark C-7
Dump command 6-14,6-49 ending commands 3-13
DX register 6-5, D-4 Enter command 6-17, 6-49
enter date 2-5, 3-32
Enter key 2-11, 2-16, 3-8, 4-9
E enter time 2-5, 3-62
entries, search for D-12
edit equal sign (=) 3-5
backup file 4-4 ERASE command 3-45, 3-66
existing file 4-4 erasing files 3-45
partial file 4-1 1 error codes D-3
Edit Line command 4-16, error handler B-7
4-34 error handling
editing keys 2-16,3-13,4-10, cri tical B-3
6-12 disk B-3
editing template 2-16 error messages A-3
EDLIN error trapping B-7
prompt 4-4 error, syntax 6-12
Append Lines 4-11 ES register 6-4, 6-5, D-4, E-4
command parameters 4-6 Esckey 2-14,2-17,2-23,4-16
commands 4-9 EXE file structure F-1
common information 4-9 EXE filename extension 3-4,
compared to DOS editing 5-11, 6-5, 6-28, 6-48, B-4, E-3
keys 2-16 EXE files, load F-1
X-6
EXE programs D-6, E-4 per diskette 1-6
execute instructions 6-40 random B-6
execute program 6-21 rename D-15
executing a .BAT file 3-18 sectors B-6
EXE2BIN command 3-47, seq uen tia1 B-6
3-66 size D-16
existing file, edit 4-4 source 4-3
ext 3-7 system E-10
extended ASCII codes D-8 text 3-64, 4-3
extensions 3-7 File Allocation Table
extensions, filename (FAT) 1-6 , B-2, B-6, C-l , C-6
.BAK 4-5,4-18,4-26 file allocation table, how to
.COM 3-4, B-4 use C-8
.EXE 3-4, 6-5, 6-28, 6-48, file buffers D-1
B-4, E-3 File Control Block (FCB) 6-30,
.EXE filename B-6, E-10
extension 5-11 file sectors
.HEX 6-5,6-28,6-48 chaining B-6
.MAP 5-11 mapping B-6
.OBJ 5-10 file size E-9
$$$ 4-4 file structure, .EXE F-l
length in characters 1-5 filename characters, global 3-9
external commands 3-4, B-4 filename extensions
.BAK 4-5,4-18,4-26
.BAT 3-14
F .COM 3-4, B-4
.EXE 3-4,6-5,6-28,6-48,
F AT (see File Allocation B-4, E-3
Table) .EXE filename
FCB E-10 extension 5-11
FCB (see File Control Block) .HEX 6-5, 6-28, 6-48
file .MAP 5-11
attribute C-3 .OBJ 5-10
close D-12 $$$ 4-4
create D-14 characters, valid 3-7
date created or updated E-9 in directory C-3
delete D-13 in file control block E-8
displaying contents of 3-64 length in characters 1-5
erasing 3-45 separators D-19
fragmented 3-26 terminators D-19
hidden C-3, C-5, D-14, E-1 0 filename, parse D-18
how DOS keeps track of 1-6 filenames
length in characters 1-5 characters, valid 3-6
naming convention 1-5 in directory C-3
object files 6-3 in file control block E-8
object program 3-64 length of 3-6
open D-ll renaming 3-60
X-7
filespec 3-7 in RENAME 3-60
filespec - DEBUG Go command 6-21,6-47,6-49
parameter 6-7 group 5-7
Fill command 6-20, 6-49
First Asynchronous
Communications Adapter H
port 3-8
fixups, segment 3-47 header F-1
flag byte E-10 HEX filename extension 6-5,
flag values 6-37 6-28,6-48
flags 6-5 Hexarithmetic command 6-24,
flags, display 6-36 6-49
FORMAT command 1-3, 1-8, hidden files 3-19, 3-51, C-3,
3-50, 3-61, 3-66, C-3 C-5, D-14, E-10
format notation 3-5 /HIGH linker parameter 5-6,
FORMAT status report 3-51 5-14
formatting diskettes high memory 5-14, 6-5, B-4
what it does 1-7 high/low loader switch F-2
fragmented diskettes 3-43
fragmented files 3-26
function calls D-7 I
functions, available DOS B-5
functions, built-in B-1 I/O device handler 1-3
F1 key 2-17,2-24,2-28 IBMBIO.COM 1-3,3-36,3-46,
F2key 2-18,2-25 3-50, B-1, B-2, B-3, C-5
F3 key 2-18, 2-22, 2-23, 2-25, IBMBIO.COM, location on
6-26 diskette C-2
F4key 2-18,2-26 IBMDOS.COM 1-3,3-35,
F5 key 2-19, 2-27, 4-17 3-45, 3-50, B-1, B-2, C-5
F6 key 3-8, 3-16, 3-28, 4-29 IBMDOS.COM, location on
diskette C-2
initialization, DOS B-2
G initialize diskettes 3-50
initializing the Asynchronous
generating line numbers 4-3 Communications Adapter 3-55
get input buffer 2-16
date D-19 Input command 6-25,6-49
time D-19 input files
global filename characters linker 5-4
* 3-9 input, auxiliary D-9
? 3-9 Ins key 2-19, 2-28
examples using 3-10 Insert Lines command 4-19,
in command name 3-13 4-34
in COMP 3-22 insert mode 2-23, 2-27,2-28,
in COPY 3-25 4-20
in DIR 3-35 inserting c;haracters 2-28
in ERASE 3-45 inserting lines 4-3
X-8
instruction codes, 8088 6-22
Instruction Poin ter (lP) 6-4
L
instruction set, 8088 B-1 /LINE linker parameter 5-15
instructions line - EDLIN
display 6-42 parameter 4-6
execute 6-40 Line Editor Program 2-16,
unassemble 6-42 2-20,4-3
variable length 6-42 line numbers 4-3
INT X'24' B-7 linefeed D-2
INT 21 B-6 lines, renumber 4-12,4-19
interface module, BIOS B-1 LINK
internal command See linker (LINK) program
processors B-4 linker (LINK) program
internal commands 3-4 command line 5-18
interrupt codes 6-22 command prompts 5-8
interrupt flag 6-37 example session 5-22
interrupt mechanism, messages 5-28
8088 B-1 starting 5-1 7
interrupt vectors B-2 linker files
interrupt X'20' D-l automatic response 5-4,
interrupt X'22' B-4, B-5, D-l 5-20
interrupt X'23' B-4, B-5, D-2 input 5-4
interrupt X'24' B-5, D-4 library 5-4, 5-12
interrupt X'25' D-5 listing 5-4, 5-11
interrupt X'26' D-5 object 5-4, 5-10
interrupt X'27' B-5, D-6 output 5-4
interrupt, set D-17 run 5-4, 5-11
interrupts D-l linker parameters
invoking one batch file from /DSALLOCATION 5-14
another 3-15 /HIGH 5-6,5-14
IP (Instruction Pointer) 6-4 /LINE 5-15
IP register 6-21, 6-34, D-4, E-5 /MAP 5-15
IRET D-2 /PAUSE 5-15
/STACK 5-16
linker prompts 5-10
K list - DEBUG parameter 6-7
List Lines command 4-22,
keyboard 3-8 4-34
keyboard input D-8 listing directory entries 3-9,
keyboard input, buffered D-I0 3-35
keyboard status, check D-I0 Load command 6-26, 6-47,
keys, control 2-11, 3-13, 4-10, 6-49
6-12 load module 5-16, 5-25
keys, DOS editing 2-16,3-13, load module memory map 5-26
4-10, 6-12 loading .EXE files F-l
keywords 3-5 loading programs 3-47
X-9
locate next cluster C-6, C-8
logical record numbers D-6
o
logical record size E-8 OBJ extension 5-10
LPT 1: - reserved name for object files 6-3
printer 3-8 object modules 5-10
object pn:>gram files 3-64
open file D-11
M operation, suspend
system 2-12,3-58
/MAP linker parameter 5-15 optional remarks, PAUSE
MAP extension 5-11 command 3-58
mapping file sectors B-6 Output command 6-32, 6-49
memory output files
high 5-14, 6-5, B-4 linker 5-4
low 5-14 output routines B-5
memory management output, auxiliary D-9
routine B-6 output, display D-2, D-8
memory maps OV flag set condition 6-37
DOS E-1 overflow flag 6-37
load module 5-26
memory status report 3-19
memory, loading files into 4-4 p
messages A-3
messages, linker 5-28 paragraph boundary 5-6
MODE command 3-53, 3-66 parallel printer to Asynchronous
Monochrome Display Printer Communications Adapter 3-57
Adapter 3-54 parameters
MOV instruction C-8 DEBUG 6-6
Move command 6-29,6-49 DOS 3-6
multi-drive system 2-9 dummy 3-17
EDLIN 4-6
sa ve area E-4
N testing with different 6-21
parity flag 6-37
n - EDLIN parameter 4-7 parse filename D-18
NA flag clear condition 6-37 partial file, edit 4-11
Name command 6-30, 6-49 jPAUSE linker parameter 5-15
NC flag set condition 6-37 PAUSE command 3-58,3-66
new diskette 1-8 PC register 6-34
NG flag set condition 6-37 PE flag set condition 6-37
notation, format 3-5 percent sign C%) 3-17
NUL: - reserved device period C.) 4-7, 4-16
name 3-8 physical append 3-31
numbers, line 4-3, 4-12 PL flag clear condition 6'-37
NV flag clear condition 6-37 plus sign
NZ flag clear condition 6-37 in automatic response
file 5-20
x-tO
plus sign (continued) Read-Only Memory
in response to linker (ROM) B-1
prompt 5-10 read, random D-16
PO flag clear condition 6-37 read, random block D-17
portaddress - DEBUG read, seq uen tial D-13
parameter 6-7 record number, relative E-9
pound sign (#) 4-6 record numbers, logical D-6
prepare diskettes 3-50 record size, logical E-8
print displayed output 2-13 recording format, diskette 3-50
print screen output 2-14 Register command 6-34, 6-50
print string -D-I0 registername - DEBUG
printer 2-13,3-8,3-53 parameter 6-8
printer output D-9 registernames, valid 6-34
printer output routines B-5 registers, display 6-35
PRN: - reserved name for relative cluster number C-4
printer 3-8 relative record number E-9
program execution, stop 6-21 relative sector num ber 6-8
program segment relative zero 5-25
create new D-17 relocatable loader 5-4
DOS E-3 relocation F-3
Program Segment Prefix 6-5, REM command 3-59,3-67
B-4, B-5, B-7, E-5 remarks, display 3-59
program terminate D-6 remarks, PAUSE
protocol parameters 3-56 command 3-58
public symbols 5-24 REN command 3-60, 3-67
punctuation 3-5 RENAME command 3-60,
3-67
rename file D-15
Q renumber lines 4-12, 4-20
replace byte contents 6-17
question mark 3-5, 3-9 Replace Text command 4-27,
Quit command 6-33, 6-50 4-34
Quit Edit command 4-26,4-34 replacing characters 2-27
quotation marks 6-9 replacing the command
processor B-4
reserved device names 3-8,
R 3~27
reset, disk D-ll
random access B-6 reset, system 2-4, B-2
random block read B-6, D-l 7 resident portion of command
random block write B-6, D-18 processor B-3
random read D-16 return codes B-13
random record field, set D-17 ROM (Read-Only
random write D-16 Memory) B-1
range - DEBUG· ROM BIOS routine D-9
param.eter 6-7, 6-8
X-I-1
routines semicolon delimiter 3-12
console/keyboard B-5 separators, filename D-18
device B-1 sequential read D-13
diskette handling B-5 sequential write D-14
keyboard input B-5 set
memory management B-6 date D-19
output B-5 interrupt D-l 7
printer output B-5 random record field D-17
ROM BIOS D-9 time D-19
time function B-5 verify switch D-20
run file 5-11 set condition 6-36
set disk transfer address D-15
Shift-PrtSc keys 2-14
\ SI register 6-5, D-4
sign flag 6-37
\ back slash 2-14, 2-23 single sided diskettes
allocation C-2
compatible drives 2-8
s directory 1-6
single-drive system 2-9, 3-40,
save area, parameter E-4 3-43,D-ll
saving diskette space 3-47 size, file D-16, E-9
screen 3-8 slashes 3-5
screen display source area 6-29
restart 2-13 source drive 3-13
suspend 2-13 source files 4-3
screen output, print 2-14 SP (Stack Pointer) 6-4
Search command 6-39,6-50 SP register E-5
search for entries D-12 space allocation B-6, C-l
Search Text command 4-30, space delimiter 3-12
4-34 special characters 3-9
sector - DEBUG specifying a drive 3-6
parameter 6":8 square brackets 3-5
sector boundary C-I SS register 6-4, E-4
sector number, relative 6-8 stack allocation statement 5-16
sector, absolute 6-45 /ST ACK linker parameter 5-16
sectors 1-6, 3-43, 6-8 Stack Pointer (SP) 6-4
sectors, file B-6 stack space B-2
segment 5-6, 5-10 stack, user D-4
SEGMENT command 5-16 start segment F-3
segment fixups 3-47 starting cluster C-4
segment registers 6-4, 6-43 starting DEBUG 6-4
segment, create new starting DOS
program D-17 computer power off 2-3
segment, default 6-6 computer power on 2-4
segment, start F-3 methods 2-3
select disk D-ll starting ED LIN 4-4
X-12
starting the linker 5-1 7 Trace command 6-40, 6-47,
status report 3-19 6-50
stop program execution 6-21 track/sector, calculate
string - OEBUG parameter 6-9 absolute C-4
string - EO LIN parameter 4-8 tracks, defective 3-50
structure, DOS B-1 transfer address, disk E-4
summing files 3-31 transfer system files 3-61
suspend screen output 2-13 transient portion of command
suspend system operation 2-12, processor B-4
3-58 TYPE command 3-64, 3-67
switch, high/low loader F-3 types of DOS commands 3-4
symbols, global and
public 5-15
syntax error 6-12
SYS command 3-61, 3-67
u
system devices 3-8 Unassemble command 6-42,
system file E-IO 6-50
system files, transfer 3-61 unassemble instructions 6-42
system prompt 2-9,3-13, B-4 unprintable characters 6-14
system reset 2-4,B-2 UP flag clear condition 6-37
user stack 0-4
T
target drive 3-13
v
technical information, DOS B-1 value 6-10
template 2-16 variable length
temporary file, VM.TMP 5-10 instructions 6-42
terminate address B-5 verify switch D-20
terminate address VM.TMP temporary file 5-10
interrupt 0-1
terminate but stay resident B-3
terminate commands 3-13
terminate program 0-8
w
termina te program work areas E-l
interrupt 0-1 Write command 6-45, 6-50
terminators, filename 0-18 Write Lines command 4-33,
text files 3-64, 4-3 4-34
thrashing B-9 write, random 0-16
time write, random block 0-18
enter 2-5, 3-62 write, sequential 0-14
get 0-19
set 0-19
TIME command 3-62,3-67
time function routines B-5
z
time, change 3-62 zero flag 6-37
ZR flag set condition 6-37
X-13
X-14
The Personal Computer
Software Library
Comments:
aJa4 PIO::!
Comments:
aJa4 PIO:!
Comments:
aJa4 PIO::!
6172220
Printed in USA
READ THIS FIRST
BASIC TERMINAL/C:O
You can use either DOS EDLIN or COpy to make this
change.
°
Another DOS Version 1.1 change is the packaging of
some DOS functions. For example, in Version 1.00,
TIME and DATE are external commands (individual
COM files). In Version 1.10 they are part of DOS itself
(internal). Thus, it is not necessary to copy these
functions to any of your DOS-based applications in
Version 1.10. If you have any batch programs that copy
these functions to your applications, they don't need tobe
changed; but don't be alarmed if you get the message:
o File(s) Copied
in response to a Version 1.10 DOS COpy command for
any such request. We mention this because some of our
applications (like Dow Jones Reporter) put these
commands on their program diskette.
WARNING
With DOS Version 1.10 and on a "mixed" drive system it
is possible to make a backup copy of an application that
will not run on the system that it was made on. This
potential usually exists on systems where Drive A is 160K,
Drive B is 320K and the process to create the backup
diskette uses the DOS FORMAT command first to format
the backup diskette and then the DOS COPY command
to copy the programs onto the backup diskette. Should
you have this situation and it can exist, then use the DOS
TYPE command to display any batch file that may be used
to create a backup copy. If the display shows a line like the
one that follows:
FORMAT B:/S
then use the DOS EDLIN command and change that line
to the following:
FORMAT B:/S/1
In the case of the IBM Dow Jones Reporter where you are
following the instructions in the book and you are told to
enter:
FORMAT' A:/S
to avoid any potential problems type
FORMAT A:/S/l
This will insure your backup diskette is formatted the
same as the Reporter diskette.
FORMAT II
or the data diskette will not be usable.
. . . In Closing
A final word about DOS Version 1.10 - we've just
brushed the surface of the many enhancements. If you are
a Version 1.00 user, take the time to read the DOS manual
to gain a more detailed understanding of the new and
enhanced functions. If you are not a former user, then
read the book anyway; it will help you get started more
quickly.