source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm@ 135

Last change on this file since 135 was 84, checked in by krille_n_@…, 14 years ago

Minor size optimizations in various files.

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