User`s guide

d0 ... dn filled-in by CP/M 3, reserved for
system use
cr current record to read or write in
a sequential file operation, normally
set to zero by the calling program
when a file is opened or created
r0,,rl,r2 optional random record number in the
range 0-262,143 (O - 3FFFFH).
r0,rl,r2 constitute a 18 bit value
with low byte rO, middle byte rl, and
high byte r2.
For BDOS directory functions, the calling program must initialize bytes 0 through
11 of the FCB before issuing the function call. The Set Directory Label and Write
File XFCB functions also require the calling program to initialize byte 12. The Rename
File function requires the calling program to place the new filename and type in bytes
17 through 27.
BDOS open or make function calls require the calling program to intialize bytes 0
through 12 of the FCB before making the call. Usually, byte 12 is set to zero. In
if the file is to be processed from the beginning using sequential read or
addition, 1
write functions, byte 32, cr, must be zeroed.
After an FCB is activated by an open or make operation, a program does not have
to modify the FCB to perform sequential read or write operations. In fact, bytes 0
through 31 of an activated FCB should not be modified. However, random I/O
functions require that a program set bytes 33 through 35 to the requested random
record number prior to making the function call.
File directory entries maintained in the directory area of each disk have the same
format as FCBS, excluding bytes 32 through 35, except for byte 0 which contains the
file's user number. Both the Open File and Make File functions bring these entries,
excluding byte 0, into memory in the FCB specified by the calling program. All read
and write operations on a file must specify an FCB activated in this manner.
2-15
2.3 BDOS File System CP/M 3 Programmer's Guide