NEC CP/M-86 System Reference Manual page 48

Advanced personal computer
Table of Contents

Advertisement

Basic Disk Operating System (BDOS) Functions
4-14
SELECT DISK
ENTRY
CL: OEH
D L: Selected
Disk
RETURN
FUNCTION 14
SELECT DISK
The Select Disk function designates the disk drive named in register DL as the
default disk for subsequent file operations. DL is 0 for Drive A, 1 for Drive B, and
so on through 15 for Drive P in a full sixteen-drive system. (Recall, however that the
APC currently supports only Drives A through D for diskettes and Drives E
through H for hard disk.) The function logs in the designated drive if the drive is
currently in the reset state. Logging in a drive places it in "online" status. This
activates the drive's directory until the next cold start, warm start, disk system reset,
or drive reset operation. FCBs which specify drive code zero (dr
=
OOH) automati-
cally reference the currently selected default drive. Drive code values from 1 to 15,
however, ignore the selected default drive and directly reference Drives A through
P.
OPEN FILE
ENTRY
CL: OFH
DX: FCB
Offset
RETURN
FUNCTION 15
AL: Return Code
OPEN FILE
The Open File function activates an FCB specifying a file which exists in the disk
directory for the currently active user number. The BDOS scans the disk directory
of the drive specified by byte 0 of the FCB addressed by register DX for a match in
positions 1 through 12 of the FCB. An ASCII question mark (3FH) matches any
directory character in any of these positions. Normally, no question marks are
included and byte "ex" of the FCB is set to zero before the Open File call is made.
If a directory element is matched, the relevant directory information is copied into
bytes dO through
dn
of the FCB, thus allowing access to the file through subsequent
read and write operations. An existing file must not be accessed until a successful
open operation is completed. Further, an FCB not activated by either an Open File
or Make File function must not be used in BDOS read or write commands.

Advertisement

Table of Contents
loading

Table of Contents