2 * DOS interrupt 26h handler
11 #include "debugtools.h"
13 DEFAULT_DEBUG_CHANNEL(int);
15 /**********************************************************************
18 * Handler for int 26h (absolute disk read).
20 void WINAPI
INT_Int26Handler( CONTEXT86
*context
)
22 BYTE
*dataptr
= CTX_SEG_OFF_TO_LIN( context
, context
->SegDs
, context
->Ebx
);
25 if (!DRIVE_IsValid(LOBYTE(context
->Eax
)))
28 AX_reg(context
) = 0x0201; /* unknown unit */
32 if (LOWORD(context
->Ecx
) == 0xffff)
34 begin
= *(DWORD
*)dataptr
;
35 length
= *(WORD
*)(dataptr
+ 4);
36 dataptr
= (BYTE
*)CTX_SEG_OFF_TO_LIN( context
,
37 *(WORD
*)(dataptr
+ 8), *(DWORD
*)(dataptr
+ 6) );
41 begin
= LOWORD(context
->Edx
);
42 length
= LOWORD(context
->Ecx
);
45 TRACE("int26: abs diskwrite, drive %d, sector %ld, "
46 "count %ld, buffer %p\n",
47 AL_reg(context
), begin
, length
, dataptr
);
49 DRIVE_RawWrite(LOBYTE(context
->Eax
), begin
, length
, dataptr
, TRUE
);