User`s guide

If the open operation is successful, the user's FCB is activated for read and write
operations. The relevant directory information is copied from the matching directory
FCB into bytes d0 through dn of the FCB. If the file is opened under user zero when
the current user number is not zero, interface attribute f8' is set to one in the user's
FCB. In addition, if the referenced file is password protected in Write mode, and the
correct password was not passed in the DMA, or did not match the default pass-
word, interface attribute f7' is set to one. Write operations are not supported for an
activated FCB if interface attribute f7' or f8' is true.
When the open operation is successful, the open function also makes an Access
date and time stamp for the opened file when the following conditions are satisfied:
the referenced drive has a directory label that requests Access date and time stamp-
ing, and the FCB extent number field is zero.
Upon return, the Open File function returns a directory code in register A with the
value OOH if the open was successful, or FFH, 255 decimal, if the file was not found.
Register H is set to zero in both of these cases. If a physical or extended error was
encountered, the Open File function performs different actions depending on the
BDOS error mode (see Function 45). If the BDOS error mode is in the default mode,
a message identifying the error is displayed at the console and the program is termi-
nated. Otherwise, the Open File function returns to the calling program with register
A set to OFFH, and register H set to one of the following physical or extended error
codes:
01 : Disk I/O Error
04 : Invalid drive error
07 : File password error
09 : ? in the FCB filename or filetype field
3-21
BDOS Function Calls CP/M 3 Programmers Guide