Changeset 399 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Apr 19, 2012, 10:39:44 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm
r376 r399 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 34 34 IdeDPT_Finalize: 35 35 36 %ifdef MODULE_FEATURE_SETS 37 ;-------------------------------------------------------------------- 38 ; .DetectPowerManagementSupport 39 ; Parameters: 40 ; DS:DI: Ptr to Disk Parameter Table 41 ; ES:SI: Ptr to 512-byte ATA information read from the drive 42 ; Returns: 43 ; Nothing 44 ; Corrupts registers: 45 ; Nothing 46 ;-------------------------------------------------------------------- 47 .DetectPowerManagementSupport: 48 test BYTE [es:si+ATA6.wSetSup82], A6_wSetSup82_POWERMAN 49 jz .NoPowerManagementSupport 50 or BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 51 .NoPowerManagementSupport: 52 %endif ; MODULE_FEATURE_SETS 53 36 54 ;-------------------------------------------------------------------- 37 55 ; .StoreBlockMode 38 56 ; Parameters: 39 57 ; DS:DI: Ptr to Disk Parameter Table 40 ; ES:SI: Ptr to 512-byte ATA information read from the drive41 ; CS:BP: Ptr to IDEVARS for the controller42 58 ; Returns: 43 59 ; Nothing 44 60 ; Corrupts registers: 45 ; AX61 ; Nothing 46 62 ;-------------------------------------------------------------------- 47 63 .StoreBlockMode: … … 78 94 mov [di+DPT_ADVANCED_ATA.wMinPioCycleTime], cx 79 95 mov [di+DPT_ADVANCED_ATA.bPioMode], al 80 or [di+DPT.bFlagsHigh], ah 96 or [di+DPT.bFlagsHigh], ah 81 97 82 98 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r376 r399 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 44 44 45 45 ;-------------------------------------------------------------------- 46 ; Initialize ddrive to be ready for use.46 ; Initialize drive to be ready for use. 47 47 ; 48 48 ; AH9h_InitializeDriveForUse … … 57 57 ;-------------------------------------------------------------------- 58 58 AH9h_InitializeDriveForUse: 59 xor ax, ax 60 61 ; Clear Initialization Error flags from DPT 62 mov [di+DPT_ATA.bInitError], al 63 64 %ifdef MODULE_SERIAL 65 ; No need to do this for serial devices 66 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE ; Clears CF 67 jz SHORT .ContinueInitialization 68 ret ; With AH and CF cleared 69 .ContinueInitialization: 70 %endif 71 59 72 push es 60 73 push si 61 74 62 %ifdef MODULE_SERIAL 63 ; no need to do this for serial devices 64 xor ah, ah 65 test byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE ; Clears CF 66 jnz .ReturnWithErrorCodeInAH 67 68 %else 69 ; Clear Initialization Error flags from DPT 70 mov BYTE [di+DPT_ATA.bInitError], 0 71 %endif 72 75 ;;; SelectDrive 73 76 ; Try to select drive and wait until ready 74 77 call AccessDPT_GetDriveSelectByteToAL 75 78 mov [bp+IDEPACK.bDrvAndHead], al 76 79 call Device_SelectDrive 80 77 81 mov al, FLG_INITERROR_FAILED_TO_SELECT_DRIVE 78 call SetErrorFlagFromALwithErrorCodeInAH 79 jc SHORT .ReturnWithErrorCodeInAH 80 82 call .SetErrorFlagFromALwithErrorCodeInAH 83 jc .ReturnWithErrorCodeInAH 84 85 ;;; InitializeDeviceParameters 81 86 ; Initialize CHS parameters if LBA is not used 82 call InitializeDeviceParameters 83 mov al, FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS 84 call SetErrorFlagFromALwithErrorCodeInAH 85 86 ; Enable or Disable Write Cache 87 call SetWriteCache 88 mov al, FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE 89 call SetErrorFlagFromALwithErrorCodeInAH 90 91 ; Recalibrate drive by seeking to cylinder 0 92 .RecalibrateDrive: 93 call AH11h_RecalibrateDrive 94 mov al, FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE 95 call SetErrorFlagFromALwithErrorCodeInAH 96 97 ; Initialize block mode transfers 98 .InitializeBlockMode: 99 call InitializeBlockMode 100 mov al, FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE 101 call SetErrorFlagFromALwithErrorCodeInAH 102 103 %ifdef MODULE_ADVANCED_ATA 104 ; Initialize fastest supported PIO mode 105 .InitializePioMode: 106 call InitializePioMode 107 mov al, FLG_INITERROR_FAILED_TO_SET_PIO_MODE 108 call SetErrorFlagFromALwithErrorCodeInAH 109 %endif 110 111 ; There might have been several errors so just return 112 ; one error code for them all 113 cmp BYTE [di+DPT_ATA.bInitError], 0 114 je SHORT .ReturnWithErrorCodeInAH 115 mov ah, RET_HD_RESETFAIL 116 stc 117 118 .ReturnWithErrorCodeInAH: 119 pop si 120 pop es 121 ret 122 123 124 ;-------------------------------------------------------------------- 125 ; InitializeDeviceParameters 126 ; Parameters: 127 ; DS:DI: Ptr to DPT (in RAMVARS segment) 128 ; SS:BP: Ptr to IDEPACK 129 ; Returns: 130 ; AH: BIOS Error code 131 ; CF: Cleared if successful 132 ; Set if any error 133 ; Corrupts registers: 134 ; AL, BX, CX, DX 135 ;-------------------------------------------------------------------- 136 InitializeDeviceParameters: 137 ; No need to initialize CHS parameters if LBA mode enabled 138 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA ; Clear CF 139 jnz SHORT ReturnSuccessSinceInitializationNotNeeded 87 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 88 jnz SHORT .SkipInitializeDeviceParameters ; No need to initialize CHS parameters if LBA mode enabled 140 89 141 90 ; Initialize Logical Sectors per Track and Max Head number … … 145 94 mov al, COMMAND_INITIALIZE_DEVICE_PARAMETERS 146 95 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) 147 jmp Idepack_StoreNonExtParametersAndIssueCommandFromAL 148 149 150 ;-------------------------------------------------------------------- 151 ; SetWriteCache 152 ; Parameters: 153 ; DS:DI: Ptr to DPT (in RAMVARS segment) 154 ; Returns: 155 ; AH: BIOS Error code 156 ; CF: Cleared if successful 157 ; Set if any error 158 ; Corrupts registers: 159 ; AL, BX, CX, DX, SI 160 ;-------------------------------------------------------------------- 161 SetWriteCache: 96 call Idepack_StoreNonExtParametersAndIssueCommandFromAL 97 98 mov al, FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS 99 call .SetErrorFlagFromALwithErrorCodeInAH 100 .SkipInitializeDeviceParameters: 101 102 ;;; SetWriteCache 103 ; Enable or Disable Write Cache 162 104 call AccessDPT_GetPointerToDRVPARAMStoCSBX 163 105 mov bl, [cs:bx+DRVPARAMS.wFlags] 106 push bx ; Save .wFlags for later use in InitializeBlockMode 164 107 and bx, BYTE MASK_DRVPARAMS_WRITECACHE 165 jz SHORT ReturnSuccessSinceInitializationNotNeeded; DEFAULT_WRITE_CACHE108 jz SHORT .SkipSetWriteCache ; DEFAULT_WRITE_CACHE 166 109 mov si, [cs:bx+.rgbWriteCacheCommands] 167 jmp AH23h_SetControllerFeatures 168 169 .rgbWriteCacheCommands: 170 db 0 ; DEFAULT_WRITE_CACHE 171 db FEATURE_DISABLE_WRITE_CACHE ; DISABLE_WRITE_CACHE 172 db FEATURE_ENABLE_WRITE_CACHE ; ENABLE_WRITE_CACHE 173 174 175 %ifdef MODULE_ADVANCED_ATA 176 ;-------------------------------------------------------------------- 177 ; InitializePioMode 178 ; Parameters: 179 ; DS:DI: Ptr to DPT (in RAMVARS segment) 180 ; Returns: 181 ; AH: BIOS Error code 182 ; CF: Cleared if successful 183 ; Set if any error 184 ; Corrupts registers: 185 ; AL, BX, CX, DX 186 ;-------------------------------------------------------------------- 187 InitializePioMode: 188 mov dl, PIO_DEFAULT_MODE_DISABLE_IORDY 189 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_IORDY 190 jz SHORT .IordyNotSupported 191 192 ; Advanced PIO mode 3 and above 193 mov dl, [di+DPT_ADVANCED_ATA.bPioMode] 194 or dl, PIO_FLOW_CONTROL_MODE_xxx 195 196 .IordyNotSupported: 197 mov si, FEATURE_SET_TRANSFER_MODE 198 jmp AH23h_SetControllerFeatures 199 %endif 200 201 202 ;-------------------------------------------------------------------- 203 ; InitializeBlockMode 204 ; Parameters: 205 ; DS:DI: Ptr to DPT (in RAMVARS segment) 206 ; Returns: 207 ; AH: BIOS Error code 208 ; CF: Cleared if successful 209 ; Set if any error 210 ; Corrupts registers: 211 ; AL, BX, CX, DX 212 ;-------------------------------------------------------------------- 213 InitializeBlockMode: 214 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED ; Clear CF 110 call AH23h_SetControllerFeatures 111 112 mov al, FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE 113 call .SetErrorFlagFromALwithErrorCodeInAH 114 .SkipSetWriteCache: 115 116 ;;; RecalibrateDrive 117 ; Recalibrate drive by seeking to cylinder 0 118 call AH11h_RecalibrateDrive 119 120 mov al, FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE 121 call .SetErrorFlagFromALwithErrorCodeInAH 122 123 ;;; InitializeBlockMode 124 ; Initialize block mode transfers 125 pop ax ; Restore .wFlags saved in SetWriteCache 126 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED 215 127 jz SHORT .BlockModeNotSupportedOrDisabled 216 call AccessDPT_GetPointerToDRVPARAMStoCSBX 217 test BYTE [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_BLOCKMODE 128 test al, FLG_DRVPARAMS_BLOCKMODE 218 129 jz SHORT .BlockModeNotSupportedOrDisabled 219 130 … … 222 133 .TryNextBlockSize: 223 134 mov al, bl 224 call AH24h_SetBlockSize 135 call AH24h_SetBlockSize ; Stores block size to DPT 225 136 jnc SHORT .SupportedBlockSizeFound 226 shr bl, 1 ; Try next size 227 jmp SHORT .TryNextBlockSize 137 shr bl, 1 138 jnc SHORT .TryNextBlockSize 139 140 mov al, FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE 141 call .SetErrorFlagFromALwithErrorCodeInAH 142 .BlockModeNotSupportedOrDisabled: 228 143 .SupportedBlockSizeFound: 229 mov [di+DPT_ATA.bBlockSize], bl 230 .BlockModeNotSupportedOrDisabled: 231 ReturnSuccessSinceInitializationNotNeeded: 144 145 %ifdef MODULE_ADVANCED_ATA 146 ;;; InitializePioMode 147 ; Initialize fastest supported PIO mode 148 mov dl, PIO_DEFAULT_MODE_DISABLE_IORDY 149 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_IORDY 150 jz SHORT .IordyNotSupported 151 152 ; Advanced PIO mode 3 and above 153 mov dl, [di+DPT_ADVANCED_ATA.bPioMode] 154 or dl, PIO_FLOW_CONTROL_MODE_xxx 155 156 .IordyNotSupported: 157 mov si, FEATURE_SET_TRANSFER_MODE 158 call AH23h_SetControllerFeatures 159 160 mov al, FLG_INITERROR_FAILED_TO_SET_PIO_MODE 161 call .SetErrorFlagFromALwithErrorCodeInAH 162 %endif ; MODULE_ADVANCED_ATA 163 164 %ifdef MODULE_FEATURE_SETS 165 ;;; InitStandbyTimer 166 ; Initialize the standby timer (if supported) 167 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 168 jz .NoPowerManagementSupport 169 170 mov al, COMMAND_IDLE 171 mov dl, [cs:ROMVARS.bIdleTimeout] 172 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) 173 call Idepack_StoreNonExtParametersAndIssueCommandFromAL 174 175 mov al, FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER 176 call .SetErrorFlagFromALwithErrorCodeInAH 177 .NoPowerManagementSupport: 178 %endif ; MODULE_FEATURE_SETS 179 180 ; There might have been several errors so just return one error code for them all 181 mov ah, [di+DPT_ATA.bInitError] 182 test ah, ah ; Clears CF 183 jz SHORT .ReturnWithErrorCodeInAH 184 mov ah, RET_HD_RESETFAIL 185 stc 186 187 .ReturnWithErrorCodeInAH: 188 pop si 189 pop es 232 190 ret 233 191 234 192 235 193 ;-------------------------------------------------------------------- 236 ; SetErrorFlagFromALwithErrorCodeInAH194 ; .SetErrorFlagFromALwithErrorCodeInAH 237 195 ; Parameters: 238 196 ; AH: BIOS Error Code … … 245 203 ; Nothing 246 204 ;-------------------------------------------------------------------- 247 SetErrorFlagFromALwithErrorCodeInAH: 205 .IgnoreInvalidCommandError: 206 xor ah, ah ; Clears CF 207 208 .SetErrorFlagFromALwithErrorCodeInAH: 248 209 jnc SHORT .NoErrorFlagToSet 249 210 cmp ah, RET_HD_INVALID … … 252 213 or [di+DPT_ATA.bInitError], al 253 214 stc 254 ret255 .IgnoreInvalidCommandError:256 xor ah, ah257 215 .NoErrorFlagToSet: 258 216 ret 217 218 219 .rgbWriteCacheCommands: 220 db 0 ; DEFAULT_WRITE_CACHE 221 db FEATURE_DISABLE_WRITE_CACHE ; DISABLE_WRITE_CACHE 222 db FEATURE_ENABLE_WRITE_CACHE ; ENABLE_WRITE_CACHE 223 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm
r392 r399 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ; GNU General Public License for more details. 17 ; GNU General Public License for more details. 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 ; 19 ; 20 20 21 21 ; Section containing code … … 75 75 ;-------------------------------------------------------------------- 76 76 AdvAtaInit_InitializeControllerForDPTinDSDI: 77 push bp78 push si79 80 77 ; Call Controller Specific initialization function 81 78 mov ax, [di+DPT_ADVANCED_ATA.wControllerID] … … 83 80 jz SHORT .NoAdvancedController ; Return with CF cleared 84 81 82 push bp 83 push si 84 85 85 ; We only support Vision at the moment so no need to identify ID 86 86 call AdvAtaInit_LoadMasterDPTtoDSSIifSlaveInDSDI 87 87 call Vision_InitializeWithIDinAHandConfigInAL 88 88 89 .NoAdvancedController:90 89 pop si 91 90 pop bp 91 92 .NoAdvancedController: 92 93 ret 93 94 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r398 r399 181 181 %include "Interrupts.asm" ; For Interrupt initialization 182 182 %include "RamVars.asm" ; For RAMVARS initialization and access 183 %include "BootVars.asm" ; For initializing variable dused during init and boot183 %include "BootVars.asm" ; For initializing variables used during init and boot 184 184 %include "FloppyDrive.asm" ; Floppy Drive related functions 185 185 %include "CreateDPT.asm" ; For creating DPTs -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r397 r399 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 145 145 ; 5 3.5" ED on some BIOSes 3 1/2 2.88M 146 146 ; 6 FLOPPY_TYPE_35_ED 3 1/2 2.88M 147 ; >6 Unkn won, handled above147 ; >6 Unknown, handled above 148 148 ; 149 149 ;-------------------------------------------------------------------- … … 159 159 push ax ; "5 1/4" or "3 1/2" 160 160 161 xor bh, bh 161 162 mov al,FloppyTypes.rgbCapacityMultiplier 162 mov bh, 0 163 mul byte [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 163 mul BYTE [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 164 164 165 165 .PushAXAndOutput: … … 202 202 push dx ; Magnitude character 203 203 204 test di, di204 test di, di 205 205 jz SHORT BootMenuPrint_RefreshInformation.FormatRelay 206 206 -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm
r392 r399 2 2 ; Description : Functions for printing drive configuration 3 3 ; information on Boot Menu. 4 ; 4 ; 5 5 ; Included by BootMenuPrint.asm, this routine is to be inserted into 6 6 ; BootMenuPrint_HardDiskRefreshInformation. … … 8 8 9 9 ; 10 ; XTIDE Universal BIOS and Associated Tools 10 ; XTIDE Universal BIOS and Associated Tools 11 11 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 12 12 ; … … 15 15 ; the Free Software Foundation; either version 2 of the License, or 16 16 ; (at your option) any later version. 17 ; 17 ; 18 18 ; This program is distributed in the hope that it will be useful, 19 19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 20 20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 21 ; GNU General Public License for more details. 22 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 22 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 23 23 ; 24 24 25 25 ; Section containing code 26 26 SECTION .text … … 131 131 ;-------------------------------------------------------------------- 132 132 .PushResetStatus: 133 xor ax, ax134 %ifdef MODULE_SERIAL135 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE136 jnz SHORT .AlwaysSuccess137 133 mov al, [di+DPT_ATA.bInitError] 138 .AlwaysSuccess:139 %endif140 134 push ax 141 135 -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r395 r399 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 16 ; GNU General Public License for more details. 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 19 19 20 20 ; Section containing code … … 382 382 383 383 .StoreDriveLetter: 384 adc di, BYTE 0 ; Add 1if Floppy Drive384 adc di, BYTE 1 ; Add CF if Floppy Drive 385 385 xchg ax, cx 386 mov [es:di +1], al; AH = zero to clear function hotkey386 mov [es:di], al ; AH = zero to clear function hotkey 387 387 388 388 .StoreFunctionHotkeyFromAH: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm
r397 r399 4 4 5 5 ; 6 ; XTIDE Universal BIOS and Associated Tools 6 ; XTIDE Universal BIOS and Associated Tools 7 7 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 8 8 ; … … 11 11 ; the Free Software Foundation; either version 2 of the License, or 12 12 ; (at your option) any later version. 13 ; 13 ; 14 14 ; This program is distributed in the hope that it will be useful, 15 15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 17 ; GNU General Public License for more details. 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 19 ; 20 20 21 21 ; Section containing code 22 22 SECTION .text … … 45 45 pop ds 46 46 47 add si, BYTE ATA1.strModel ; DS:SI now points drive name 48 lea di, [bx+DRVDETECTINFO.szDrvName] 47 add si, BYTE ATA1.strModel ; DS:SI now points drive name (Clears CF) 48 lea di, [bx+DRVDETECTINFO.szDrvName] ; ES:DI now points to name destination 49 49 mov cx, MAX_HARD_DISK_NAME_LENGTH / 2 ; Max number of WORDs allowed 50 50 .CopyNextWord: … … 53 53 stosw 54 54 loop .CopyNextWord 55 x or ax, ax ; Zero AX and clear CF55 xchg cx, ax ; Zero AX (CF already cleared from the ADD above) 56 56 stosw ; Terminate with NULL 57 57 58 58 pop si 59 59 pop ds 60 60 61 61 ret 62 62 … … 74 74 ;-------------------------------------------------------------------- 75 75 DriveDetectInfo_ConvertDPTtoBX: 76 mov ax, di 77 sub ax, BYTE RAMVARS_size ; subtract off base of DPTs 76 lea ax, [di-RAMVARS_size] ; subtract off base of DPTs 78 77 mov bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER ; DRVDETECTINFO are a whole number multiple of DPT size 79 mul bl 78 mul bl 80 79 add ax, BOOTVARS.rgDrvDetectInfo ; add base of DRVDETECTINFO 81 xchg ax, bx82 ret 80 xchg bx, ax 81 ret
Note:
See TracChangeset
for help on using the changeset viewer.