Changeset 26 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
- Timestamp:
- Jul 26, 2010, 6:30:33 PM (13 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r3 r26 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 9.12.2007 4 ; Last update : 12.4.20104 ; Last update : 26.7.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Int 13h function AH=Dh, Reset Hard Disk (Alternate reset). … … 25 25 ALIGN JUMP_ALIGN 26 26 AHDh_HandlerForResetHardDisk: 27 push dx28 push cx29 push bx30 push ax31 27 call AHDh_ResetDrive 32 jmp Int13h_Pop XRegsAndReturn28 jmp Int13h_PopDiDsAndReturn 33 29 34 30 … … 44 40 ; CF: 0 if succesfull, 1 if error 45 41 ; Corrupts registers: 46 ; AL, BX, CX, DX42 ; Nothing 47 43 ;-------------------------------------------------------------------- 48 44 ALIGN JUMP_ALIGN 49 45 AHDh_ResetDrive: 50 46 push di 47 push dx 48 push cx 49 push bx 50 push ax 51 51 52 call FindDPT_ForDriveNumber ; DS:DI now points to DPT 52 53 call AHDh_ResetMasterAndSlave … … 57 58 mov dx, [RAMVARS.wIdeBase] ; Load base port address 58 59 call AHDh_InitializeMasterAndSlave 59 jc SHORT .ReturnError 60 xor ax, ax ; Clear AH since success61 pop di62 ret63 .ReturnError: 64 mov ah, RET_HD_RESETFAIL ; Load Reset Failed error code60 61 pop bx ; Pop old AX 62 mov al, bl ; Restore AL 63 pop bx 64 pop cx 65 pop dx 65 66 pop di 66 67 ret … … 110 111 ; DX: IDE Base Port address 111 112 ; Returns: 113 ; AH: Error code 112 114 ; CF: 0 if initialization succesfull 113 115 ; 1 if any error 114 116 ; Corrupts registers: 115 ; A X, BX, CX, DX, DI117 ; AL, BX, CX, DX, DI 116 118 ;-------------------------------------------------------------------- 117 119 ALIGN JUMP_ALIGN … … 136 138 ret 137 139 .ReturnError: 140 mov ah, RET_HD_RESETFAIL ; Load Reset Failed error code 138 141 stc 139 142 ret
Note: See TracChangeset
for help on using the changeset viewer.