Ignore:
Timestamp:
Nov 17, 2011, 2:59:13 AM (12 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).

File:
1 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.
Note: See TracChangeset for help on using the changeset viewer.