[148] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Int 13h function AH=11h, Recalibrate.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .text
|
---|
| 6 |
|
---|
| 7 | ;--------------------------------------------------------------------
|
---|
| 8 | ; Int 13h function AH=11h, Recalibrate.
|
---|
| 9 | ;
|
---|
| 10 | ; AH11h_HandlerForRecalibrate
|
---|
| 11 | ; Parameters:
|
---|
[148] | 12 | ; DL: Translated Drive number
|
---|
| 13 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
[150] | 14 | ; SS:BP: Ptr to IDEREGS_AND_INTPACK
|
---|
| 15 | ; Returns with INTPACK:
|
---|
[3] | 16 | ; AH: BIOS Error code
|
---|
| 17 | ; CF: 0 if succesfull, 1 if error
|
---|
| 18 | ;--------------------------------------------------------------------
|
---|
| 19 | ALIGN JUMP_ALIGN
|
---|
| 20 | AH11h_HandlerForRecalibrate:
|
---|
[84] | 21 | %ifndef USE_186
|
---|
[3] | 22 | call AH11h_RecalibrateDrive
|
---|
[148] | 23 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
[84] | 24 | %else
|
---|
[148] | 25 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
[162] | 26 | ; Fall to AH11h_RecalibrateDrive
|
---|
[84] | 27 | %endif
|
---|
[3] | 28 |
|
---|
| 29 |
|
---|
| 30 | ;--------------------------------------------------------------------
|
---|
| 31 | ; AH11h_HRecalibrate
|
---|
| 32 | ; Parameters:
|
---|
[148] | 33 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
[150] | 34 | ; SS:BP: Ptr to IDEREGS_AND_INTPACK
|
---|
[3] | 35 | ; Returns:
|
---|
| 36 | ; AH: BIOS Error code
|
---|
| 37 | ; CF: 0 if succesfull, 1 if error
|
---|
| 38 | ; Corrupts registers:
|
---|
| 39 | ; AL, BX, CX, DX
|
---|
| 40 | ;--------------------------------------------------------------------
|
---|
| 41 | AH11h_RecalibrateDrive:
|
---|
| 42 | ; Recalibrate command is optional, vendor specific and not even
|
---|
| 43 | ; supported on later ATA-standards. Let's do seek instead.
|
---|
| 44 | mov cx, 1 ; Seek to Cylinder 0, Sector 1
|
---|
| 45 | xor dh, dh ; Head 0
|
---|
[28] | 46 | jmp AHCh_SeekToCylinder
|
---|