Changeset 491 in xtideuniversalbios for trunk/Assembly_Library/Src/Display/DisplayContext.asm


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/Assembly_Library/Src/Display/DisplayContext.asm

    r489 r491  
    33
    44;
    5 ; XTIDE Universal BIOS and Associated Tools 
     5; XTIDE Universal BIOS and Associated Tools
    66; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
    77;
     
    1010; the Free Software Foundation; either version 2 of the License, or
    1111; (at your option) any later version.
    12 ; 
     12;
    1313; This program is distributed in the hope that it will be useful,
    1414; but WITHOUT ANY WARRANTY; without even the implied warranty of
    1515; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16 ; GNU General Public License for more details.     
     16; GNU General Public License for more details.
    1717; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    18 ;       
     18;
    1919
    2020; Section containing code
     
    102102
    103103
    104 %ifdef INCLUDE_MENU_LIBRARY
    105 
    106104;--------------------------------------------------------------------
    107105; DisplayContext_Push
     106; DisplayContext_Pop
    108107;   Parameters:
    109108;       Nothing
     
    113112;       AX, DI
    114113;--------------------------------------------------------------------
     114%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     115    %ifndef MODULE_BOOT_MENU
     116        %define EXCLUDE
     117    %endif
     118%endif
     119
     120%ifndef EXCLUDE
    115121ALIGN DISPLAY_JUMP_ALIGN
    116122DisplayContext_Push:
     
    126132    %endrep
    127133%endif
    128        
     134
    129135    mov     ds, di                  ; Restore DS
    130136    jmp     ax
    131137
    132 ;--------------------------------------------------------------------
    133 ; DisplayContext_Pop
    134 ;   Parameters:
    135 ;       Nothing
    136 ;   Returns:
    137 ;       Nothing
    138 ;   Corrupts registers:
    139 ;       AX, DI
    140 ;--------------------------------------------------------------------
     138
    141139ALIGN DISPLAY_JUMP_ALIGN
    142140DisplayContext_Pop:
     
    145143    pop     ax                      ; Pop return address
    146144
    147 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS       
     145%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
    148146    %assign i DISPLAY_CONTEXT_size-2
    149147    %rep DISPLAY_CONTEXT_size / 2
     
    152150    %endrep
    153151%endif
    154        
     152
    155153    push    ax                      ; Push return address
    156154    push    dx
     
    159157    mov     ds, di                  ; Restore DS
    160158    ret
    161 %endif
     159%endif ; EXCLUDE
     160%undef EXCLUDE
     161
    162162
    163163;--------------------------------------------------------------------
     
    189189    pop     ds
    190190    ret
    191 
    192 %endif  ; INCLUDE_MENU_LIBRARY
     191%endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    193192
    194193
     
    231230%endif
    232231
    233 %ifdef INCLUDE_MENU_LIBRARY
    234 
     232
     233%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     234    %ifndef MODULE_BOOT_MENU
     235        %define EXCLUDE
     236    %endif
     237%endif
    235238;--------------------------------------------------------------------
    236239; DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
     
    244247;       BL
    245248;--------------------------------------------------------------------
     249%ifndef EXCLUDE ; 1 of 3
    246250ALIGN DISPLAY_JUMP_ALIGN
    247251DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL:
     
    251255    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut], ax
    252256    ret
     257%endif
    253258
    254259
     
    263268;       Nothing
    264269;--------------------------------------------------------------------
     270%ifndef EXCLUDE ; 2 of 3
    265271ALIGN DISPLAY_JUMP_ALIGN
    266272DisplayContext_SetCharacterAttributeFromAL:
    267273    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute], al
    268274    ret
     275%endif
    269276
    270277
     
    279286;       Nothing
    280287;--------------------------------------------------------------------
     288%ifndef EXCLUDE ; 3 of 3
    281289ALIGN DISPLAY_JUMP_ALIGN
    282290DisplayContext_SetCharacterOutputParameterFromAX:
    283291    mov     [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], ax
    284292    ret
    285        
    286 %endif   ; INCLUDE_MENU_LIBRARY
    287        
     293%endif
     294
     295%undef EXCLUDE
     296
     297
    288298;--------------------------------------------------------------------
    289299; DisplayContext_GetCharacterOutputParameterToDX
     
    295305;       Nothing
    296306;--------------------------------------------------------------------
    297 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG  ; This is currently unused (dead code)
     307%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
    298308ALIGN DISPLAY_JUMP_ALIGN
    299309DisplayContext_GetCharacterOutputParameterToDX:
     
    322332%endif
    323333
    324        
     334
    325335;--------------------------------------------------------------------
    326336; DisplayContext_GetByteOffsetToAXfromCharacterOffsetInAX
Note: See TracChangeset for help on using the changeset viewer.