Changeset 35 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common
- Timestamp:
- Aug 24, 2010, 6:44:44 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HError.asm
r34 r35 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 30.11.2007 4 ; Last update : 2 3.8.20104 ; Last update : 24.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Error checking functions for BIOS Hard disk functions. … … 23 23 ALIGN JUMP_ALIGN 24 24 HError_ProcessTimeoutAfterPollingBSYandSomeOtherStatusBit: 25 push ds26 push dx27 28 25 call HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA 29 26 call GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 30 jc SHORT StoreErrorCodeFromAHtoBDA27 jc SHORT .ReturnErrorCodeInAH 31 28 mov ah, RET_HD_TIMEOUT ; Force timeout since no actual error... 32 29 stc ; ...but wanted bit was never set 33 jmp SHORT StoreErrorCodeFromAHtoBDA 30 .ReturnErrorCodeInAH: 31 ret 34 32 35 33 36 34 ALIGN JUMP_ALIGN 37 35 HError_ProcessErrorsAfterPollingBSY: 38 push ds39 push dx40 41 36 call HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA 42 call GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 43 StoreErrorCodeFromAHtoBDA: 44 mov [BDA.bHDLastSt], ah ; Store BIOS error code to BDA 45 46 pop dx 47 pop ds 48 ret 37 jmp SHORT GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 49 38 50 39 … … 56 45 ; AL: IDE Status Register contents 57 46 ; AH: IDE Error Register contents 58 ; DS: BDA segment59 47 ; Corrupts registers: 60 ; DX48 ; Nothing 61 49 ;-------------------------------------------------------------------- 62 50 ALIGN JUMP_ALIGN 63 51 HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA: 52 push ds 53 push dx 54 64 55 mov dx, [RAMVARS.wIdeBase] ; Load IDE base port address 65 56 inc dx ; Increment to Error Register … … 68 59 add dx, BYTE REGR_IDE_ST - REGR_IDE_ERROR 69 60 in al, dx ; Read Status Register to AL 70 ; Fall to .StoreStatusAndErrorRegistersFromAXtoBDA71 61 72 ;--------------------------------------------------------------------73 ; .StoreStatusAndErrorRegistersFromAXtoBDA74 ; Parameters:75 ; AL: IDE Status Register contents76 ; AH: IDE Error Register contents77 ; Returns:78 ; DS: BDA segment (zero)79 ; Corrupts registers:80 ; DX81 ;--------------------------------------------------------------------82 .StoreStatusAndErrorRegistersFromAXtoBDA:83 62 LOAD_BDA_SEGMENT_TO ds, dx 84 63 mov [HDBDA.wHDStAndErr], ax 64 65 pop dx 66 pop ds 85 67 ret 86 68 … … 148 130 db RET_HD_BADSECTOR ; Bit7=BBK, Bad Block Detected 149 131 db RET_HD_STATUSERR ; When Error Register is zero 150 151 152 ;--------------------------------------------------------------------153 ; HError_StoreBiosErrorCodeFromAHtoBDA154 ; Parameters:155 ; AH: BIOS error code156 ; Returns:157 ; Nothing158 ; Corrupts registers:159 ; DI160 ;--------------------------------------------------------------------161 ALIGN JUMP_ALIGN162 HError_StoreBiosErrorCodeFromAHtoBDA:163 push ds164 mov di, 0 ; Zero DI and preserve FLAGS165 mov ds, di ; Copy BDA segment to DS166 mov [BDA.bHDLastSt], ah167 pop ds168 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HIRQ.asm
r34 r35 2 2 ; Project name : IDE BIOS 3 3 ; Created date : 11.12.2009 4 ; Last update : 2 3.8.20104 ; Last update : 24.8.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Interrupt handling related functions. … … 98 98 jmp SHORT AcknowledgeMasterInterruptController 99 99 100 100 101 ALIGN JUMP_ALIGN 101 102 HIRQ_InterruptServiceRoutineForIrqs8to15: … … 132 133 push ds 133 134 push di 134 push dx135 135 136 136 ; Reading Status Register acknowledges IDE interrupt 137 137 call RamVars_GetSegmentToDS 138 138 call HError_GetStatusAndErrorRegistersToAXandStoreThemToBDA 139 140 ; Set Task Flag 141 LOAD_BDA_SEGMENT_TO ds, ax 139 142 mov BYTE [BDA.bHDTaskFlg], 0FFh ; Set task flag 140 143 141 pop dx142 144 pop di 143 145 pop ds
Note:
See TracChangeset
for help on using the changeset viewer.