System information
FUNCTION 22: MAKE FILE
Entry Parameters:
Register C: 16H
Registers DE: FCB Address
Returned Value:
Register A: Directory Code
The Make File operation is similar to the Open File operation except that the FCB must name a
file that does not exist in the currently referenced disk directory (that is, the one named explicitly
by a nonzero dr code or the default disk if dr is zero). The FDOS creates the file and initializes
both the directory and main memory value to an empty file. The programmer must ensure that no
duplicate filenames occur, and a preceding delete operation is sufficient if there is any possibility
of duplication. Upon return, register A = 0, 1, 2, or 3 if the operation was successful and 0FFH
(255 decimal) if no more directory space is available. The Make function has the side effect of
activating the FCB and thus a subsequent open is not necessary.
FUNCTION 23: RENAME FILE
Entry Parameters:
Register C: 17H
Registers DE: FCB Address
Returned Value:
Register A: Directory Code
The Rename function uses the FCB addressed by DE to change all occurrences of the file named
in the first 16 bytes to the file named in the second 16 bytes. The drive code dr at postion 0 is
used to select the drive, while the drive code for the new filename at position 16 of the FCB is
assumed to be zero. Upon return, register A is set to a value between 0 and 3 if the rename was
successful and 0FFH (255 decimal) if the first filename could not be found in the directory scan.
5.2 Call Conventions CP/M Operating System Manual
5-25