Changeset 27 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HError.asm
- Timestamp:
- Jul 28, 2010, 6:53:32 PM (15 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HError.asm
r3 r27 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 30.11.2007 4 ; Last update : 8.4.20104 ; Last update : 28.7.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Error checking functions for BIOS Hard disk functions. … … 8 8 ; Section containing code 9 9 SECTION .text 10 11 ;-------------------------------------------------------------------- 12 ; HError_GetErrorCodeToAHforBitPollingTimeout 13 ; Parameters: 14 ; AL: IDE Status Register contents 15 ; DX: IDE Status Register Address 16 ; Returns: 17 ; AH: Hard disk BIOS error code 18 ; CF: Set since error 19 ; Corrupts registers: 20 ; AL, CX 21 ;-------------------------------------------------------------------- 22 ALIGN JUMP_ALIGN 23 HError_GetErrorCodeToAHforBitPollingTimeout: 24 test al, FLG_IDE_ST_BSY ; Other bits undefined when BSY set 25 jnz SHORT HError_GetErrorCodeForStatusReg ; Busy, normal timeout 26 test al, FLG_IDE_ST_DF | FLG_IDE_ST_CORR | FLG_IDE_ST_ERR 27 jnz SHORT HError_GetErrorCodeForStatusReg ; Not busy but some error 28 or al, FLG_IDE_ST_BSY ; Polled bit got never set, force timeout 29 ; Fall to HError_GetErrorCodeForStatusReg 10 30 11 31 ;-------------------------------------------------------------------- … … 37 57 mov [HDBDA.wHDStAndErr], ax ; Store Status and Error to BDA 38 58 pop ds 39 40 ; Translate registers to BIOS error code41 59 ; Fall to HError_ConvertIdeErrorToBiosRet 42 60 … … 58 76 ALIGN JUMP_ALIGN 59 77 HError_ConvertIdeErrorToBiosRet: 60 ; Any error? 78 test al, FLG_IDE_ST_BSY 79 jnz SHORT .TimeoutError 61 80 test al, FLG_IDE_ST_DF | FLG_IDE_ST_CORR | FLG_IDE_ST_ERR 62 81 jnz SHORT .ReadErrorFromStatusReg 63 82 xor ah, ah ; No errors, zero AH and CF 83 ret 84 85 .TimeoutError: 86 mov ah, RET_HD_TIMEOUT 87 stc 64 88 ret 65 89
Note:
See TracChangeset
for help on using the changeset viewer.