User`s guide
BDOS FUNCTION 48: FLUSH BUFFERS
Entry Parameters:
Registers C: 30H
Returned Value: E: Purge Flag
Registers A: Error Flag
H: Physical Error
The Flush Buffers function forces the write of any write-pending records contained
in internal blocking/deblocking buffers. If register E is set to OFFH, this function also
purges all active data buffers. Programs that provide write with read verify support
need to purge internal buffers to ensure that verifying reads actually access the disk
instead of returning data that is resident in internal data buffers. The CP/M 3 PIP
utility is an example of such a program.
Upon return, register A is set to zero if the flush operation is successful. If a
physical error is encountered, the Flush Buffers 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 Flush Buffers function returns to the
calling program with register A set to OFFH and register H set to the following
physical error code:
0 1 Disk I/O error
02 Read/only disk
04 Invalid drive error
3-68
BDOS Function Calls CP/M 3 Programmers Guide