MEDIA CHECK                                  

       command code = 1

               ES:BX   pointer to request header. Format of header:
                       length   field
                       byte     media descriptor from DOS
                       byte     return
                       dword    returns a pointer to the previous volume
                                ID (if  bit  11=1  and  disk  change  is
                                returned) (DOS 3.x)

       When the command code field is 1, DOS  calls  MEDIA  CHECK  for a
       drive  unit and passes its current  media  descriptor  byte.  See
       "Media  Descriptor  Byte"  later  in   this   chapter   for  more
       information  about  the  byte.  MEDIA  CHECK returns one  of  the
       following:

               A) media not changed

               B) media changed

               C) not sure

               D) error code

       The driver must perform the following:

               A)     set the status word in the request header

               B)     set the return byte

                      -1       media has been changed
                       0       don't know if media has been changed
                       1       media has not been changed

       DOS  3.x: If the driver has set the removable media bit 11 of the
       device  header  attribute  word  to  1 and the driver returns  -1
       (media changed), the driver  must  set  the  DWORD pointer to the
       previous volume identification field. If DOS determines  that the
       media  changed  is  an error, DOS generates an error 0Fh (invalid
       disk  change) on behalf of the device. If  the  driver  does  not
       implement volume identification support, but has bit 11 set to 1,
       the driver should set a pointer to the string "NO NAME",0.

                               MEDIA DESCRIPTOR                               

       Currently  the  media  descriptor byte has been defined for a few
       media types. This byte  should  be idetnical to the media byte if
       the device has the  non-IBM  format  bit off. These predetermined
       values are:

       media descriptor byte =>    1  1  1  1  1  0  0  0
        (numerical order)          7  6  5  4  3  2  1  0

              BIT                MEANING

               0       1=2 sided       0=not 2 sided
               1       1=8 sector      0=not 8 sector
               2       1=removeable    0=nonremoveable
              3-7      must be set to 1

       Examples of current DOS media descriptor bytes:

               media         sides   sectors  ID byte

               hard disk       *       *       0F8h
               5-1/4 floppy    2       15      0F9h
               5-1/4 floppy    1       9       0FCh
               5-1/4 floppy    2       9       0FDh
               5-1/4 floppy    2       8       0FFh
               5-1/4 floppy    1       8       0FEh
               8" floppy       1       26      0FEh *
               8" floppy       2       26      0FDh
               8" floppy       2       8       0FEh *

         NOTE:   The two Media Descriptor Bytes that are the same for 8"
                 diskettes (0FEh)  are  not  a  misprint.  To  determine
                 whether you are using  a  single  sided or double sided
                 diskette, attempt to read  the  second  side, and if an
                 error occurs you  can  assume  the  diskette  is single
                 sided.


Copyright © 1985 to 2022 Beta Systems                            Last modified: Wednesday, January 05, 2022 .