6 int do_int13(struct sigcontext_struct
*context
)
8 switch((context
->sc_eax
>> 8) & 0xff)
10 case 0x00: /* RESET DISK SYSTEM */
11 case 0x04: /* VERIFY DISK SECTOR(S) */
12 EAX
= (EAX
& 0xffff00ff);
15 case 0x05: /* FORMAT TRACK */
16 EAX
= (EAX
& 0xffff00ff) | 0x0c;
20 case 0x06: /* FORMAT TRACK AND SET BAD SECTOR FLAGS */
21 case 0x07: /* FORMAT DRIVE STARTING AT GIVEN TRACK */
22 EAX
= (EAX
& 0xffff00ff) | 0x0c;
25 case 0x08: /* GET DRIVE PARAMETERS */
26 EAX
= (EAX
& 0xffff00ff) | ((EDX
& 0x00000080)? 0x07: 0x01);
30 case 0x09: /* INITIALIZE CONTROLLER WITH DRIVE PARAMETERS */
31 case 0x0c: /* SEEK TO CYLINDER */
32 case 0x0d: /* RESET HARD DISKS */
33 case 0x10: /* CHECK IF DRIVE READY */
34 case 0x11: /* RECALIBRATE DRIVE */
35 case 0x14: /* CONTROLLER INTERNAL DIAGNOSTIC */
36 EAX
= (EAX
& 0xffff00ff);
39 case 0x0e: /* READ SECTOR BUFFER (XT only) */
40 case 0x0f: /* WRITE SECTOR BUFFER (XT only) */
41 case 0x12: /* CONTROLLER RAM DIAGNOSTIC (XT,PS) */
42 case 0x13: /* DRIVE DIAGNOSTIC (XT,PS) */
43 EAX
= (EAX
& 0xffff00ff) | 0x01;
51 IntBarf(0x13, context
);