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


Ignore:
Timestamp:
Nov 17, 2011, 2:59:13 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimizations in AccessDPT.asm, transfer one routine to a macro (retaining some encapsulation), and transfer the unique part of another routine to the one place it was being called (which also makes what it was doing more transparent).

Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
2 edited

Legend:

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

    r191 r193  
    4040    ret
    4141
    42 
    43 ;--------------------------------------------------------------------
    44 ; AccessDPT_GetAddressingModeToAXZF
    45 ;   Parameters:
    46 ;       DS:DI:  Ptr to Disk Parameter Table
    47 ;   Returns:
    48 ;       AX:     Addressing Mode (L-CHS, P-CHS, LBA28, LBA48)
    49 ;       ZF:     Set if AX=0
    50 ;   Corrupts registers:
    51 ;       Nothing
    52 ;--------------------------------------------------------------------
    53 ALIGN JUMP_ALIGN
    54 AccessDPT_GetAddressingModeToAXZF:
    55     mov     al, [di+DPT.bFlagsLow]
    56     and     ax, BYTE MASKL_DPT_ADDRESSING_MODE
    57     eSHR_IM ax, ADDRESSING_MODE_FIELD_POSITION
    58     ret
    59 
    60 
     42       
    6143;--------------------------------------------------------------------
    6244; AccessDPT_GetLCHS
     
    121103    ret
    122104
    123 
    124 ;--------------------------------------------------------------------
    125 ; AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive
    126 ;   Parameters:
    127 ;       AX:     Bitmask to test DRVPARAMS.wFlags
    128 ;       DS:DI:  Ptr to Disk Parameter Table
    129 ;   Returns:
    130 ;       ZF:     Set if tested bit was zero
    131 ;               Cleared if tested bit was non-zero
    132 ;       CF:     0
    133 ;   Corrupts registers:
    134 ;       BX
    135 ;--------------------------------------------------------------------
    136 ALIGN JUMP_ALIGN
    137 AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive:
    138     call    AccessDPT_GetPointerToDRVPARAMStoCSBX
    139     test    [cs:bx+DRVPARAMS.wFlags], ax
    140     ret
    141 
     105       
    142106;--------------------------------------------------------------------
    143107; Returns pointer to DRVPARAMS for master or slave drive.
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r181 r193  
    8686.StoreAddressing:
    8787    ; Check if CHS defined in ROMVARS
    88     mov     al, FLG_DRVPARAMS_USERCHS   ; User specified CHS?
    89     call    AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive
     88    call    AccessDPT_GetPointerToDRVPARAMStoCSBX
     89    test    byte [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS    ; User specified CHS?
    9090    jnz     SHORT .StoreUserDefinedCHSaddressing
    9191
Note: See TracChangeset for help on using the changeset viewer.