;**********************************************************************
;* XBIOS VxD Query Command
;* The following code obtains information from XBIOS
;**********************************************************************
xbios_command_block STRUC
opcode db ? ;Input: XBIOS opcode 0Eh
reserved db ? ;Input: must be zero
bufoff dw ? ;Output: ptr to Ontrackr_Ref_Data
bufseg dw ? ;Output: ptr to Ontrackr_Ref_Data
xbios_command_block ENDS
;
packet xbios_command_block <>
;
push ds ;ES = DS
pop es ;ES = DS
mov ax,0e000h ;XBIOS opcode
mov bx,offset packet ;ES:BX = ptr to xbios_command_block
mov [bx].opcode,0Eh ;opcode 0E, VxD Query
mov [bx].reserved,0 ;reserved, must be zero
mov cx,0 ;signature validation
mov dl,80h ;drive number
int 13h ;send it to XBIOS
jc VxD_query_not_supported ;j--XBIOS did not understand
cmp cx,1234h ;signature check?
jne VxD_query_not_supported ;j--XBIOS did not understand
At this point, the bufoff and bufseg fields of the xbios_command_block contain a pointer to the Ontrackr_Ref_Data structure inside the XBIOS driver.
STRUCTURE DEFINITIONS
;**********************************************************************
; Structure returned for VxD Query command.
;**********************************************************************
Ontrackr_Ref_Data STRUC
VxD_Data_Size dw size Ontrackr_Ref_Data ;size of this struct (33h)
VxD_Chain_Mode db ?
Drive1_Data db size Ontrackr_VxD_Data dup(?)
Drive2_Data db size Ontrackr_VxD_Data dup(?)
Drive3_Data db size Ontrackr_VxD_Data dup(?)
Drive4_Data db size Ontrackr_VxD_Data dup(?)
Ontrackr_Ref_Data ENDS
Note The VxD_Chain_Mode field provides a mechanism for a device driver to "unhook" XBIOS from the INT13 chain. By placing any non-zero value into this field, XBIOS will simply jump to the next interrupt handler in the INT13 chain.
;**********************************************************************
; Structure describing a drive controlled by XBIOS
;**********************************************************************
Ontrackr_VxD_Data STRUC
VxD_INT13_Drive db ? ; INT13 drive number
VxD_Delta dd ? ; Delta skew value
VxD_Heads db ? ; Physical heads (Word 3 of Identify Data)
VxD_SPT db ? ; Physical sectors per track (Word 6 of Identify Data)
VxD_MBS db ? ; Multiple Block Size (Blocking factor)
VxD_MBS_Flags db ? ; Read/Write Multiple disable flags
VxD_Base_Port dw ? ; Base port address (1F0/170)
VxD_IRQ_Channel db ? ; Hardware interrupt channel (14/15)
Ontrackr_VxD_Data ENDS
;**********************************************************************
;Bit Definitions for VxD_MBS_Flags
;**********************************************************************
X_SUPPORT_MULTIPLE EQU 00001000b ;drive supports r/w multiple
X_READ_MULT_OFF EQU 00000100b ;do not use read multiple
X_WRITE_MULT_OFF EQU 00000010b ;do not use write multiple
;