Add exclusion defs & remaining funcs, remove internal types &
[wine/hacks.git] / msdos / int25.c
blob6e99073c82c58bd6f4ac48ab982af6d88b1429df
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 (WPROCS.137)
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);