Changeset 591 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Jun 28, 2016, 11:55:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm
r526 r591 46 46 47 47 add si, BYTE ATA1.strModel ; DS:SI now points drive name (Clears CF) 48 %if DRVDETECTINFO.szDrvName = 0 49 mov di, bx 50 %else 48 51 lea di, [bx+DRVDETECTINFO.szDrvName] ; ES:DI now points to name destination 52 %endif 49 53 mov cx, MAX_HARD_DISK_NAME_LENGTH / 2 ; Max number of WORDs allowed 50 54 .CopyNextWord: … … 74 78 ;-------------------------------------------------------------------- 75 79 DriveDetectInfo_ConvertDPTtoBX: 80 %if DPT_DRVDETECTINFO_SIZE_MULTIPLIER = 2 81 %if BOOTVARS.rgDrvDetectInfo & 1 ; Should never be odd but better safe than sorry 82 lea ax, [di-RAMVARS_size] 83 eSHL_IM ax, 1 84 add ax, BOOTVARS.rgDrvDetectInfo 85 %else 86 lea ax, [di-RAMVARS_size+(BOOTVARS.rgDrvDetectInfo/2)] 87 ; eSHL_IM ax, 1 ; *FIXME* For some reason this will cause NASM to crap itself. 88 shl ax, 1 ; So this will have to suffice for now. 89 %endif 90 %else 76 91 lea ax, [di-RAMVARS_size] ; subtract off base of DPTs 77 92 mov bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER ; DRVDETECTINFO are a whole number multiple of DPT size 78 93 mul bl 79 94 add ax, BOOTVARS.rgDrvDetectInfo ; add base of DRVDETECTINFO 95 %endif 80 96 xchg bx, ax 81 97 ret
Note:
See TracChangeset
for help on using the changeset viewer.