Ignore:
Timestamp:
Feb 23, 2012, 7:14:06 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

For function int13/0h, restored the code to only reset the floppy drives if a floppy drive was passed in for reset. Other minor optimizations. Better create new floppy support in Serial Server.

File:
1 edited

Legend:

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

    r258 r259  
    2323    add     al, [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt]
    2424%endif
    25     xchg    ax, dx     
    26     ; Fall to FindDPT_ForDriveNumber
    27 
     25    xchg    ax, dx
     26    ; fall-through to FindDPT_ForDriveNumber
    2827
    2928;--------------------------------------------------------------------
     
    6665    xchg    di, ax                      ; Restore AX and put result in DI
    6766    pop     dx
    68     ret
     67       
     68    ret
     69
     70;--------------------------------------------------------------------
     71; Consolidator for checking the result from RamVars_IsDriveHandledByThisBIOS
     72; and then if it is our drive, getting the DPT with FindDPT_ForDriveNumber
     73;
     74; RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber
     75;   Parameters:
     76;       DL:     Drive number
     77;       DS:     RAMVARS segment
     78;   Returns:
     79;       DS:DI:  Ptr to DPT, if it is our drive
     80;       CF:     Set if not our drive, clear if it is our drive
     81;   Corrupts registers:
     82;       Nothing
     83;--------------------------------------------------------------------
     84ALIGN JUMP_ALIGN
     85RamVars_IsDriveHandledByThisBIOS_And_FindDPT_ForDriveNumber:
     86    call    RamVars_IsDriveHandledByThisBIOS
     87    jnc     FindDPT_ForDriveNumber
     88    ret
     89
    6990
    7091;--------------------------------------------------------------------
     
    212233    push    cx
    213234
    214     mov     cl, [RAMVARS.bDrvCnt]       
    215     mov     ch, 0
    216        
    217235    mov     di, RAMVARS_size            ; Point DS:DI to first DPT
    218236       
    219     jcxz    .NotFound                   ; Return if no drives
     237    mov     cl, [RAMVARS.bDrvCnt]
     238    xor     ch, ch                      ; Clears CF 
     239       
     240    jcxz    .AllDptsIterated            ; Return if no drives, CF will be clear from xor above
    220241       
    221242ALIGN JUMP_ALIGN
     
    223244    call    si                          ; Is wanted DPT?
    224245    jc      SHORT .AllDptsIterated      ;  If so, return
    225     add     di, BYTE LARGEST_DPT_SIZE   ; Point to next DPT
     246    add     di, BYTE LARGEST_DPT_SIZE   ; Point to next DPT, clears CF
    226247    loop    .LoopWhileDPTsLeft
    227        
    228 .NotFound:     
    229     clc                                 ; Clear CF since DPT not found
     248   
     249    ; fall-through: DPT was not found, CF is already clear from ADD di inside the loop
    230250       
    231251ALIGN JUMP_ALIGN
     
    233253    pop     cx
    234254    ret
     255
Note: See TracChangeset for help on using the changeset viewer.