Changeset 399 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Apr 19, 2012, 10:39:44 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.