Changeset 580 in xtideuniversalbios for trunk/Assembly_Library/Src/Util


Ignore:
Timestamp:
Feb 19, 2015, 1:38:02 PM (10 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • XTIDECFG: Fixed a bug from r459 where the menu option for selection of default boot drive would be missing if the BIOS had been built without MODULE_HOTKEYS. The menu option is now visible if either or both of MODULE_HOTKEYS and MODULE_BOOT_MENU is available.
  • BIOS: Disabled ATA-ID validation by adding a new define (NO_ATAID_VALIDATION) and making it the default for all builds since at least two WD Caviar drive models are incompatible with it.
  • Fixed the "No Fixed Disk Present in FDISK"-bug introduced in r551 which means the Tiny build now works without including MODULE_DRIVEXLATE.
  • Fixed a bug from r528 where pressing hotkey F6 would not initiate detection of serial drives.
  • Fixed a bug from r186 in DisplayFormatCompressed.asm where the boot menu would print the IRQ in hexadecimal format when it should be in decimal format.
  • Optimizations and fixes.
Location:
trunk/Assembly_Library/Src/Util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Util/Memory.asm

    r526 r580  
    159159;       CX
    160160;--------------------------------------------------------------------
    161 %ifndef EXCLUDE_FROM_XTIDECFG
     161%ifndef EXCLUDE_FROM_XTIDECFG OR NO_ATAID_VALIDATION
    162162ALIGN JUMP_ALIGN
    163163Memory_SumCXbytesFromESSItoAL:
  • trunk/Assembly_Library/Src/Util/Size.asm

    r567 r580  
    5757.MagnitudeConversionLoop:
    5858    ePUSH_T di, .MagnitudeConversionLoop; DI corrupted only on 8086/8088 build
     59%ifdef USE_186
    5960    test    bx, bx                      ; Bits 32...47 in use?
    6061    jnz     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
    6162    test    dx, dx                      ; Bits 16...31 in use?
    6263    jnz     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
     64%else ; 808x
     65    mov     di, bx
     66    or      di, dx
     67    jnz     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
     68%endif
    6369    cmp     ax, 10000                   ; 5 digits needed?
    6470    jae     SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX
     
    6874    ; Convert remainder to tenths
    6975    xchg    bx, ax                      ; Store AX
    70     mov     ax, 5
     76    mov     al, 5                       ; AH = 0
    7177    mul     cx                          ; DX:AX = remainder * (10 / 2)
    7278%ifdef USE_186
     
    8995    ret
    9096.rgbMagnitudeToChar:    db  " kMGTP"
    91 %endif
    9297
    9398;--------------------------------------------------------------------
     
    95100;   Parameters:
    96101;       BX:DX:AX:   Size
    97 ;       CX:         Magnitude in BYTE_MULTIPLES
     102;       CX:         Magnitude in BYTE_MULTIPLES (must be 254 or less)
    98103;   Returns:
    99104;       BX:DX:AX:   Size in magnitude
     
    105110ALIGN UTIL_SIZE_JUMP_ALIGN
    106111Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX:
     112    inc     cx                      ; Increment magnitude
     113    mov     si, 1023
     114    and     si, ax                  ; Remainder now in SI
     115    ; Fall to Size_DivideSizeInBXDXAXby1024
     116%endif ; INCLUDE_MENU_LIBRARY
     117
     118;--------------------------------------------------------------------
     119; Size_DivideSizeInBXDXAXby1024
     120;   Parameters:
     121;       BX:DX:AX:   Size
     122;       CX:         Must be 255 or less
     123;   Returns:
     124;       BX:DX:AX:   Size divided by 1024
     125;   Corrupts registers:
     126;       Nothing
     127;--------------------------------------------------------------------
     128ALIGN UTIL_SIZE_JUMP_ALIGN
     129Size_DivideSizeInBXDXAXby1024:
     130%ifdef USE_386
     131    shrd    ax, dx, 10
     132    shrd    dx, bx, 10
     133    shr     bx, 10
     134%else
    107135    push    cx
    108     xor     si, si                  ; Zero remainder
    109     mov     cl, 10                  ; Divide by 1024
     136    mov     cl, 10
    110137ALIGN UTIL_SIZE_JUMP_ALIGN
    111138.ShiftLoop:
    112139    call    Size_DivideBXDXAXbyTwo
    113     rcr     si, 1                   ; Update remainder
    114140    loop    .ShiftLoop
    115 %ifdef USE_186
    116     shr     si, 6                   ; Remainder to SI beginning
    117 %else
    118     mov     cl, 6
    119     shr     si, cl
     141    pop     cx
    120142%endif
    121     pop     cx
    122     inc     cx                      ; Increment magnitude
    123143    ret
    124144
     
    134154;       Nothing
    135155;--------------------------------------------------------------------
     156%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     157    %ifdef USE_386
     158        %define EXCLUDE
     159    %endif
     160    %ifdef MODULE_BOOT_MENU
     161        %undef EXCLUDE
     162    %endif
     163%endif
     164
     165%ifndef EXCLUDE
    136166ALIGN UTIL_SIZE_JUMP_ALIGN
    137167Size_ConvertSectorCountInBXDXAXtoKiB:   ; unused entrypoint ok
     
    141171    rcr     ax, 1                   ; ...kiB
    142172    ret
     173%endif
     174%undef EXCLUDE
Note: See TracChangeset for help on using the changeset viewer.