Changeset 258 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.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/VariablesAndDPTs/CreateDPT.asm
r227 r258 63 63 .StoreFlags: 64 64 mov [di+DPT.wFlags], ax 65 66 %ifdef MODULE_SERIAL67 cmp byte [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT68 jnz .StoreAddressing69 or byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE70 %endif71 65 ; Fall to .StoreAddressing 72 66 … … 205 199 .StoreDeviceSpecificParameters: 206 200 call Device_FinalizeDPT 201 202 %ifdef MODULE_SERIAL_FLOPPY 203 ; 204 ; These two instructions serve two purposes: 205 ; 1. If the drive is a floppy drive (CF set), then we effectively increment the counter. 206 ; 2. If this is a hard disk, and there have been any floppy drives previously added, then the hard disk is 207 ; effectively discarded. This is more of a safety check then code that should ever normally be hit (see below). 208 ; Since the floppy DPT's come after the hard disk DPT's, without expensive (code size) code to relocate a DPT, 209 ; this was necessary. Now, this situation shouldn't happen in normal operation, for a couple of reasons: 210 ; A. xtidecfg always puts configured serial ports at the end fo the IDEVARS list 211 ; B. the auto serial code is always executed last 212 ; C. the serial server always returns floppy drives last 213 ; 214 adc byte [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt], 0 215 jnz .AllDone 216 %else 217 ; 218 ; Even without floppy support enabled, we shouldn't try to mount a floppy image as a hard disk, which 219 ; could lead to unpredictable results since no MBR will be present, etc. The server doesn't know that 220 ; floppies are supported, so it is important to still fail here if a floppy is seen during the drive scan. 221 ; 222 jc .AllDone 223 %endif 224 207 225 ; Fall to .StoreDriveNumberAndUpdateDriveCount 208 226 … … 230 248 ja SHORT .AllDone ; If so, return 231 249 mov [RAMVARS.bFirstDrv], dl ; Store first drive number 250 251 .AllDone: 232 252 clc 233 .AllDone:234 253 ret 254
Note:
See TracChangeset
for help on using the changeset viewer.