Changeset 181 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm


Ignore:
Timestamp:
Nov 13, 2011, 3:38:40 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Size optimizations.
  • Added a define (EXCLUDE_FROM_XTIDECFG) to exclude unused library code from XTIDECFG.
  • Tried to minimize time spent with interrupts disabled.
  • Some minor attempts to improve speed (reordering instructions etc).
  • Tried to improve readability, did some cleanup and fixed some errors in comments.
File:
1 edited

Legend:

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

    r174 r181  
    121121;--------------------------------------------------------------------
    122122AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI:
    123     call    Registers_ExchangeDSSIwithESDI  ; ATA info now in DSDI
     123    mov     bx, Registers_ExchangeDSSIwithESDI
     124    call    bx  ; ATA info now in DS:DI
     125    push    bx  ; We will return via Registers_ExchangeDSSIwithESDI
    124126    xor     bx, bx
    125127    test    BYTE [di+ATA1.wCaps+1], A1_wCaps_LBA>>8
     
    133135;   Parameters:
    134136;       BX:     Zero
    135 ;       DS:SI:  Ptr to 512-byte ATA information read from the drive
     137;       DS:DI:  Ptr to 512-byte ATA information read from the drive
    136138;   Returns:
    137139;       BX:DX:AX:   48-bit sector count
     
    145147    mov     dx, [di+ATA6.qwLBACnt+2]
    146148    mov     bx, [di+ATA6.qwLBACnt+4]
    147     jmp     SHORT .ExchangePtrAndReturn
     149    ret
    148150
    149151.GetLba28SectorCount:
    150152    mov     ax, [di+ATA1.dwLBACnt]
    151153    mov     dx, [di+ATA1.dwLBACnt+2]
    152     jmp     SHORT .ExchangePtrAndReturn
     154    ret
    153155
    154156.GetChsSectorCount:
     
    156158    mul     BYTE [di+ATA1.wHeadCnt] ; AX=Sectors per track * number of heads
    157159    mul     WORD [di+ATA1.wCylCnt]  ; DX:AX=Sectors per track * number of heads * number of cylinders
    158 .ExchangePtrAndReturn:
    159     jmp     Registers_ExchangeDSSIwithESDI
     160    ret
Note: See TracChangeset for help on using the changeset viewer.