Ignore:
Timestamp:
Feb 24, 2012, 10:28:31 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

More optimizations. Merged RamVars_IsFunction/DriveHandledByThisBIOS in with FindDPT_ForDriveNumber, since they are often used together, making a returned NULL DI pointer indicate a foreign drive in many places. Revamped the iteration done in the handlers for int13/0dh and int13h/0h. Added serial specific print string during drive detection.

File:
1 edited

Legend:

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

    r258 r262  
    200200    call    Device_FinalizeDPT
    201201
     202;----------------------------------------------------------------------
     203; Update drive counts (hard and floppy)
     204;----------------------------------------------------------------------
     205       
    202206%ifdef MODULE_SERIAL_FLOPPY
    203207;
     
    223227%endif
    224228
    225     ; Fall to .StoreDriveNumberAndUpdateDriveCount
    226 
    227 ;--------------------------------------------------------------------
    228 ; .StoreDriveNumberAndUpdateDriveCount
    229 ;   Parameters:
    230 ;       DS:DI:  Ptr to Disk Parameter Table
    231 ;       ES:SI:  Ptr to 512-byte ATA information read from the drive
    232 ;       CS:BP:  Ptr to IDEVARS for the controller
    233 ;       ES:     BDA Segment
    234 ;   Returns:
    235 ;       DL:     Drive number for new drive
    236 ;       CF:     Always cleared
    237 ;   Corrupts registers:
    238 ;       Nothing
    239 ;--------------------------------------------------------------------
    240 .StoreDriveNumberAndUpdateDriveCount:
    241     mov     dl, [es:BDA.bHDCount]
    242     or      dl, 80h                     ; Set bit 7 since hard disk
    243 
    244229    inc     BYTE [RAMVARS.bDrvCnt]      ; Increment drive count to RAMVARS
    245     inc     BYTE [es:BDA.bHDCount]      ; Increment drive count to BDA
    246 
    247     cmp     BYTE [RAMVARS.bFirstDrv], 0 ; First drive set?
    248     ja      SHORT .AllDone              ;  If so, return
    249     mov     [RAMVARS.bFirstDrv], dl     ; Store first drive number
    250 
    251 .AllDone:
     230       
     231.AllDone:               
    252232    clc
    253233    ret
Note: See TracChangeset for help on using the changeset viewer.