Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DriveXlate.asm
r128 r148 6 6 7 7 ;-------------------------------------------------------------------- 8 ; Translates drive number when entering INT 13h.9 ;10 ; DriveXlate_WhenEnteringInt13h11 ; Parameters:12 ; DL: Drive number to be possibly translated13 ; DS: RAMVARS segment14 ; Returns:15 ; DL: Translated drive number16 ; Corrupts registers:17 ; DI18 ;--------------------------------------------------------------------19 ALIGN JUMP_ALIGN20 DriveXlate_WhenEnteringInt13h:21 inc BYTE [RAMVARS.xlateVars+XLATEVARS.bRecurCnt]22 cmp BYTE [RAMVARS.xlateVars+XLATEVARS.bRecurCnt], 123 je SHORT DriveXlate_ToOrBack24 ret25 26 27 ;--------------------------------------------------------------------28 ; DriveXlate_WhenLeavingInt13hWithReturnValueInDL29 ; Parameters:30 ; DS: RAMVARS segment31 ; Returns:32 ; Nothing33 ; Corrupts registers:34 ; DI35 ;--------------------------------------------------------------------36 ALIGN JUMP_ALIGN37 DriveXlate_WhenLeavingInt13hWithReturnValueInDL:38 dec BYTE [RAMVARS.xlateVars+XLATEVARS.bRecurCnt]39 ret40 41 ;--------------------------------------------------------------------42 ; Translates drive number when leaving INT 13h.43 ;44 ; DriveXlate_WhenLeavingInt13h45 ; Parameters:46 ; DL: Drive number to be possibly translated47 ; DS: RAMVARS segment48 ; Returns:49 ; DL: Translated drive number50 ; Corrupts registers:51 ; DI52 ;--------------------------------------------------------------------53 ALIGN JUMP_ALIGN54 DriveXlate_WhenLeavingInt13h:55 dec BYTE [RAMVARS.xlateVars+XLATEVARS.bRecurCnt]56 jz SHORT DriveXlate_ToOrBack57 ret58 59 60 ;--------------------------------------------------------------------61 ; Translates drive number to or back.62 ;63 8 ; DriveXlate_ToOrBack 64 9 ; Parameters: … … 75 20 jz SHORT .Return ; Return if translation disabled 76 21 xchg di, ax ; Backup AX 77 call DriveXlate_SwapFloppyDriveOrHardDisk22 call SwapFloppyDriveOrHardDisk 78 23 xchg ax, di 79 24 .Return: … … 82 27 83 28 ;-------------------------------------------------------------------- 84 ; Swaps Floppy Drive or Hard Disk number. 85 ; 86 ; DriveXlate_SwapFloppyDriveOrHardDisk 29 ; SwapFloppyDriveOrHardDisk 87 30 ; Parameters: 88 31 ; DL: Drive number to be possibly swapped … … 94 37 ;-------------------------------------------------------------------- 95 38 ALIGN JUMP_ALIGN 96 DriveXlate_SwapFloppyDriveOrHardDisk:39 SwapFloppyDriveOrHardDisk: 97 40 mov ah, 80h ; Assume hard disk 98 41 mov al, BYTE [RAMVARS.xlateVars+XLATEVARS.bHDSwap] … … 145 88 DriveXlate_Reset: 146 89 mov WORD [RAMVARS.xlateVars], 8000h ; .bFDSwap and .bHDSwap 147 mov BYTE [RAMVARS.xlateVars+XLATEVARS.bRecurCnt], 0148 90 ret 149 91 … … 172 114 mov [RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl 173 115 ret 174 175 176 ;--------------------------------------------------------------------177 ; Checks if INT 13h function returns some value in DL178 ; (other than the drive number that was also parameter).179 ;180 ; DriveXlate_DoesFunctionReturnSomethingInDL181 ; Parameters:182 ; AH: INT 13h BIOS Function183 ; DL: Drive number184 ; Returns:185 ; CF: Set if something is returned in DL186 ; Cleared if only drive number parameter is returned in DL187 ; Corrupts registers:188 ; Nothing189 ;--------------------------------------------------------------------190 ALIGN JUMP_ALIGN191 DriveXlate_DoesFunctionReturnSomethingInDL:192 cmp ah, 08h ; AH=08h, Read Disk Drive Parameters?193 je SHORT DriveXlate_FunctionReturnsSomethingInDL194 test dl, dl195 jns SHORT DriveXlate_DoesFloppyFunctionReturnSomethingInDL196 ; Fall to DriveXlate_DoesHardDiskFunctionReturnSomethingInDL197 198 ;--------------------------------------------------------------------199 ; Checks if INT 13h hard disk or floppy drive function returns some200 ; value in DL other than the drive number that was also parameter).201 ; Some functions return different values for hard disks and floppy drives.202 ;203 ; DriveXlate_DoesHardDiskFunctionReturnSomethingInDL204 ; DriveXlate_DoesFloppyFunctionReturnSomethingInDL205 ; Parameters:206 ; AH: INT 13h BIOS Function207 ; DL: Hard Disk number208 ; Returns:209 ; CF: Set if something is returned in DL210 ; Cleared if only drive number parameter is returned in DL211 ; Corrupts registers:212 ; Nothing213 ;--------------------------------------------------------------------214 ; ALIGN JUMP_ALIGN215 DriveXlate_DoesHardDiskFunctionReturnSomethingInDL:216 cmp ah, 15h ; AH=15h, Read Disk Drive Size?217 je SHORT DriveXlate_FunctionReturnsSomethingInDL218 DriveXlate_DoesFloppyFunctionReturnSomethingInDL:219 clc220 ret221 222 ALIGN JUMP_ALIGN223 DriveXlate_FunctionReturnsSomethingInDL:224 stc225 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r123 r148 34 34 mov [RAMVARS.fpOldI13h+2], dx ; Store old INT 13h segment 35 35 mov bx, INTV_DISK_FUNC ; INT 13h interrupt vector offset 36 mov si, Int13h_DiskFunctions 36 mov si, Int13h_DiskFunctionsHandler ; Interrupt handler offset 37 37 call Interrupts_InstallHandlerToVectorInBXFromCSSI 38 38
Note:
See TracChangeset
for help on using the changeset viewer.