Changeset 275 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- Feb 28, 2012, 1:25:33 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r271 r275 15 15 ; DL: Translated Drive number (ignored so all drives are reset) 16 16 ; If bit 7 is set all hard disks and floppy disks reset. 17 ; DS:DI: Ptr to DPT (o nly if DL is ourdrive)17 ; DS:DI: Ptr to DPT (or Null if foreign drive) 18 18 ; SS:BP: Ptr to IDEPACK 19 19 ; Returns with INTPACK: … … 51 51 call ResetForeignHardDisks 52 52 53 ; Resetting our hard disks will modify dl and bl such that this call must be the last in the list 54 call GetDriveNumberForForeignHardDiskHandlerToDL ; Load DPT for our drive 55 jc SHORT .SkipHardDiskReset ; Our drive not requested so let's not reset them 53 test di, di 54 jz SHORT .SkipHardDiskReset 55 56 ; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based, 57 ; such that this call must be the last in the list of reset routines called. 58 ; 56 59 call ResetHardDisksHandledByOurBIOS 57 60 … … 118 121 ; DS: RAMVARS segment 119 122 ; Returns: 120 ; DS:DI: Ptr to DPT if our drive 123 ; DS:DI: Ptr to DPT if our drive (or Null if foreign drive) 121 124 ; DL: BL if foreign drive 122 125 ; 80h if our drive 123 ; CF: Set if foreign drive124 ; Cleared if our drive125 ; Corrupts registers:126 ; (DI)127 126 ;-------------------------------------------------------------------- 128 127 GetDriveNumberForForeignHardDiskHandlerToDL: 129 128 mov dl, bl 130 call FindDPT_ForDriveNumberInDL131 j c SHORT .ReturnWithForeignDriveInDL129 test di, di 130 jz SHORT .Return 132 131 mov dl, 80h ; First possible Hard Disk should be safe value 133 .Return WithForeignDriveInDL:132 .Return: 134 133 ret 135 134 136 137 ;-------------------------------------------------------------------- 138 ; AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization 139 ; Parameters: 140 ; DS: RAMVARS segment 141 ; SS:BP: Ptr to IDEPACK 142 ; Returns: 143 ; Nothing 144 ; Corrupts registers: 145 ; AX, BX, CX, DX, SI, DI 146 ;-------------------------------------------------------------------- 147 AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization: 148 mov bl, [RAMVARS.bFirstDrv] 149 call GetDriveNumberForForeignHardDiskHandlerToDL 150 ; Fall to ResetHardDisksHandledByOurBIOS 135 AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization equ ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed 151 136 152 137 ;-------------------------------------------------------------------- 153 138 ; ResetHardDisksHandledByOurBIOS 154 139 ; Parameters: 155 ; BL: Requested drive (DL when entering AH=00h)156 140 ; DS:DI: Ptr to DPT for requested drive 141 ; If DI is Null (foreign drive), or if error result in BH won't be used, 142 ; enter through .ErrorCodeNotUsed, to avoid di=Null dereference 157 143 ; SS:BP: Ptr to IDEPACK 158 144 ; Returns: 159 145 ; BH: Error code from requested drive (if available) 160 146 ; Corrupts registers: 161 ; AX, CX, DX, SI, DI147 ; AX, BX, CX, DX, SI, DI 162 148 ;-------------------------------------------------------------------- 163 149 ResetHardDisksHandledByOurBIOS: 164 150 mov bl, [di+DPT.bIdevarsOffset] ; replace drive number with Idevars pointer for cmp with dl 151 152 .ErrorCodeNotUsed: ; BH will be garbage if thie entry point is used, 153 ; but reset of all drives will still happen 154 165 155 mov dl, ROMVARS.ideVars0 ; starting Idevars offset 166 156
Note:
See TracChangeset
for help on using the changeset viewer.