User`s guide
Error Code 255 is returned if a physical error is encountered and the BDOS error
mode is one of the return modes (see Function 45). If the error mode is the default
mode, a message identifying the physical error is displayed at the console, and the
calling program is terminated. When a physical error is returned to the calling pro-
gram, it is identified by register H as shown below:
01 Disk I/O error
02 Read-Only disk
03 Read-Only file or
File open from user 0 when the current user number is nonzero or
File password protected in Write mode
04 Invalid drive error
On all error returns, except for physical errors, A = 255, the Write Random
function sets register H to the number of records successfully written before the error
is encountered. This value can range from 0 to 127 depending on the current BDOS
Multi-Sector Count. It is always set to zero when the Multi-Sector Count is equal to
one.
3-52
BDOS Function Calls CP/M 3 Programmers Guide