DOS Fn 68H: Commit File

                                                         Compatibility: 3.3+ 
 Expects: AH    68H
          BX    file handle of file to flush
          ──────────────────────────────────────────────────────────────────
 Returns: AX    error code if CF is set to CY
          ──────────────────────────────────────────────────────────────────
    Info: This function forces DOS to flush its RAM buffers of file data
          for the selected file handle.

          DOS normally avoids disk I/O by writing data to RAM buffers until
          a sector is full or the file is closed.  This provides a way to
          force DOS to write the buffered data to disk.

Versions: ■ Prior to DOS 3.3, you can force a file flush by closing, then
            reopening the file.  But by using fn 45H to duplicate the
            handle and then close the duplicate.

          ■ Starting with DOS 4.0, you can force a flush on each write by
            opening the file via fn 6cH (extended file open/create).

   Notes: ■ This does NOT flush the Smartdrv cache buffers (the data may
            sit in memory for a few seconds).  You can force Smartdrv to
            write all data by using fn 0dH (reset disk).

See Also: Handle-Oriented File I/O
          DOS Functions
                                    -♦-