User`s guide

Upon return, the Search function returns a Directory Code in register A with the
value 0 to 3 if the search is successful, or OFFH, 255 Decimal, if a matching directory
entry is not found. Register H is set to zero in both of these cases. For successful
searches, the current DMA is also filled with the directory record containing the
matching entry, and the relative starting position is A * 32 (that is, rotate the A
register left 5 bits, or ADD A five times). Although it is not usually required for
application programs, the directory information can be extracted from the buffer at
this position.
If the directory has been initialized for date and time stamping by INITDIR, then
an SFCB resides in every fourth directory entry, and successful Directory Codes are
restricted to the values 0 to 2. For successful searches, if the matching directory
record is an extent zero entry, and if an SFCB resides at offset 96 within the current
DMA, contents of (DMA Address + 96) = 21H, the SFCB contains the date and
time stamp information, and password mode for the file. This information is located
at the relative starting position of 97 + (A * 10) within the current DMA in the
following format:
0 - 3 Create or Access Date and Time Stamp Field
4 - 7 Update Date and Time Stamp Field
8 : Password Mode Field
(Refer to Section 2.3.8 for more information on SFCBS.)
If a physical error is encountered, the Search 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
calling program is terminated. Otherwise, the Search function returns to the calling
program with register A set to OFFH, and register H set to one of the following
physical error codes:
01 Disk I/O error
04 Invalid drive error
3-25
BDOS Function Calls CP/M 3 Programmers Guide