Changeset 203 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Nov 23, 2011, 8:42:19 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r200 r203 23 23 .DriveDetectLoop: ; Loop through IDEVARS 24 24 mov si, g_szDetect ; Setup standard print string 25 %ifdef MODULE_SERIAL 25 %ifdef MODULE_SERIAL 26 26 cmp byte [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT 27 27 jnz .DriveNotSerial ; Special print string for serial drives … … 29 29 .DriveNotSerial: 30 30 %endif 31 31 32 call .DetectDrives_WithIDEVARS ; Detect Master and Slave 32 33 add bp, BYTE IDEVARS_size ; Point to next IDEVARS 33 34 loop .DriveDetectLoop 35 36 %ifdef MODULE_SERIAL 37 ; 38 ; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we have a connection) 39 ; Note that XLATEVARS.bLastSerial is zero'd in RamVars_Initialize, called in Initialize_AutoDetectDrives; 40 ; bLastSerial it set in the detection code of SerialCommand.asm 41 ; 42 cmp byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial],cl ; cx = zero after the loop above 43 ; less instruction bytes than using immediate 44 jnz .done 34 45 35 %ifdef MODULE_SERIAL36 call FindDPT_ToDSDIforSerialDevice ; Did we already find any serial drives?37 jc .done ; Yes, do not scan38 46 mov al,[cs:ROMVARS.wFlags] ; Configurator set to always scan? 39 47 or al,[es:BDA.bKBFlgs1] ; Or, did the user hold down the ALT key? 40 48 and al,8 ; 8 = alt key depressed, same as FLG_ROMVARS_SERIAL_ALWAYSDETECT 41 49 jz .done 50 42 51 mov bp, ROMVARS.ideVarsSerialAuto ; Point to our special IDEVARS sructure, just for serial scans 43 52 mov si, g_szDetectCOMAuto ; Special, special print string for serial drives during a scan … … 74 83 pop si 75 84 76 %ifdef MODULE_SERIAL77 ;78 ; This block of code checks to see if we found a master during a serial drives scan. If no master79 ; was found, there is no point in scanning for a slave as the server will not return a slave without a master,80 ; as there is very little point given the drives are emulated. Performing the slave scan will take81 ; time to rescan all the COM port and baud rate combinations.82 ;83 jnc .masterFound84 pop cx85 jcxz .done ; note that CX will only be zero after the .DriveDetectLoop, indicating a serial scan86 push cx87 .masterFound:88 %endif89 90 85 mov ax, g_szSlave 91 86 mov bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV … … 106 101 ; ES: Zero (BDA segment) 107 102 ; Returns: 108 ; CF: Set on failure, Clear on success 109 ; Note that this is set in the last thing both cases 110 ; do: printing the drive name, or printing "Not Found" 103 ; None 111 104 ; Corrupts registers: 112 105 ; AX, BX, CX, DX, SI, DI … … 144 137 ;call ReadAtapiInfoFromDrive ; Assume CD-ROM 145 138 ;jnc SHORT _CreateBiosTablesForCDROM 146 jmp short DetectDrives_DriveNotFound 139 140 ;jmp short DetectDrives_DriveNotFound 141 ;;; fall-through instead of previous jmp instruction 142 ;-------------------------------------------------------------------- 143 ; DetectDrives_DriveNotFound 144 ; Parameters: 145 ; Nothing 146 ; Returns: 147 ; CF: Set (from BootMenuPrint_NullTerminatedStringFromCSSIandSetCF) 148 ; Corrupts registers: 149 ; AX, SI 150 ;-------------------------------------------------------------------- 151 DetectDrives_DriveNotFound: 152 mov si, g_szNotFound 153 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 147 154 148 155 … … 166 173 jmp short DetectPrint_DriveNameFromBootnfoInESBX 167 174 168 ;--------------------------------------------------------------------169 ; DetectDrives_DriveNotFound170 ; Parameters:171 ; Nothing172 ; Returns:173 ; CF: Set (from BootMenuPrint_NullTerminatedStringFromCSSIandSetCF)174 ; Corrupts registers:175 ; AX, SI176 ;--------------------------------------------------------------------177 DetectDrives_DriveNotFound:178 mov si, g_szNotFound179 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF180 175 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r200 r203 88 88 pop bx 89 89 pop di 90 clc ; return success up through DetectDrives91 90 ret 92 91
Note:
See TracChangeset
for help on using the changeset viewer.