User`s guide

Upon return, the close function returns a directory code in register A with the
value 00H if the close 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 is
encountered, the close 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 close 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
02 Read/only disk
04 Invalid drive error
3-23
BDOS Function Calls CP/M 3 Programmers Guide