Don't strip the library extension if it's not ".dll".
[wine/multimedia.git] / msdos / int26.c
blob9b207a852edf123e0b7f228a698fc8a0d0042312
1 /*
2 * DOS interrupt 26h handler
3 */
5 #include <stdlib.h>
6 #include <fcntl.h>
7 #include <unistd.h>
8 #include "msdos.h"
9 #include "ldt.h"
10 #include "miscemu.h"
11 #include "drive.h"
12 #include "debugtools.h"
14 DEFAULT_DEBUG_CHANNEL(int)
16 /**********************************************************************
17 * INT_Int26Handler
19 * Handler for int 26h (absolute disk read).
21 void WINAPI INT_Int26Handler( CONTEXT86 *context )
23 BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs, context->Ebx );
24 DWORD begin, length;
26 if (!DRIVE_IsValid(LOBYTE(context->Eax)))
28 SET_CFLAG(context);
29 AX_reg(context) = 0x0201; /* unknown unit */
30 return;
33 if (LOWORD(context->Ecx) == 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) );
40 else
42 begin = LOWORD(context->Edx);
43 length = LOWORD(context->Ecx);
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(LOBYTE(context->Eax), begin, length, dataptr, TRUE);
51 RESET_CFLAG(context);