User`s guide

BDOS FUNCTION 16: CLOSE FILE
Entry Parameters:
Registers C: 10H
DE: FCB Address
Returned Value:
Registers A: Directory Code
H: Physical or Extended Error
The Close File function performs the inverse of the Open File function. The calling
program passes the address of an FCB in register pair DE. The referenced FCB must
have been previously activated by a successful Open or Make function call (see
Functions 15 and 22). Interface attribute f5' specifies how the file is to be closed as
shown below:
f5' = 0 - Permanent close (default mode)
f5' = 1 - Partial close
A permanent close operation indicates that the program has completed file operations
on the file. A partial close operation updates the directory, but indicates that the file
is to be maintained in the open state.
If the referenced FCB contains new information because of write operations to the
FCB, the close function permanently records the new information in the referenced
disk directory. Note that the FCB does not contain new information, and the direc-
tory update step is bypassed if only read or update operations have been made to the
referenced FCB.
3-22
BDOS Function Calls CP/M 3 Programmers Guide