Ignore:
Timestamp:
Aug 6, 2010, 7:11:04 AM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Correct number of drives is now returned from AH=08h even when it is redirected to foreign BIOS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm

    r28 r32  
    22; Project name  :   IDE BIOS
    33; Created date  :   27.9.2007
    4 ; Last update   :   12.4.2010
     4; Last update   :   3.8.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Int 13h function AH=8h, Read Disk Drive Parameters.
     
    3232ALIGN JUMP_ALIGN
    3333AH8h_HandlerForReadDiskDriveParameters:
     34    call    RamVars_IsDriveHandledByThisBIOS
     35    jnc     SHORT .GetDriveParametersForForeignHardDiskInDL
     36
    3437    push    bx
    3538    call    AH8h_GetDriveParameters
    3639    pop     bx
     40    jmp     Int13h_ReturnWithoutSwappingDrives
     41
     42ALIGN JUMP_ALIGN
     43.GetDriveParametersForForeignHardDiskInDL:
     44    call    Int13h_CallPreviousInt13hHandler
     45    call    RamVars_GetCountOfKnownDrivesToDL
    3746    jmp     Int13h_ReturnWithoutSwappingDrives
    3847
     
    97106;       BX:     Number of L-CHS cylinders available (1...1024)
    98107;       DX:     Number of L-CHS heads (1...256)
     108;       DS:     RAMVARS segment
    99109;   Returns:
    100110;       CH:     Maximum cylinder number, bits 7...0
     
    111121    dec     dx                      ; Head count to max head number
    112122    mov     dh, dl                  ; Max head number to DH
    113     push    ax
    114     call    RamVars_GetDriveCounts  ; Hard disk count to CX
    115     pop     ax
    116     mov     dl, cl                  ; Hard disk count to DL
    117123    mov     ch, bl                  ; Cylinder bits 7...0 to CH
    118124    mov     cl, bh                  ; Cylinder bits 9...8 to CL
    119125    eROR_IM cl, 2                   ; Cylinder bits 9...8 to CL bits 7...6
    120126    or      cl, al                  ; Sectors per track to CL bits 5...0
    121     ret
     127    jmp     RamVars_GetCountOfKnownDrivesToDL
Note: See TracChangeset for help on using the changeset viewer.