Changeset 258 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
- Timestamp:
- Feb 22, 2012, 7:01:53 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r249 r258 29 29 mov [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl 30 30 call RamVars_IsFunctionHandledByThisBIOS 31 jnc SHORT Int13h_DirectCallToAnotherBios 31 jc SHORT Int13h_DirectCallToAnotherBios 32 32 33 call FindDPT_ForDriveNumber ; DS:DI now points to DPT 33 34 … … 139 140 ALIGN JUMP_ALIGN 140 141 Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH: 142 %ifdef MODULE_SERIAL_FLOPPY 143 mov al, [bp+IDEPACK.intpack+INTPACK.dl] 144 Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber: 145 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber 146 %else 141 147 call Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH 148 %endif 142 149 Int13h_ReturnFromHandlerWithoutStoringErrorCode: 143 150 or WORD [bp+IDEPACK.intpack+INTPACK.flags], FLG_FLAGS_IF ; Return with interrupts enabled … … 154 161 ; Returns: 155 162 ; Depends on function 163 ; NOTE: ES:DI needs to be returned from the previous interrupt 164 ; handler, for floppy DPT in function 08h 156 165 ; Corrupts registers: 157 ; BX, DI, ES166 ; None 158 167 ;-------------------------------------------------------------------- 159 168 ALIGN JUMP_ALIGN 160 169 Int13h_CallPreviousInt13hHandler: 161 push di162 170 call ExchangeCurrentInt13hHandlerWithOldInt13hHandler 163 171 int BIOS_DISK_INTERRUPT_13h 164 call ExchangeCurrentInt13hHandlerWithOldInt13hHandler 165 pop di 166 ret 167 172 ;;; fall-through to ExchangeCurrentInt13hHandlerWithOldInt13hHandler 168 173 169 174 ;-------------------------------------------------------------------- … … 174 179 ; Nothing 175 180 ; Corrupts registers: 176 ; DI 181 ; Nothing 182 ; Note: Flags are preserved 177 183 ;-------------------------------------------------------------------- 178 184 ALIGN JUMP_ALIGN 179 185 ExchangeCurrentInt13hHandlerWithOldInt13hHandler: 180 186 push es 181 LOAD_BDA_SEGMENT_TO es, di 182 mov di, [RAMVARS.fpOldI13h] 187 push si 188 LOAD_BDA_SEGMENT_PRESERVE_FLAGS_TO es, si 189 mov si, [RAMVARS.fpOldI13h] 183 190 cli 184 xchg di, [es:BIOS_DISK_INTERRUPT_13h*4]185 mov [RAMVARS.fpOldI13h], di186 mov di, [RAMVARS.fpOldI13h+2]187 xchg di, [es:BIOS_DISK_INTERRUPT_13h*4+2]191 xchg si, [es:BIOS_DISK_INTERRUPT_13h*4] 192 mov [RAMVARS.fpOldI13h], si 193 mov si, [RAMVARS.fpOldI13h+2] 194 xchg si, [es:BIOS_DISK_INTERRUPT_13h*4+2] 188 195 sti 189 mov [RAMVARS.fpOldI13h+2], di 196 mov [RAMVARS.fpOldI13h+2], si 197 pop si 190 198 pop es 191 199 ret … … 204 212 ;-------------------------------------------------------------------- 205 213 ALIGN JUMP_ALIGN 214 %ifdef MODULE_SERIAL_FLOPPY 215 Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber: 216 ; Store error code to BDA 217 mov bx, BDA.bHDLastSt 218 test al, al 219 js .HardDisk 220 mov bl, BDA.bFDRetST & 0xff 221 .HardDisk: 222 LOAD_BDA_SEGMENT_TO ds, di 223 mov [bx], ah 224 %else 206 225 Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH: 207 226 ; Store error code to BDA 208 LOAD_BDA_SEGMENT_TO ds, di 227 LOAD_BDA_SEGMENT_TO ds, di 209 228 mov [BDA.bHDLastSt], ah 229 %endif 210 230 211 231 ; Store error code to INTPACK
Note:
See TracChangeset
for help on using the changeset viewer.