MS-DOS: Absolute Input/Output, the FAT, and Buffers

ID Number: Q39761

2.x 3.x 4.00 4.01

MS-DOS

Summary:

Absolute input/output is not cached in buffers. As a result, directory

and file allocation table (FAT) information that is in the buffers

when the absolute I/O is done will not be updated. Consequently, all

absolute disk input/output sequences should be preceded and followed

by the Disk Reset service, interrupt 21H, function 0DH.

This disk reset function writes to the disk all buffers that have been

marked as changed and marks all buffers as free buffers. This ensures

that any subsequent file handle reads/writes from/to the disk will

actually access the disk, and will not get the information from the

buffers. The correct sequence of interrupt 21H handle- or FCB-based

file I/O, absolute I/O, and disk resets is as follows:

int 21s

DISK RESET

absolute disk input/output

DISK RESET

absolute disk input/output

DISK RESET

int 21s

#q30a