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


Ignore:
Timestamp:
May 8, 2011, 8:02:52 PM (14 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Minor size optimizations.
  • Tried to minimize the time spent with interrupts disabled in IdeIrq.asm and Int13h.asm
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
2 edited

Legend:

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

    r158 r161  
    7171ALIGN JUMP_ALIGN
    7272AccessDPT_GetLCHSfromPCHS:
    73     xchg    ax, cx
    74     mov     cl, [di+DPT.bFlagsLow]
    75     and     cl, MASKL_DPT_CHS_SHIFT_COUNT   ; Load shift count
     73    mov     al, [di+DPT.bFlagsLow]
     74    and     al, MASKL_DPT_CHS_SHIFT_COUNT   ; Load shift count
     75    xchg    cx, ax
    7676    mov     bx, [di+DPT.wPchsCylinders]     ; Load P-CHS cylinders
    7777    shr     bx, cl                          ; Shift to L-CHS cylinders
    7878    xchg    cx, ax
    79     eMOVZX  dx, BYTE [di+DPT.bLchsHeads]    ; Load L-CHS heads
    8079    eMOVZX  ax, BYTE [di+DPT.bPchsSectors]  ; Load Sectors per track
     80    cwd
     81    mov     dl, [di+DPT.bLchsHeads]         ; Load L-CHS heads
    8182    ret
    8283
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r158 r161  
    3939FindDPT_ForDriveNumber:
    4040    push    dx
    41     push    ax
     41    xchg    di, ax  ; Save the contents of AX in DI
    4242
    4343    mov     al, LARGEST_DPT_SIZE
     
    4545    mul     dl
    4646    add     ax, BYTE RAMVARS_size
    47     xchg    di, ax
    4847
    49     pop     ax
     48    xchg    di, ax  ; Restore AX and put result in DI
    5049    pop     dx
    5150    ret
     
    119118
    120119;--------------------------------------------------------------------
    121 ; FindDPT_ToDSDIforInterruptInService
    122 ;   Parameters:
    123 ;       DS:     RAMVARS segment
    124 ;   Returns:
    125 ;       DS:DI:  Ptr to DPT
    126 ;       CF:     Set if wanted DPT found
    127 ;               Cleared if DPT not found
    128 ;   Corrupts registers:
    129 ;       SI
    130 ;--------------------------------------------------------------------
    131 ALIGN JUMP_ALIGN
    132 FindDPT_ToDSDIforInterruptInService:
    133     mov     si, IterateToDptWithInterruptInServiceFlagSet
    134     jmp     SHORT IterateAllDPTs
    135 
    136 ;--------------------------------------------------------------------
    137120; IterateToDptWithInterruptInServiceFlagSet
    138121;   Parameters:
     
    153136    clc                                     ; Clear CF since wrong DPT
    154137    ret
     138
     139
     140;--------------------------------------------------------------------
     141; FindDPT_ToDSDIforInterruptInService
     142;   Parameters:
     143;       DS:     RAMVARS segment
     144;   Returns:
     145;       DS:DI:  Ptr to DPT
     146;       CF:     Set if wanted DPT found
     147;               Cleared if DPT not found
     148;   Corrupts registers:
     149;       SI
     150;--------------------------------------------------------------------
     151ALIGN JUMP_ALIGN
     152FindDPT_ToDSDIforInterruptInService:
     153    mov     si, IterateToDptWithInterruptInServiceFlagSet
     154    ; Fall to IterateAllDPTs
    155155
    156156
Note: See TracChangeset for help on using the changeset viewer.