Ignore:
Timestamp:
Dec 15, 2012, 2:46:29 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm

    r473 r491  
    5151;       CS:BX:  Ptr to IDEVARS
    5252;   Returns:
    53 ;       Nothing (jumps to next push below)
     53;       Nothing (falls to next push below)
    5454;   Corrupts registers:
    5555;       AX, CX, DX
     
    8686.PushBlockSizeFromAX:
    8787    push    ax
     88    ; Fall to .PushDeviceType
    8889
    8990;--------------------------------------------------------------------
    90 ; PushDeviceType
    91 ;   Parameters:
    92 ;       DS:DI:  Ptr to DPT
    93 ;       CS:BX:  Ptr to IDEVARS
    94 ;   Returns:
    95 ;       Nothing (jumps to next push below)
    96 ;   Corrupts registers:
    97 ;       AX, DX
    98 ;--------------------------------------------------------------------
    99 .PushDeviceType:
    100     mov     al,g_szDeviceTypeValues_Displacement
    101 %ifdef MODULE_SERIAL
    102     mov     ah, [cs:bx+IDEVARS.bDevice]
    103     test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
    104     eCMOVZ  ah, [di+DPT_ATA.bDevice]    ; DPT_ATA contains up to date device information for IDE drives
    105     mul     ah
    106 %else   
    107     mul     BYTE [di+DPT_ATA.bDevice]
    108 %endif
    109 
    110     shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
    111 
    112     add     ax, g_szDeviceTypeValues
    113     push    ax
    114 
    115 ;--------------------------------------------------------------------
    116 ; PushIRQ
     91; .PushDeviceType
    11792;   Parameters:
    11893;       DS:DI:  Ptr to DPT
     
    12196;       Nothing (falls to next push below)
    12297;   Corrupts registers:
    123 ;       AX, DX
     98;       AX
     99;--------------------------------------------------------------------
     100.PushDeviceType:
     101%ifndef MODULE_SERIAL
     102    mov     al, g_szDeviceTypeValues_Displacement
     103    mul     BYTE [di+DPT_ATA.bDevice]
     104%else
     105    mov     ah, [cs:bx+IDEVARS.bDevice]
     106    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE    ; Clears CF
     107    eCMOVZ  ah, [di+DPT_ATA.bDevice]    ; DPT_ATA contains up to date device information for IDE drives
     108%ifdef USE_UNDOC_INTEL
     109    eSALC   ; Clear AL using CF (from TEST above)
     110    eAAD    g_szDeviceTypeValues_Displacement
     111%else
     112    mov     al, g_szDeviceTypeValues_Displacement
     113    mul     ah
     114%endif ; USE_UNDOC_INTEL
     115%endif ; MODULE_SERIAL
     116
     117%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     118    %if (COUNT_OF_ALL_IDE_DEVICES * 2 * g_szDeviceTypeValues_Displacement) > 255
     119        %error "The USE_UNDOC_INTEL block in .PushDeviceType needs to be removed (would cause an overflow)!"
     120    %endif
     121%endif
     122
     123    shr     ax, 1   ; Divide by 2 since IDEVARS.bDevice is multiplied by 2
     124    add     ax, g_szDeviceTypeValues
     125    push    ax
     126    ; Fall to .PushIRQ
     127
     128;--------------------------------------------------------------------
     129; .PushIRQ
     130;   Parameters:
     131;       DS:DI:  Ptr to DPT
     132;       CS:BX:  Ptr to IDEVARS
     133;   Returns:
     134;       Nothing (falls to next push below)
     135;   Corrupts registers:
     136;       AX
    124137;--------------------------------------------------------------------
    125138.PushIRQ:
     
    127140    cbw
    128141    push    ax
     142    ; Fall to .PushResetStatus
    129143
    130144;--------------------------------------------------------------------
    131 ; PushResetStatus
     145; .PushResetStatus
    132146;   Parameters:
    133147;       DS:DI:  Ptr to DPT
Note: See TracChangeset for help on using the changeset viewer.