User`s guide
The Read-Only File error is returned when a program attempts to write to a file
that is marked with the Read-Only attribute. It is also returned to a program that
attempts to write to a system file opened under user zero from a nonzero user
number. In addition, this error is returned when a program attempts to write to a
file password protected in Write mode if the program does not supply the correct
password.
The Read-Only Disk error is returned when a program writes to a disk that is in
read-only status. A drive can be placed in read-only status explicitly with the BDOS
Write Protect Disk function.
The BDOS extended errors are identified by the following error messages:
o Password Error
o File Exists
o ? in Filename
The File Password error is returned when the file password is not supplied, or
when it is incorrect. This error is reported only by the banked version of CP/M 3.
The File Exists error is returned by the BDOS Make File and Rename File func-
tions when the BDOS detects a conflict such as a duplicate filename and type.
The ? in Filename error is returned when the BDOS detects a ? in the filename or
type field of the passed FCB for the BDOS Rename File, Set File Attributes, Open
File, Make File, and Truncate File functions.
The following paragraphs describe the error return code conventions of the BDOS
file system functions. Most BDOS file system functions fall into three categories in
regard to return codes: they return an Error Code, a Directory Code, or an Error
Flag. The error conventions of CP/M 3 are designed to allow programs written for
earlier versions of CP/M to run without modification.
The following BDOS functions return an Error Code in register A.
20. Read Sequential
21. Write Sequential
33. Read Random
34. Write Random
40. Write Random w/Zero Fill
2-30
2.3 BDOS File System CP/M 3 Programmer's Guide