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/DetectDrives.asm

    r269 r294  
    2626    mov     cx, g_szDetectMaster
    2727    mov     bh, MASK_DRVNHEAD_SET                               ; Select Master drive
    28     call    StartDetectionWithDriveSelectByteInBHandStringInAX  ; Detect and create DPT + BOOTNFO
     28    call    StartDetectionWithDriveSelectByteInBHandStringInCX  ; Detect and create DPT + BOOTNFO
    2929
    3030    mov     cx, g_szDetectSlave
    3131    mov     bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV
    32     call    StartDetectionWithDriveSelectByteInBHandStringInAX
     32    call    StartDetectionWithDriveSelectByteInBHandStringInCX
    3333
    3434    pop     cx
     
    7272    mov     al, [es:BDA.bHDCount]
    7373    add     cl, al                      ; Add our drives to the system count
    74     mov     [es:BDA.bHDCount], cl       
    75     or      al, 80h                     ; Or in hard disk flag     
    76     mov     [RAMVARS.bFirstDrv], al     ; Store first drive number     
    77 
    78 .AddFloppies:       
    79 %ifdef MODULE_SERIAL_FLOPPY     
     74    mov     [es:BDA.bHDCount], cl
     75    or      al, 80h                     ; Or in hard disk flag
     76    mov     [RAMVARS.bFirstDrv], al     ; Store first drive number
     77
     78.AddFloppies:
     79%ifdef MODULE_SERIAL_FLOPPY
    8080;----------------------------------------------------------------------
    8181;
     
    8484    dec     ch
    8585    mov     al, ch
    86     js      .NoFloppies                     ; if no drives are present, we store 0ffh       
     86    js      .NoFloppies                     ; if no drives are present, we store 0ffh
    8787
    8888    call    FloppyDrive_GetCountFromBIOS_or_BDA
     
    9292    add     al, ch                          ; Add our drives to existing drive count
    9393    cmp     al, 3                           ; For BDA, max out at 4 drives (ours is zero based)
    94     jl      .MaxBDAFloppiesExceeded
    95     mov     al, 3                           
     94    jb      .MaxBDAFloppiesExceeded
     95    mov     al, 3
    9696.MaxBDAFloppiesExceeded:
    9797    eROR_IM al, 2                           ; move to bits 6-7
    9898    inc     ax                              ; low order bit, indicating floppy drive exists
    9999
    100     mov     ah, [es:BDA.wEquipment]         ; Load Equipment WORD low byte 
     100    mov     ah, [es:BDA.wEquipment]         ; Load Equipment WORD low byte
    101101    and     ah, 03eh                        ; Mask off drive number and drives present bit
    102102    or      al, ah                          ; Or in new values
     
    111111    shr     ch, 1                           ; number of drives, 1 or 2 only, to CF flag (clear=1, set=2)
    112112    rcl     al, 1                           ; starting drive number in upper 7 bits, number of drives in low bit
    113 .NoFloppies:   
     113.NoFloppies:
    114114    mov     [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], al
    115115%endif
    116        
     116
    117117    ret
    118118
    119 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
     119%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    120120    %if FLG_ROMVARS_SERIAL_SCANDETECT != 8
    121121        %error "DetectDrives is currently coded to assume that FLG_ROMVARS_SERIAL_SCANDETECT is the same bit as the ALT key code in the BDA.  Changes in the code will be needed if these values are no longer the same."
     
    125125
    126126;--------------------------------------------------------------------
    127 ; StartDetectionWithDriveSelectByteInBHandStringInAX
     127; StartDetectionWithDriveSelectByteInBHandStringInCX
    128128;   Parameters:
    129129;       BH:     Drive Select byte for Drive and Head Register
     
    137137;       AX, BX, CX, DX, SI, DI
    138138;--------------------------------------------------------------------
    139 StartDetectionWithDriveSelectByteInBHandStringInAX:
    140     call    DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
     139StartDetectionWithDriveSelectByteInBHandStringInCX:
     140    call    DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
    141141    ; Fall to .ReadAtaInfoFromHardDisk
    142142
Note: See TracChangeset for help on using the changeset viewer.