SweetLow
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Код: This tells the driver to initialize itself and the device and to describe how much memory it needs. DevReq00Rec Offset Size Contents +0 1 bLen 19H (length of this request packet) +1 1 bUnitNo (not used) +2 1 bCmd 00H (command code) +3 2 rStatus OUTPUT: Device Status Word must fill before exit +5H 8 res (reserved) +0dH 1 bUnits OUTPUT: number of units you support +0eH 4 pfEndAddr INPUT: end of available memory for driver OUTPUT: end of resident code +12H 4 pfParms INPUT: addr of DEVICE= line in CONFIG.SYS (3.0+) OUTPUT: addr of BPB pointer array +16H 1 bDrvNo INPUT: first drive number +17H 2 wErrMsgFlag OUTPUT: 0000H=no error message (4.0+) 25 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. bUnits On exit, set this to the number of block devices supported by this driver. pfEndAddr On entry, this contains the address (segment:offset) of the end of memory available to the driver. On exit, you must set this to the address of the byte immediate after the last byte your driver wants to keep resident in memory. If you exit without installing, set this to your load addr. pfParms (DOS 3.0+) On entry, this is the address of the text directly following the "DEVICE=" or "DEVICEHIGH [/L:nn,mm]=" in the line of CONFIG.SYS that loads the driver. The text ends with a linefeed (0aH) or carriage return (0dH). On exit, block device drivers should fill this field with the far address of bUnits 25-byte BPBRec structures. bDrvNo On entry, this tells you the first available drive number (0=A, 1=B, etc.) Your block device(s) will be given bUnits of these drive numbers. wErrMsgFlag On exit, if your driver fails to install, place 0001H in this field and set bit 15 of rStatus. DOS will display: Config.Sys Error in line ## Notes: þ It's OK to use DOS fns 01H-0cH, 25H (set int vector), 30H (get version) and 35H (get int vector) during initialization. þ This command will be used only once--directly after the driver is loaded via CONFIG.SYS. You can free up some memory by placing the code that handles this request at the end of the driver and setting pfEndAddr to not include that code. þ Block device drivers can use the bDrvNo field when displaying a message (e.g, "TAPE drive installed as drive d:"). See Also: Device Requests DevRequestHdrRec Installable Device Drivers | | Всего записей: 1023 | Зарегистр. 08-03-2005 | Отправлено: 10:39 07-02-2021 | Исправлено: SweetLow, 10:42 07-02-2021 |
|