Stubbed GetDeviceGammaRamp.
[wine.git] / msdos / int25.c
blob1fb27d812bc84821f9ac3ed64fafdda43930b8b0
1 /*
2 * DOS interrupt 25h handler
3 */
5 #include <stdlib.h>
6 #include <string.h>
7 #include <fcntl.h>
8 #include <unistd.h>
9 #include "msdos.h"
10 #include "ldt.h"
11 #include "miscemu.h"
12 #include "drive.h"
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(int)
18 /**********************************************************************
19 * INT_Int25Handler
21 * Handler for int 25h (absolute disk read).
23 void WINAPI INT_Int25Handler( CONTEXT86 *context )
25 BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
26 DWORD begin, length;
28 if (!DRIVE_IsValid(LOBYTE(context->Eax)))
30 SET_CFLAG(context);
31 AX_reg(context) = 0x0201; /* unknown unit */
32 return;
35 if (LOWORD(context->Ecx) == 0xffff)
37 begin = *(DWORD *)dataptr;
38 length = *(WORD *)(dataptr + 4);
39 dataptr = (BYTE *)CTX_SEG_OFF_TO_LIN( context,
40 *(WORD *)(dataptr + 8), *(DWORD *)(dataptr + 6) );
42 else
44 begin = LOWORD(context->Edx);
45 length = LOWORD(context->Ecx);
47 TRACE("int25: abs diskread, drive %d, sector %ld, "
48 "count %ld, buffer %p\n",
49 LOBYTE(context->Eax), begin, length, dataptr);
51 DRIVE_RawRead(LOBYTE(context->Eax), begin, length, dataptr, TRUE);
52 RESET_CFLAG(context);