Device Request 10H: Output Until Busy

Chr► OTB► 
 This tells the driver to write data to the device until the device signals
 that it cannot accept any more data.

DevReq10Rec
  Offset Size Contents
  ▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
   +0      1  bLen         14H (length of this request packet)
   +1      1  bUnitNo      (not used)
   +2      1  bCmd         10H (command code)
   +3      2  rStatus      OUTPUT: Device Status Word must fill before exit
   +5H     8  res          (reserved)
  +0dH     1  bData        (not used)
  +0eH     4  pfBuffer     INPUT: buffer address
  +12H     2  wWriteSize   INPUT: number of bytes to write
                           OUTPUT: bytes actually written
          20               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.

              It is NOT an error to write fewer than the requested number of
              bytes.  Just set the Done bit, update wWriteSize, and exit.

    pfBuffer  is the address of a buffer containing data to write to the
              device.

  wWriteSize  on entry, specifies how much data to transfer from pfBuffer to
              the device.

              On return, fill this with the actual amount of data you
              transferred, in bytes.

   Notes: ■ Only character device drivers capable of Output-Until-Busy need
            support this request (see Device Attribute bit 13).

          ■ The driver must transfer as much data as possible, update the
            wWriteSize field, set bit 8, and return immediately.

          ■ This fn makes it possible for DOS to optimize its device output
            activities and to take advantage of hardware features such as a
            printer's internal input buffer.

            For instance, DOS can pass a large buffer of data, and the
            driver can fill the printer's buffer and return.  Then DOS can
            periodically check the output status (DvRq 0aH) and call this
            fn again (passing only the unprocessed data) when the device is
            not busy.  This avoids tying up the system inside a driver's
            wait loop.

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