User`s guide

BDOS FUNCTION 98: FREE BLOCKS
Entry Parameters:
Register C: 62H
Returned Value:
Registers A: Error Flag
H: Physical Error
The Free Blocks function scans all the currently logged-in drives, and for each
drive returns to free space all temporarily-allocated data blocks. A temporarily-allo-
cated data block is a block that has been allocated to a file by a BDOS write
operation but has not been permanently recorded in the directory by a BDOS close
operation. The CCP calls Function 98 when it receives control following a system
warm start. Be sure to close your file, particularly any file you have written to, prior
to calling Function 98.
In the nonbanked version of CP/M 3, Function 98 frees only temporarily allocated
blocks for systems that request double allocation vectors in GENCPM.
Upon return, register A is set to zero if Function 98 is successful. If a physical
error is encountered, the Free Blocks function performs different actions depending
on the BDOS error mode (see Function 45). If the BDOS error mode is in the default
mode, a message identifying the error is displayed at the console and the calling
program is terminated. Otherwise, the Free Blocks function returns to the calling
program with register A set to OFFH and register H set to the following physical
error code:
04 : Invalid drive error
3-75
BDOS Function Calls CP/M 3 Programmers Guide