7 /* #define DEBUG_INT */
11 /**********************************************************************
14 * Handler for int 13h (disk I/O).
16 void INT_Int13Handler( SIGCONTEXT context
)
18 switch(AH_reg(&context
))
20 case 0x00: /* RESET DISK SYSTEM */
21 case 0x04: /* VERIFY DISK SECTOR(S) */
25 case 0x05: /* FORMAT TRACK */
26 AH_reg(&context
) = 0x0c;
30 case 0x06: /* FORMAT TRACK AND SET BAD SECTOR FLAGS */
31 case 0x07: /* FORMAT DRIVE STARTING AT GIVEN TRACK */
32 AH_reg(&context
) = 0x0c;
35 case 0x08: /* GET DRIVE PARAMETERS */
36 AH_reg(&context
) = (DL_reg(&context
) & 0x80) ? 0x07 : 0x01;
40 case 0x09: /* INITIALIZE CONTROLLER WITH DRIVE PARAMETERS */
41 case 0x0c: /* SEEK TO CYLINDER */
42 case 0x0d: /* RESET HARD DISKS */
43 case 0x10: /* CHECK IF DRIVE READY */
44 case 0x11: /* RECALIBRATE DRIVE */
45 case 0x14: /* CONTROLLER INTERNAL DIAGNOSTIC */
49 case 0x0e: /* READ SECTOR BUFFER (XT only) */
50 case 0x0f: /* WRITE SECTOR BUFFER (XT only) */
51 case 0x12: /* CONTROLLER RAM DIAGNOSTIC (XT,PS) */
52 case 0x13: /* DRIVE DIAGNOSTIC (XT,PS) */
53 AH_reg(&context
) = 0x01;
58 INT_BARF( &context
, 0x13 );