Changeset 259 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Feb 23, 2012, 7:14:06 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r258 r259 23 23 add al, [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt] 24 24 %endif 25 xchg ax, dx 26 ; Fall to FindDPT_ForDriveNumber 27 25 xchg ax, dx 26 ; fall-through to FindDPT_ForDriveNumber 28 27 29 28 ;-------------------------------------------------------------------- … … 66 65 xchg di, ax ; Restore AX and put result in DI 67 66 pop dx 68 ret 67 68 ret 69 70 ;-------------------------------------------------------------------- 71 ; Consolidator for checking the result from RamVars_IsDriveHandledByThisBIOS 72 ; and then if it is our drive, getting the DPT with FindDPT_ForDriveNumber 73 ; 74 ; RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber 75 ; Parameters: 76 ; DL: Drive number 77 ; DS: RAMVARS segment 78 ; Returns: 79 ; DS:DI: Ptr to DPT, if it is our drive 80 ; CF: Set if not our drive, clear if it is our drive 81 ; Corrupts registers: 82 ; Nothing 83 ;-------------------------------------------------------------------- 84 ALIGN JUMP_ALIGN 85 RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber: 86 call RamVars_IsDriveHandledByThisBIOS 87 jnc FindDPT_ForDriveNumber 88 ret 89 69 90 70 91 ;-------------------------------------------------------------------- … … 212 233 push cx 213 234 214 mov cl, [RAMVARS.bDrvCnt]215 mov ch, 0216 217 235 mov di, RAMVARS_size ; Point DS:DI to first DPT 218 236 219 jcxz .NotFound ; Return if no drives 237 mov cl, [RAMVARS.bDrvCnt] 238 xor ch, ch ; Clears CF 239 240 jcxz .AllDptsIterated ; Return if no drives, CF will be clear from xor above 220 241 221 242 ALIGN JUMP_ALIGN … … 223 244 call si ; Is wanted DPT? 224 245 jc SHORT .AllDptsIterated ; If so, return 225 add di, BYTE LARGEST_DPT_SIZE ; Point to next DPT 246 add di, BYTE LARGEST_DPT_SIZE ; Point to next DPT, clears CF 226 247 loop .LoopWhileDPTsLeft 227 228 .NotFound: 229 clc ; Clear CF since DPT not found 248 249 ; fall-through: DPT was not found, CF is already clear from ADD di inside the loop 230 250 231 251 ALIGN JUMP_ALIGN … … 233 253 pop cx 234 254 ret 255
Note:
See TracChangeset
for help on using the changeset viewer.