9 /* #define DEBUG_INT */
12 /**********************************************************************
15 * Handler for int 25h (absolute disk read).
17 void INT_Int25Handler( SIGCONTEXT
*context
)
19 BYTE
*dataptr
= PTR_SEG_OFF_TO_LIN( DS_reg(context
), BX_reg(context
) );
22 if (!DRIVE_IsValid(AL_reg(context
)))
25 AX_reg(context
) = 0x0101; /* unknown unit */
29 if (CX_reg(context
) == 0xffff)
31 begin
= *(DWORD
*)dataptr
;
32 length
= *(WORD
*)(dataptr
+ 4);
33 dataptr
= (BYTE
*)PTR_SEG_TO_LIN( *(SEGPTR
*)(dataptr
+ 6) );
37 begin
= DX_reg(context
);
38 length
= CX_reg(context
);
40 dprintf_int( stdnimp
, "int25: abs diskread, drive %d, sector %ld, "
41 "count %ld, buffer %d\n",
42 AL_reg(context
), begin
, length
, (int) dataptr
);
44 memset(dataptr
, 0, length
* 512);
46 if (begin
== 0 && length
> 1) *(dataptr
+ 512) = 0xf8;
48 if (begin
== 1) *dataptr
= 0xf8;