INIT                                     

       Command code = 0

               ES:BX   pointer to request header. Format of header:
                       length   field
                        dword   number  of  units  (not set by character
                                devices)
                        dword   Ending address of resident program code
                        dword   Pointer   to  BPB  array  (not  set   by
                                character   devices)   /    pointer   to
                                remainder of arguments
                         byte   Drive number (3x only)

       The driver must do the following:

               A)     set the number of units (block devices only)

               B)     set up the pointer to the BPB array (block devices
                      only)

               C)     perform  any  initialization   code   (to  modems,
                      printers, etc)

               D)     Set  the  ending  address  of the resident program
                      code

               E)     set the status word in the request header.

       To obtain information obtained from CONFIG.SYS to a device driver
       at INIT time, the BPB pointer field points to a buffer containing
       the information  passed  from  CONFIG.SYS  following  the  =. The
       buffer that  DOS  passes  to  the  driver  at INIT after the file
       specification contains an ASCII string  for  the  file  OPEN. The
       ASCII  string  (ending  in 0h) is terminated by a carriage return
       (0Dh) and linefeed (0Ah).  If  there  is no parameter information
       after  the  file  specification,   the   file   specification  is
       immediately followed by a  linefeed  (0Ah).  This  information is
       read-only and only system calls 01h-0Ch and 30h can be  issued by
       the INIT code of the driver.

       The last byte parameter contains the drive letter  for  the first
       unit of a block driver. For example, 0=A, 1=B etc.

       If an INIT routine determines that it cannot set  up  the  device
       and  wants  to  abort  without  using  any  memory,  follow  this
       procedure:

               A)     set the number of units to 0

               B)     set the ending offset address at 0

               C)     set the ending offsret segment address to the code
                      segment (CS)

       NOTE: If there are  multiple  device  drivers  in a single memory
             image file, the ending address  returned by the  last  INIT
             called  is the  one DOS  uses. It  is recommended  that all
             device  drivers in  a single memory  image file  return the
             same ending address.


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