Changeset 181 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


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.
Location:
trunk/XTIDE_Universal_BIOS/Src/Initialization
Files:
4 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
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DriveXlate.asm

    r148 r181  
    5555;       DL:     Translated drive number
    5656;   Corrupts registers:
    57 ;       Nothing
     57;       AL
    5858;--------------------------------------------------------------------
    5959ALIGN JUMP_ALIGN
     
    6262    je      SHORT .SwapToXXhInAL
    6363    cmp     al, dl              ; Swap DL from xxh to 00h/80h?
    64     je      SHORT .SwapTo00hOr80hInAH
    65     ret
    66 ALIGN JUMP_ALIGN
    67 .SwapTo00hOr80hInAH:
    68     mov     dl, ah
    69     ret
     64    jne     SHORT .Return
     65    mov     al, ah
    7066ALIGN JUMP_ALIGN
    7167.SwapToXXhInAL:
    7268    mov     dl, al
     69ALIGN JUMP_ALIGN, ret
     70.Return:
    7371    ret
    7472
     
    8381;       Nothing
    8482;   Corrupts registers:
    85 ;       AX
     83;       Nothing
    8684;--------------------------------------------------------------------
    8785ALIGN JUMP_ALIGN
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r152 r181  
    136136    call    GetCountFromBDA
    137137%endif
    138     MAX_U   cl, [cs:ROMVARS.bMinFddCnt]
     138    mov     ch, [cs:ROMVARS.bMinFddCnt]
     139    MAX_U   cl, ch
     140    pop     es
    139141    xor     ch, ch
    140     pop     es
    141142    ret
    142143
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r162 r181  
    2929;--------------------------------------------------------------------
    3030.InitializeInt13hAnd40h:
     31    mov     ax, [es:BIOS_DISK_INTERRUPT_13h*4+2]; Load old INT 13h segment
     32    mov     [RAMVARS.fpOldI13h+2], ax           ; Store old INT 13h segment
     33    xchg    dx, ax
    3134    mov     ax, [es:BIOS_DISK_INTERRUPT_13h*4]  ; Load old INT 13h offset
    32     mov     dx, [es:BIOS_DISK_INTERRUPT_13h*4+2]; Load old INT 13h segment
    3335    mov     [RAMVARS.fpOldI13h], ax             ; Store old INT 13h offset
    34     mov     [RAMVARS.fpOldI13h+2], dx           ; Store old INT 13h segment
     36
    3537    mov     bx, BIOS_DISK_INTERRUPT_13h         ; INT 13h interrupt vector offset
    3638    mov     si, Int13h_DiskFunctionsHandler     ; Interrupt handler offset
Note: See TracChangeset for help on using the changeset viewer.