Device Attribute

 The rDevAttr field of the DevHdrRec indicates properties of a device.  DOS
 fn 32H returns a structure that contains a pointer to the DevHdrRec for a
 specified block device driver.  And fn 52H obtain info that can let you
 get attributes of character devices.

 Bit-meanings vary depending on the driver type, so two layouts are given:

DevAttrChar ─── layout for character devices
 1 1 1 1 1 1
╓5┬4┬3┬2┬1┬0┬9┬8╥7┬6┬5┬4┬3┬2┬1┬0╖
║1│ │ │0│ │0 0 0║qg│0│scnoi║
╙┴╥┴╥┴─┴╥┴─┴─┴─╨╥┴╥┴─┴╥┴╥┴╥┴╥┴╥╜ bit  mask
  ║ ║   ║       ║ ║   ║ ║ ║ ║ ╚═► 0: 0001H standard input device
  ║ ║   ║       ║ ║   ║ ║ ║ ╚═══► 1: 0002H standard output device
  ║ ║   ║       ║ ║   ║ ║ ╚═════► 2: 0004H standard NUL device
  ║ ║   ║       ║ ║   ║ ╚═══════► 3: 0008H clock device
  ║ ║   ║       ║ ║   ╚═════════► 4: 0010H special; fast output   INT 29H
  ║ ║   ║       ║ ╚═════════════► 6: 0040H supports Generic IOCTL DvRq 13H
  ║ ║   ║       ╚═══════════════► 7: 0080H supports Query IOCTL   DvRq 19H
  ║ ║   ╚═══════════════════════►11: 0800H supports device open,  DvRq 0dH
  ║ ║                                      and device close       DvRq 0eH
  ║ ╚═══════════════════════════►13: 2000H sprts output till busy DvRq 10H
  ╚═════════════════════════════►14: 4000H supports IOCTL Read    DvRq 03H
                                           and IOCTL Write        DvRq 0cH
 ╚═══════════════════════════════►15: 8000H 1=character device

DevAttrBlock ─── layout for block devices
 1 1 1 1 1 1
╓5┬4┬3┬2┬1┬0┬9┬8╥7┬6┬5┬4┬3┬2┬1┬0╖
║0│ │ │0│ │0 0 0║qg│0 0 0 0│b│0║
╙┴╥┴╥┴─┴╥┴─┴─┴─╨╥┴╥┴─┴─┴─┴─┴╥┴─╜ bit  mask
  ║ ║   ║       ║ ║         ╚═══► 1: 0002H supports >32M partitions
  ║ ║   ║       ║ ╚═════════════► 6: 0040H supports Generic IOCTL DvRq 13H
  ║ ║   ║       ║                          and Get Logical Device DvRq 17H
  ║ ║   ║       ║                          and Set Logical Device DvRq 18H
  ║ ║   ║       ╚═══════════════► 7: 0080H supports Query IOCTL   DvRq 19H
  ║ ║   ╚═══════════════════════►11: 0800H supports device open   DvRq 0dH
  ║ ║                                      and device close       DvRq 0eH
  ║ ║                                      and Removable Media    DvRq 0fH
  ║ ╚═══════════════════════════►13: 2000H 0=Needs FAT with BPB   DvRq 02H
  ╚═════════════════════════════►14: 4000H supports IOCTL Read    DvRq 03H
                                           and IOCTL Write        DvRq 0cH
 ╚═══════════════════════════════►15: 8000H 0=block device

   bit 15 This bit affects Device Input and Output requests and determines
          the meaning of the abDevName field of the DevHdrRec.  If this bit
          is 0, the device is a block device (usually a disk drive).

          ─────────────────────────────────────────────── Character Devices
    bit 0 and...
    bit 1 Set the standard I/O bits when you replace the CON driver.

    bit 2 The standard NUL device cannot be reassigned.

    bit 3 The clock device indicates replacement for the CLOCK$ device
          driver.  CLOCK$ is a character device which handles device
          requests to input and output exactly 6 bytes.  An input request
          (DvRq 04H) should return 6 bytes indicating the current time/date
          and an output request (DvRq 08H) should accept 6 bytes to set the
          clock/calendar.  See ClockIORec for the layout.

    bit 4 This is set if this is the CON device and it supports the INT 29H
          "fast-output" function.

   bits 7 11, and 14 indicates support for device utilities which use
          fn 440cH and other fn 44H services.

          ─────────────────────────────────────────────────── Block Devices
    bit 1 Indicates support for accessing the large disk partitions (4.0+).
          On DvRq 04H and DvRq 08H, the wSectorNo field in the request
          packet will be set to ffffH and the actual address will be a 32-
          bit value in the lBigSectorNo field.  See INT 25H/26H for related
          information.

   bit 11 (DOS 3.0+) indicates support for Removable Media-related device
          requests (DvRq 0dH and DvRq 0fH) so a block device driver can
          optimize with local buffering.  When set, the driver must also
          take special action on DvRq 02H.

   bit 13 (once called the "non-IBM device" bit)
          0: DvRq 02H (Build BPB) will receive a buffer containing the
          first sector of the first FAT.  You can determine the media type
          from the first byte of the FAT.
          1: The buffer given in DvRq 02H is not important.

See Also: Device Drivers
          Device Attribute
          Device Requests
          Device Driver Basics
                                    -♦-