Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HError.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/Common/HError.asm
r86 r148 1 ; Project name : IDEBIOS1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : Error checking functions for BIOS Hard disk functions. 3 3 … … 6 6 7 7 ;-------------------------------------------------------------------- 8 ; HError_ProcessTimeoutAfterPollingBSYandSomeOtherStatusBit 9 ; HError_ProcessErrorsAfterPollingBSY 8 ; HError_GetErrorCodeToAHforTimeoutWhenPolling 10 9 ; Parameters: 11 10 ; DS: RAMVARS segment … … 18 17 ;-------------------------------------------------------------------- 19 18 ALIGN JUMP_ALIGN 20 HError_ProcessTimeoutAfterPollingBSYandSomeOtherStatusBit: 21 call HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA 22 call GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 19 HError_GetErrorCodeToAHforTimeoutWhenPolling: 20 call HError_GetErrorCodeToAHafterPolling 23 21 jc SHORT .ReturnErrorCodeInAH 24 22 mov ah, RET_HD_TIMEOUT ; Force timeout since no actual error... … … 28 26 29 27 28 ;-------------------------------------------------------------------- 29 ; HError_GetErrorCodeToAHafterPolling 30 ; Parameters: 31 ; DS: RAMVARS segment 32 ; Returns: 33 ; AH: BIOS error code 34 ; CF: Set if error 35 ; Cleared if no error 36 ; Corrupts registers: 37 ; AL 38 ;-------------------------------------------------------------------- 30 39 ALIGN JUMP_ALIGN 31 HError_ ProcessErrorsAfterPollingBSY:40 HError_GetErrorCodeToAHafterPolling: 32 41 %ifndef USE_186 33 42 call HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA … … 131 140 db RET_HD_BADSECTOR ; Bit7=BBK, Bad Block Detected 132 141 db RET_HD_STATUSERR ; When Error Register is zero 142 143 144 ;-------------------------------------------------------------------- 145 ; HError_SetErrorCodeToBdaAndToIntpackInSSBPfromAH 146 ; HError_SetErrorCodeToIntpackInSSBPfromAH 147 ; Parameters: 148 ; AH: BIOS error code (00h = no error) 149 ; SS:BP: Ptr to INTPACK 150 ; Returns: 151 ; SS:BP: Ptr to INTPACK with error condition set 152 ; Corrupts registers: 153 ; DS, DI 154 ;-------------------------------------------------------------------- 155 ALIGN JUMP_ALIGN 156 HError_SetErrorCodeToBdaAndToIntpackInSSBPfromAH: 157 ; Store error code to BDA 158 LOAD_BDA_SEGMENT_TO ds, di 159 mov [BDA.bHDLastSt], ah 160 161 ; Store error code to INTPACK 162 HError_SetErrorCodeToIntpackInSSBPfromAH: 163 mov [bp+INTPACK.ah], ah 164 test ah, ah 165 jnz SHORT .SetCFtoIntpack 166 and BYTE [bp+INTPACK.flags], ~FLG_FLAGS_CF 167 ret 168 .SetCFtoIntpack: 169 or BYTE [bp+INTPACK.flags], FLG_FLAGS_CF 170 ret
Note:
See TracChangeset
for help on using the changeset viewer.