2 * DOS interrupt 26h handler
12 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(int)
16 /**********************************************************************
19 * Handler for int 26h (absolute disk read).
21 void WINAPI
INT_Int26Handler( CONTEXT86
*context
)
23 BYTE
*dataptr
= CTX_SEG_OFF_TO_LIN( context
, DS_reg(context
), EBX_reg(context
) );
26 if (!DRIVE_IsValid(AL_reg(context
)))
29 AX_reg(context
) = 0x0201; /* unknown unit */
33 if (CX_reg(context
) == 0xffff)
35 begin
= *(DWORD
*)dataptr
;
36 length
= *(WORD
*)(dataptr
+ 4);
37 dataptr
= (BYTE
*)CTX_SEG_OFF_TO_LIN( context
,
38 *(WORD
*)(dataptr
+ 8), *(DWORD
*)(dataptr
+ 6) );
42 begin
= DX_reg(context
);
43 length
= CX_reg(context
);
46 TRACE("int26: abs diskwrite, drive %d, sector %ld, "
47 "count %ld, buffer %p\n",
48 AL_reg(context
), begin
, length
, dataptr
);
50 DRIVE_RawWrite(AL_reg(context
), begin
, length
, dataptr
, TRUE
);