11 /* #define DEBUG_INT */
14 /**********************************************************************
17 * Handler for int 25h (absolute disk read).
19 void INT_Int25Handler( struct sigcontext_struct context
)
21 BYTE
*dataptr
= PTR_SEG_OFF_TO_LIN( DS_reg(&context
), BX_reg(&context
) );
24 if (!DRIVE_IsValid(AL_reg(&context
)))
27 AX_reg(&context
) = 0x0101; /* unknown unit */
31 if (CX_reg(&context
) == 0xffff)
33 begin
= *(DWORD
*)dataptr
;
34 length
= *(WORD
*)(dataptr
+ 4);
35 dataptr
= (BYTE
*)PTR_SEG_TO_LIN( *(SEGPTR
*)(dataptr
+ 6) );
39 begin
= DX_reg(&context
);
40 length
= CX_reg(&context
);
42 dprintf_int( stdnimp
, "int25: abs diskread, drive %d, sector %ld, "
43 "count %ld, buffer %d\n",
44 AL_reg(&context
), begin
, length
, (int) dataptr
);
46 memset(dataptr
, 0, length
* 512);
48 if (begin
== 0 && length
> 1) *(dataptr
+ 512) = 0xf8;
50 if (begin
== 1) *dataptr
= 0xf8;
52 RESET_CFLAG(&context
);