Device driver function 02h Build BPB B
Build BPB returns a BPB structure for the medium in the
specified drive. DOS calls this function whenever Media Check
(device driver function 01h) specifies that the medium has changed
or that it might have been changed and no disk-write operations
are pending.
This function is required for block device drivers.
──────────────────────────────────────────────────────────────────
If the driver supports removable media, Build BPB should read the
volume label from the disk and save it.
──────────────────────────────────────────────────────────────────
bbrUnit
Specifies the unit for which to return the BPB structure.
bbrStatus
Specifies the status of the completed function. If the function
was successful, the driver must set the done bit (bit 8).
Otherwise, the driver must set both the error and done bits (bits
15 and 8) and copy an error value to the low-order byte.
bbrMediaID
Specifies the media descriptor for the medium DOS assumes is in
the drive.
- See Media
bbrFATSector
Contains the 32-bit address of a buffer. The contents of the
buffer depend on bit 13 in the dhAttributes field in the driver's
DeviceHeader structure. If bit 13 is zero, the buffer contains the
first sector of the first FAT on the disk; the driver uses the
first byte in this buffer to determine the disk's media
descriptor. In this case, the driver must not alter this buffer.
If bit 13 is set, the contents of the buffer are meaningless and
the driver may use the buffer as scratch space.
bbrBPBAddress
Receives the 32-bit address of the BPB structure for the medium in
the drive.