1 | ; File name : AH11h_HRecal.asm |
---|
2 | ; Project name : IDE BIOS |
---|
3 | ; Created date : 28.9.2007 |
---|
4 | ; Last update : 29.7.2010 |
---|
5 | ; Author : Tomi Tilli |
---|
6 | ; Description : Int 13h function AH=11h, Recalibrate. |
---|
7 | |
---|
8 | ; Section containing code |
---|
9 | SECTION .text |
---|
10 | |
---|
11 | ;-------------------------------------------------------------------- |
---|
12 | ; Int 13h function AH=11h, Recalibrate. |
---|
13 | ; |
---|
14 | ; AH11h_HandlerForRecalibrate |
---|
15 | ; Parameters: |
---|
16 | ; AH: Bios function 11h |
---|
17 | ; DL: Drive number |
---|
18 | ; Parameters loaded by Int13h_Jump: |
---|
19 | ; DS: RAMVARS segment |
---|
20 | ; Returns: |
---|
21 | ; AH: BIOS Error code |
---|
22 | ; CF: 0 if succesfull, 1 if error |
---|
23 | ; IF: 1 |
---|
24 | ; Corrupts registers: |
---|
25 | ; Flags |
---|
26 | ;-------------------------------------------------------------------- |
---|
27 | ALIGN JUMP_ALIGN |
---|
28 | AH11h_HandlerForRecalibrate: |
---|
29 | push dx |
---|
30 | push cx |
---|
31 | push bx |
---|
32 | push ax |
---|
33 | call AH11h_RecalibrateDrive |
---|
34 | jmp Int13h_PopXRegsAndReturn |
---|
35 | |
---|
36 | |
---|
37 | ;-------------------------------------------------------------------- |
---|
38 | ; Int 13h function AH=11h, Recalibrate. |
---|
39 | ; |
---|
40 | ; AH11h_HRecalibrate |
---|
41 | ; Parameters: |
---|
42 | ; DL: Drive number |
---|
43 | ; DS: RAMVARS segment |
---|
44 | ; Returns: |
---|
45 | ; DS:DI: Ptr to DPT |
---|
46 | ; AH: BIOS Error code |
---|
47 | ; CF: 0 if succesfull, 1 if error |
---|
48 | ; Corrupts registers: |
---|
49 | ; AL, BX, CX, DX |
---|
50 | ;-------------------------------------------------------------------- |
---|
51 | ALIGN JUMP_ALIGN |
---|
52 | AH11h_RecalibrateDrive: |
---|
53 | ; Recalibrate command is optional, vendor specific and not even |
---|
54 | ; supported on later ATA-standards. Let's do seek instead. |
---|
55 | mov cx, 1 ; Seek to Cylinder 0, Sector 1 |
---|
56 | xor dh, dh ; Head 0 |
---|
57 | jmp AHCh_SeekToCylinder |
---|