Changeset 228 in xtideuniversalbios


Ignore:
Timestamp:
Jan 29, 2012, 1:49:15 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Drive size can now be limited for EBIOS functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm

    r227 r228  
    2222;--------------------------------------------------------------------
    2323AH48h_HandlerForGetExtendedDriveParameters:
     24    call    AccessDPT_GetPointerToDRVPARAMStoCSBX
     25    push    bx
    2426    call    AccessDPT_GetLbaSectorCountToBXDXAX
     27    pop     di          ; CS:DI now points to DRVPARAMS
    2528
    2629    ; Point DS:SI to Extended Drive Information Table to fill
     
    4245    mov     WORD [si+EDRIVE_INFO.wFlags], FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
    4346
    44     mov     [di+EDRIVE_INFO.qwTotalSectors], ax
     47    ; Limit LBA if necessary
     48    test    BYTE [cs:di+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERLBA
     49    jz      SHORT .StoreTotalSectorsFromBXDXAX
     50    test    bx, bx
     51    jnz     SHORT .LimitTotalSectors
     52    cmp     dx, [cs:di+DRVPARAMS.dwMaximumLBA+2]
     53    jb      SHORT .StoreTotalSectorsFromBXDXAX      ; Real size less than max
     54    ja      SHORT .LimitTotalSectors
     55    cmp     ax, [cs:di+DRVPARAMS.dwMaximumLBA]
     56    jbe     SHORT .StoreTotalSectorsFromBXDXAX      ; Real size less than max
     57
     58.LimitTotalSectors:
     59    xor     bx, bx
     60    mov     ax, [cs:di+DRVPARAMS.dwMaximumLBA]
     61    mov     dx, [cs:di+DRVPARAMS.dwMaximumLBA+2]
     62
     63.StoreTotalSectorsFromBXDXAX:
     64    mov     [si+EDRIVE_INFO.qwTotalSectors], ax
    4565    xor     ax, ax                                  ; Return with success
    46     mov     [di+EDRIVE_INFO.qwTotalSectors+2], dx
    47     mov     [di+EDRIVE_INFO.qwTotalSectors+4], bx
    48     mov     [di+EDRIVE_INFO.qwTotalSectors+6], ax
    49     mov     WORD [di+EDRIVE_INFO.wSectorSize], 512
     66    mov     [si+EDRIVE_INFO.qwTotalSectors+2], dx
     67    mov     [si+EDRIVE_INFO.qwTotalSectors+4], bx
     68    mov     [si+EDRIVE_INFO.qwTotalSectors+6], ax
     69    mov     WORD [si+EDRIVE_INFO.wSectorSize], 512
    5070
    5171.ReturnWithError:
Note: See TracChangeset for help on using the changeset viewer.