System information
Each file being accessed through CP/M must have a corresponding FCB, which provides the
name and allocation information for all subsequent file operations. When accessing files, it is the
programmer's responsibility to fill the lower 16 bytes of the FCB and initialize the cr field.
Normally, bytes 1 through 11 are set to the ASCII character values for the filename and filetype,
while all other fields are zero.
FCBs are stored in a directory area of the disk, and are brought into central memory before the
programmer proceeds with file operations (see the OPEN and MAKE functions). The memory
copy of the FCB is updated as file operations take place and later recorded permanently on disk
at the termination of the file operation, (see the CLOSE command).
The CCP constructs the first 16 bytes of two optional FCBs for a transient by scanning the
remainder of the line following the transient name, denoted by file1 and file2 in the prototype
command line described above, with unspecified fields set to ASCII blanks. The first FCB is
constructed at location BOOT+005CH and can be used as is for subsequent file operations. The
second FCB occupies the d0 ... dn portion of the first FCB and must be moved to another area of
memory before use. If, for example, the following command line is typed:
PROGNAME B:X.ZOT Y.ZAP
the file PROGNAME.COM is loaded into the TPA, and the default FCB at BOOT+005CH is
initialized to drive code 2, filename X, and filetype ZOT. The second drive code takes the default
value 0, which is placed at BOOT+006CH, with the filename Y placed into location
BOOT+006DH and filetype ZAP located 8 bytes later at BOOT+0075H. All remaining fields
through cr are set to zero. Note again that it is the programmer's responsibility to move this
second filename and filetype to another area, usually a separate file control block, before opening
the file that begins at BOOT+005CH, because the open operation overwrites the second name
and type.
If no filenames are specified in the original command, the fields beginning at BOOT+005DH and
BOOT+006DH contain blanks. In all cases, the CCP translates lower-case alphabetics to
upper-case to be consistent with the CP/M file naming conventions.
5.2 Call Conventions CP/M Operating System Manual
5-10