Changeset 591 in xtideuniversalbios


Ignore:
Timestamp:
Jun 28, 2016, 11:55:43 PM (8 years ago)
Author:
Krister Nordvall
Message:

Changes:

  • Added a small optimization to DrvDetectInfo.asm. This works but is not as optimal as it should be due to a problem with NASM.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm

    r526 r591  
    4646
    4747    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name (Clears CF)
     48%if DRVDETECTINFO.szDrvName = 0
     49    mov     di, bx
     50%else
    4851    lea     di, [bx+DRVDETECTINFO.szDrvName]    ; ES:DI now points to name destination
     52%endif
    4953    mov     cx, MAX_HARD_DISK_NAME_LENGTH / 2   ; Max number of WORDs allowed
    5054.CopyNextWord:
     
    7478;--------------------------------------------------------------------
    7579DriveDetectInfo_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
    7691    lea     ax, [di-RAMVARS_size]                   ; subtract off base of DPTs
    7792    mov     bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER   ; DRVDETECTINFO are a whole number multiple of DPT size
    7893    mul     bl
    7994    add     ax, BOOTVARS.rgDrvDetectInfo            ; add base of DRVDETECTINFO
     95%endif
    8096    xchg    bx, ax
    8197    ret
Note: See TracChangeset for help on using the changeset viewer.