Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
- Timestamp:
- Mar 4, 2012, 1:35:10 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r269 r294 26 26 mov cx, g_szDetectMaster 27 27 mov bh, MASK_DRVNHEAD_SET ; Select Master drive 28 call StartDetectionWithDriveSelectByteInBHandStringIn AX ; Detect and create DPT + BOOTNFO28 call StartDetectionWithDriveSelectByteInBHandStringInCX ; Detect and create DPT + BOOTNFO 29 29 30 30 mov cx, g_szDetectSlave 31 31 mov bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV 32 call StartDetectionWithDriveSelectByteInBHandStringIn AX32 call StartDetectionWithDriveSelectByteInBHandStringInCX 33 33 34 34 pop cx … … 72 72 mov al, [es:BDA.bHDCount] 73 73 add cl, al ; Add our drives to the system count 74 mov [es:BDA.bHDCount], cl 75 or al, 80h ; Or in hard disk flag 76 mov [RAMVARS.bFirstDrv], al ; Store first drive number 77 78 .AddFloppies: 79 %ifdef MODULE_SERIAL_FLOPPY 74 mov [es:BDA.bHDCount], cl 75 or al, 80h ; Or in hard disk flag 76 mov [RAMVARS.bFirstDrv], al ; Store first drive number 77 78 .AddFloppies: 79 %ifdef MODULE_SERIAL_FLOPPY 80 80 ;---------------------------------------------------------------------- 81 81 ; … … 84 84 dec ch 85 85 mov al, ch 86 js .NoFloppies ; if no drives are present, we store 0ffh 86 js .NoFloppies ; if no drives are present, we store 0ffh 87 87 88 88 call FloppyDrive_GetCountFromBIOS_or_BDA … … 92 92 add al, ch ; Add our drives to existing drive count 93 93 cmp al, 3 ; For BDA, max out at 4 drives (ours is zero based) 94 j l.MaxBDAFloppiesExceeded95 mov al, 3 94 jb .MaxBDAFloppiesExceeded 95 mov al, 3 96 96 .MaxBDAFloppiesExceeded: 97 97 eROR_IM al, 2 ; move to bits 6-7 98 98 inc ax ; low order bit, indicating floppy drive exists 99 99 100 mov ah, [es:BDA.wEquipment] ; Load Equipment WORD low byte 100 mov ah, [es:BDA.wEquipment] ; Load Equipment WORD low byte 101 101 and ah, 03eh ; Mask off drive number and drives present bit 102 102 or al, ah ; Or in new values … … 111 111 shr ch, 1 ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2) 112 112 rcl al, 1 ; starting drive number in upper 7 bits, number of drives in low bit 113 .NoFloppies: 113 .NoFloppies: 114 114 mov [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], al 115 115 %endif 116 116 117 117 ret 118 118 119 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 119 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 120 120 %if FLG_ROMVARS_SERIAL_SCANDETECT != 8 121 121 %error "DetectDrives is currently coded to assume that FLG_ROMVARS_SERIAL_SCANDETECT is the same bit as the ALT key code in the BDA. Changes in the code will be needed if these values are no longer the same." … … 125 125 126 126 ;-------------------------------------------------------------------- 127 ; StartDetectionWithDriveSelectByteInBHandStringIn AX127 ; StartDetectionWithDriveSelectByteInBHandStringInCX 128 128 ; Parameters: 129 129 ; BH: Drive Select byte for Drive and Head Register … … 137 137 ; AX, BX, CX, DX, SI, DI 138 138 ;-------------------------------------------------------------------- 139 StartDetectionWithDriveSelectByteInBHandStringIn AX:140 call DetectPrint_StartDetectWithMasterOrSlaveStringIn AXandIdeVarsInCSBP139 StartDetectionWithDriveSelectByteInBHandStringInCX: 140 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 141 141 ; Fall to .ReadAtaInfoFromHardDisk 142 142
Note:
See TracChangeset
for help on using the changeset viewer.