Moved window move/resize syscommand handling to the graphics driver.
[wine/multimedia.git] / msdos / int25.c
blob24022ca674ab21e7ff61ad23305a8f7c0cc8c770
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 "miscemu.h"
11 #include "drive.h"
12 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(int);
17 /**********************************************************************
18 * INT_Int25Handler
20 * Handler for int 25h (absolute disk read).
22 void WINAPI INT_Int25Handler( CONTEXT86 *context )
24 BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
25 DWORD begin, length;
27 if (!DRIVE_IsValid(LOBYTE(context->Eax)))
29 SET_CFLAG(context);
30 AX_reg(context) = 0x0201; /* unknown unit */
31 return;
34 if (LOWORD(context->Ecx) == 0xffff)
36 begin = *(DWORD *)dataptr;
37 length = *(WORD *)(dataptr + 4);
38 dataptr = (BYTE *)CTX_SEG_OFF_TO_LIN( context,
39 *(WORD *)(dataptr + 8), *(DWORD *)(dataptr + 6) );
41 else
43 begin = LOWORD(context->Edx);
44 length = LOWORD(context->Ecx);
46 TRACE("int25: abs diskread, drive %d, sector %ld, "
47 "count %ld, buffer %p\n",
48 LOBYTE(context->Eax), begin, length, dataptr);
50 DRIVE_RawRead(LOBYTE(context->Eax), begin, length, dataptr, TRUE);
51 RESET_CFLAG(context);