Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 216

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Model II
TRSDOS
OPEN
(function code 40)
This one call handles both the creation and opening of files.
A given file can only be Open under one Data Control Block at a time.
Because of the versatile file processing routines, this one
DCB
is sufficient to
handle the various
to
applications.
Entry Conditions for OPEN
(DE)
=
60-byte Data Control Block (see below)
(HL)
=
II-byte Parameter List (see below)
A=
40
Exit Conditions
NZ
=
Error
A
=
Error Code
Before calling
OPEN,
you must reserve space for the Data Control Block,
Parameter List, Buffer Area and Record Area, as described below.
Data Control Block (60 bytes)
The Data Control Block
(DCB)
is used by the System for file access
bookkeeping. You will also use it to pass the filespec for the file you want to
Open, as follows:
Before calling
OPEN.
place the filespec at the beginning of the
DeB,
followed
by a carriage return. See File Specification in Section 1 of this manual.
For example
($
signifies a carriage return):
CONTENTS OF FIRST BYTES OF DCB BEFORE OPEN
252

Advertisement

loading