Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r143 r148 10 10 ; AHDh_HandlerForResetHardDisk 11 11 ; Parameters: 12 ; AH: Bios function Dh 13 ; DL: Drive number 14 ; Returns: 12 ; DL: Translated Drive number 13 ; DS:DI: Ptr to DPT (in RAMVARS segment) 14 ; SS:BP: Ptr to INTPACK 15 ; Returns with INTPACK in SS:BP: 15 16 ; AH: Int 13h return status 16 17 ; CF: 0 if succesfull, 1 if error 17 ; IF: 118 ; Corrupts registers:19 ; Flags20 18 ;-------------------------------------------------------------------- 21 19 ALIGN JUMP_ALIGN … … 23 21 %ifndef USE_186 24 22 call AHDh_ResetDrive 25 jmp Int13h_ PopDiDsAndReturn23 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 26 24 %else 27 push Int13h_ PopDiDsAndReturn25 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 28 26 ; Fall through to AHDh_ResetDrive 29 27 %endif … … 41 39 ; CF: 0 if succesfull, 1 if error 42 40 ; Corrupts registers: 43 ; DI41 ; AL, CX, DI 44 42 ;-------------------------------------------------------------------- 45 43 ALIGN JUMP_ALIGN 46 44 AHDh_ResetDrive: 47 45 push dx 48 push cx49 46 push bx 50 push ax51 47 52 48 call FindDPT_ForDriveNumber ; DS:DI now points to DPT … … 60 56 call AHDh_InitializeMasterAndSlave 61 57 62 pop bx ; Pop old AX63 mov al, bl ; Restore AL64 58 pop bx 65 pop cx66 59 pop dx 67 60 ret … … 90 83 call HDrvSel_OutputDeviceControlByte 91 84 mov ax, 5 ; Delay at least 5us 92 call HTimer_ MicrosecondsFromAX85 call HTimer_DelayMicrosecondsFromAX 93 86 94 87 ; HSR1: Clear_wait … … 96 89 out dx, al ; End Reset 97 90 mov ax, 2000 ; Delay at least 2ms 98 call HTimer_ MicrosecondsFromAX91 call HTimer_DelayMicrosecondsFromAX 99 92 100 93 ; HSR2: Check_status
Note:
See TracChangeset
for help on using the changeset viewer.