Ignore:
Timestamp:
Mar 4, 2012, 1:35:10 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r274 r294  
    127127;--------------------------------------------------------------------
    128128ALIGN JUMP_ALIGN
    129 FloppyDrive_GetCountToAX:       
     129FloppyDrive_GetCountToAX:
    130130%ifdef MODULE_SERIAL_FLOPPY
    131131    call    RamVars_UnpackFlopCntAndFirstToAL
    132132    js      .UseBIOSorBDA               ; We didn't add in any drives, counts here are not valid
    133        
    134     adc     al,1                        ; adds in the drive count bit, and adds 1 for count vs. 0-index, 
     133
     134    adc     al,1                        ; adds in the drive count bit, and adds 1 for count vs. 0-index,
    135135    jmp     .FinishCalc                 ; need to clear AH on the way out, and add in minimum drive numbers
    136136
    137 .UseBIOSorBDA: 
     137.UseBIOSorBDA:
    138138%endif
    139139    call    FloppyDrive_GetCountFromBIOS_or_BDA
    140140
    141 .FinishCalc:   
     141.FinishCalc:
    142142    mov     ah, [cs:ROMVARS.bMinFddCnt]
    143143    MAX_U   al, ah
    144144    cbw
    145        
    146     ret
    147 
    148 ALIGN JUMP_ALIGN       
     145
     146    ret
     147
     148ALIGN JUMP_ALIGN
    149149FloppyDrive_GetCountFromBIOS_or_BDA:
    150150    push    es
     
    152152;--------------------------------------------------------------------
    153153; Reads Floppy Drive Count from BIOS.
    154 ; Does not work on most XT systems. Call FloppyDrive_GetCountFromBDA
     154; Does not work on most XT systems. Call .GetCountFromBDA
    155155; if this function fails.
    156156;
    157 ; GetCountFromBIOS
     157; .GetCountFromBIOS
    158158;   Parameters:
    159159;       Nothing
    160160;   Returns:
    161161;       AL:     Number of Floppy Drives
    162 ;       CF:     Cleared if successfull
     162;       CF:     Cleared if successful
    163163;               Set if BIOS function not supported
    164164;   Corrupts registers:
     
    169169.GetCountFromBIOS:
    170170    push    di
    171     push    es
    172171    push    bx
    173172    push    cx
     
    182181    pop     cx
    183182    pop     bx
    184     pop     es
    185183    pop     di
    186184%endif
     
    188186;--------------------------------------------------------------------
    189187; Reads Floppy Drive Count (0...4) from BIOS Data Area.
    190 ; This function should be used only if FloppyDrive_GetCountFromBIOS fails.
    191 ;
    192 ; GetCountFromBDA
    193 ;   Parameters:
    194 ;       Nothing
    195 ;   Returns:
    196 ;       CL:     Number of Floppy Drives
    197 ;   Corrupts registers:
    198 ;       CH, ES
     188; This function should be used only if .GetCountFromBIOS fails.
     189;
     190; .GetCountFromBDA
     191;   Parameters:
     192;       Nothing
     193;   Returns:
     194;       AL:     Number of Floppy Drives
     195;   Corrupts registers:
     196;       AH, ES
    199197;--------------------------------------------------------------------
    200198%ifndef USE_AT
     
    203201    LOAD_BDA_SEGMENT_TO es, ax
    204202    mov     al, [es:BDA.wEquipment]         ; Load Equipment WORD low byte
    205     mov     ah, al                          ; Copy it to CH
     203    mov     ah, al                          ; Copy it to AH
    206204    and     ax, 0C001h                      ; Leave bits 15..14 and 0
    207205    eROL_IM ah, 2                           ; EW low byte bits 7..6 to 1..0
    208     add     al, ah                          ; CL = Floppy Drive count
     206    add     al, ah                          ; AL = Floppy Drive count
    209207%endif
    210208
    211209    pop     es
    212210    ret
    213        
Note: See TracChangeset for help on using the changeset viewer.