Device Request 01H: Media Check

Blk► 
 This asks the driver to determine whether the media in the drive has been
 changed.

DevReq01Rec
  Offset Size Contents
  ▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
   +0      1  bLen         13H (length of this request packet)
   +1      1  bUnitNo      unit number to check
   +2      1  bCmd         01H (command code)
   +3      2  rStatus      OUTPUT: Device Status Word must fill before exit
   +5H     8  res          (reserved)
  +0dH     1  bMediaID     INPUT: Media Descriptor DOS thinks is there
  +0eH     1  bRetFlag     OUTPUT: ffH=no change
                                   00H=don't know
                                   01H=changed
  +0fH     4  pfVolID      OUTPUT: Addr of ASCIIZ volume ID (3.0+)
          19               size of this structure

     rStatus  On exit, the driver must place a DevStatusWord here.  Always
              set the Done bit (bit 8).  On an error, set the Done bit and
              the Error bit (bit 15) and put a Device Error Code in the low
              byte.

    bMediaID  On entry, this contains the Media Descriptor byte of the disk
              that DOS thinks is in the drive.

    bRetFlag  On exit, you must set this to indicate whether a different
              disk is in the drive.  If you support Removable Media, and
              return ffH, you must set pfVolID.

     pfVolID  With DOS 3.0+ drivers that support Removable Media (see
              Device Attribute), you should set this to the address of an
              ASCIIZ string of the volume label of the drive that was
              previously in the drive.  Then, when DOS issues critical error
              0fH (see INT 24H), it can prompt the user to insert the right
              disk.

              If you don't know the volume label, put the address of the
              string "NO NAME" here.

   Notes: ■ Diskette performance is much faster when the device driver can
            quickly indicate a "no change", since DOS need not re-read the
            FAT on the disk before each disk access.

See Also: Device Requests
          DevRequestHdrRec
          Installable Device Drivers
                                    -♦-