User`s guide
CP/M 3 Programmer's Guide 3 BDOS Calls: Function 23
Upon return, the Rename function returns a Directory Code in register A with the
value 0 if the rename is successful, or 0FFH, 255 Decimal, if the file named by the
first filename in the FCB is not found. Register H is set to zero in both of these cases.
If a physical or extended error is encountered, the Rename function performs differ-
ent actions depending on the BDOS error mode (see Function 45). If the BDOS error
mode is the default mode, a message identifying the error is displayed at the console
and the program is terminated. Otherwise, the Rename function returns to the calling
program with register A set to 0FFH and register H set to one of the following
physical or extended error codes:
01 Disk I/O error
02 Read-Only disk
03 Read-Only file
04 Invalid drive error
07 File password error
08 File already exists
09 ? in filename or filetype field
3-37
BDOS Function Calls CP/M 3 Programmers Guide