Changes in trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm [3:28] in xtideuniversalbios
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
r3 r28 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 9.12.2007 4 ; Last update : 1 2.4.20104 ; Last update : 1.8.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_ PopXRegsAndReturn28 jmp Int13h_StoreErrorCodeToBDAandPopDSDIandReturn 33 29 34 30 … … 44 40 ; CF: 0 if succesfull, 1 if error 45 41 ; Corrupts registers: 46 ; AL, BX, CX, DX42 ; DI 47 43 ;-------------------------------------------------------------------- 48 44 ALIGN JUMP_ALIGN 49 45 AHDh_ResetDrive: 50 push di 46 push dx 47 push cx 48 push bx 49 push ax 50 51 51 call FindDPT_ForDriveNumber ; DS:DI now points to DPT 52 52 call AHDh_ResetMasterAndSlave … … 57 57 mov dx, [RAMVARS.wIdeBase] ; Load base port address 58 58 call AHDh_InitializeMasterAndSlave 59 jc SHORT .ReturnError 60 xor ax, ax ; Clear AH since success 61 pop di 62 ret 63 .ReturnError: 64 mov ah, RET_HD_RESETFAIL ; Load Reset Failed error code 65 pop di 59 60 pop bx ; Pop old AX 61 mov al, bl ; Restore AL 62 pop bx 63 pop cx 64 pop dx 66 65 ret 67 66 … … 110 109 ; DX: IDE Base Port address 111 110 ; Returns: 111 ; AH: Error code 112 112 ; CF: 0 if initialization succesfull 113 113 ; 1 if any error 114 114 ; Corrupts registers: 115 ; A X, BX, CX, DX, DI115 ; AL, BX, CX, DX, DI 116 116 ;-------------------------------------------------------------------- 117 117 ALIGN JUMP_ALIGN … … 136 136 ret 137 137 .ReturnError: 138 mov ah, RET_HD_RESETFAIL ; Load Reset Failed error code 138 139 stc 139 140 ret
Note: See TracChangeset
for help on using the changeset viewer.