DI


;
DEV_STRATEGY:
MOV CS:KEEP_ES,ES
MOV CS:KEEP_BX,BX
RET
KEEP_ES DW ?
KEEP_BX DW ?
;
DEV_INTERRUPT:
PUSH ES ;
PUSH DS
PUSHA
MOV AX,CS:KEEP_ES ;ES:BX
MOV ES,AX ;
MOV BX,CS:KEEP_BX ;
MOV AL,ES:[BX]+2 ;
SHL AL,1 ; 2 (.. )
SUB AH,AH ; AH
LEA DI,FUNCTIONS ; DI
ADD DI,AX ;
JMP WORD PTR [DI] ;
FUNCTIONS LABEL WORD ;
DW INITIALIZE
DW CHECK_MEDIA
DW MAKE_BPB
DW IOCTL_IN
DW INPUT_DATA
DW NONDESTRUCT_IN
DW INPUT_STATUS
DW CLEAR_INPUT
DW OUTPUT_DATA
DW OUTPUT_VERIFY
DW OUTPUT_STATUS
DW CLEAR_OUTPUT
DW IOCTL_OUT
;--- ,
CHECK_MEDIA:
MAKE_BPB:
IOCTL_IN:
NONDESTRUCT_IN:
INPUT_STATUS:
CLEAR_INPUT:
OUTPUT_VERIFY:
OUTPUT_STATUS:
CLEAR_OUTPUT:
IOCTL_OUT:
OR ES:WORD PTR [BX]+3,8103H ;
JMP QUIT
;---
INITIALIZE:
LEA AX,E_O_P ; AX
MOV ES:WORD PTR [BX]+14,AX ;
MOV ES:WORD PTR [BX]+16,CS
JMP QUIT
INPUT_DATA:
MOV CX,ES:[BX]+18 ;
LES DI,ES:[BX]+14 ;
PUSH ES