Changeset 158 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


Ignore:
Timestamp:
May 2, 2011, 9:41:51 AM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Optimized few bytes.
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
3 edited

Legend:

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

    r150 r158  
    3434AccessDPT_GetDeviceControlByteToAL:
    3535    xor     al, al
    36     test    BYTE [di+DPT.wFlags], FLG_DPT_ENABLE_IRQ
     36    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ
    3737    jnz     SHORT .EnableDeviceIrq
    3838    or      al, FLG_DEVCONTROL_nIEN ; Disable IRQ
     
    5252ALIGN JUMP_ALIGN
    5353AccessDPT_GetAddressingModeForWordLookToBX:
    54     mov     bl, [di+DPT.wFlags]
    55     and     bx, BYTE MASK_DPT_ADDRESSING_MODE
     54    mov     bl, [di+DPT.bFlagsLow]
     55    and     bx, BYTE MASKL_DPT_ADDRESSING_MODE
    5656    eSHR_IM bx, ADDRESSING_MODE_FIELD_POSITION-1
    5757    ret
     
    7272AccessDPT_GetLCHSfromPCHS:
    7373    xchg    ax, cx
    74     mov     cl, [di+DPT.wFlags]
    75     and     cl, MASK_DPT_CHS_SHIFT_COUNT    ; Load shift count
     74    mov     cl, [di+DPT.bFlagsLow]
     75    and     cl, MASKL_DPT_CHS_SHIFT_COUNT   ; Load shift count
    7676    mov     bx, [di+DPT.wPchsCylinders]     ; Load P-CHS cylinders
    7777    shr     bx, cl                          ; Shift to L-CHS cylinders
     
    115115    eMOVZX  bx, [di+DPT.bIdevarsOffset]         ; CS:BX points to IDEVARS
    116116    add     bx, BYTE IDEVARS.drvParamsMaster    ; CS:BX points to Master Drive DRVPARAMS
    117     test    BYTE [di+DPT.wFlags], FLG_DPT_SLAVE
     117    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_SLAVE
    118118    jz      SHORT .ReturnPointerToDRVPARAMS
    119119    add     bx, BYTE DRVPARAMS_size             ; CS:BX points to Slave Drive DRVPARAMS
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r150 r158  
    6060    cmp     [cs:bp+IDEVARS.bIRQ], ah        ; Interrupts enabled?
    6161    jz      SHORT .StoreFlags               ;  If not, do not set interrupt flag
    62     or      al, FLG_DPT_ENABLE_IRQ
     62    or      al, FLGL_DPT_ENABLE_IRQ
    6363.StoreFlags:
    6464    mov     [di+DPT.wFlags], ax
     
    172172    cmp     BYTE [es:si+ATA1.bBlckSize], 1  ; Max block size in sectors
    173173    jbe     SHORT .BlockModeTransfersNotSupported
    174     or      WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED
     174    or      BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
    175175.BlockModeTransfersNotSupported:
    176176    ; Fall to .StoreDeviceSpecificParameters
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r152 r158  
    9898ALIGN JUMP_ALIGN
    9999IterateToSlaveAtPortCallback:
    100     test    BYTE [di+DPT.wFlags], FLG_DPT_SLAVE ; Clears CF
     100    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_SLAVE ; Clears CF
    101101    jnz     SHORT CompareBasePortAddress
    102102    ret     ; Wrong DPT
     
    104104ALIGN JUMP_ALIGN
    105105IterateToMasterAtPortCallback:
    106     test    BYTE [di+DPT.wFlags], FLG_DPT_SLAVE
     106    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_SLAVE
    107107    jnz     SHORT ReturnWrongDPT                ; Return if slave drive
    108108
     
    146146ALIGN JUMP_ALIGN
    147147IterateToDptWithInterruptInServiceFlagSet:
    148     test    WORD [di+DPT.wFlags], FLG_DPT_INTERRUPT_IN_SERVICE
     148    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_INTERRUPT_IN_SERVICE
    149149    jz      SHORT ReturnWrongDPT
    150150    stc                                     ; Set CF since wanted DPT
Note: See TracChangeset for help on using the changeset viewer.