Changeset 525 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2


Ignore:
Timestamp:
Mar 14, 2013, 9:45:07 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Made some improvements to the stack switching in Int13h.asm.
  • Added a tail-call optimized variant of the CALL_MENU_LIBRARY macro (JMP_MENU_LIBRARY).
  • Other optimizations and fixes.
Location:
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/AutoConfigure.asm

    r523 r525  
    174174ALIGN JUMP_ALIGN
    175175StoreAndDisplayNumberOfControllers:
    176     mov     ax, 1
    177     MAX_U   al, cl                      ; Cannot store zero
     176    xor     ax, ax
     177    or      al, cl
     178    jnz     SHORT .AtLeastOneController
     179    inc     ax                          ; Cannot store zero
     180.AtLeastOneController:
    178181    test    BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
    179182    jnz     SHORT .FullModeSoNoNeedToLimit
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm

    r376 r525  
    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
     
    190190    mov     dx, ds
    191191    mov     ax, bx
    192     CALL_MENU_LIBRARY StartProgressTaskWithIoInDSSIandParamInDXAX
    193     ret
     192    JMP_MENU_LIBRARY StartProgressTaskWithIoInDSSIandParamInDXAX
    194193
    195194
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm

    r505 r525  
    1 ; Project name  :   XTIDE Univeral BIOS Configurator v2
     1; Project name  :   XTIDE Universal BIOS Configurator v2
    22; Description   :   Program start and exit.
    33
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuEvents.asm

    r505 r525  
    3333MenuEvents_DisplayMenu:
    3434    mov     bx, MenuEventHandler
    35     CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX
    36     ret
     35    JMP_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX
    3736
    3837
     
    218217    jnz     SHORT .PrintNameOfLoadedFile
    219218    test    ax, FLG_CFGVARS_ROMLOADED
    220     jnz     SHORT .PrintLoadedEeprom
     219    mov     si, g_szEEPROM
     220    jnz     SHORT .PrintNameOfLoadedFileOrEeprom
    221221    ; Fall to .PrintNothingLoaded
    222222
     
    228228.PrintNameOfLoadedFile:
    229229    mov     si, g_cfgVars+CFGVARS.szOpenedFile
    230     CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
    231     jmp     SHORT .PrintTypeOfLoadedBios
    232 
    233 ALIGN JUMP_ALIGN
    234 .PrintLoadedEeprom:
    235     mov     si, g_szEEPROM
     230    ; Fall to .PrintNameOfLoadedFileOrEeprom
     231
     232ALIGN JUMP_ALIGN
     233.PrintNameOfLoadedFileOrEeprom:
    236234    CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
    237235    ; Fall to .PrintTypeOfLoadedBios
    238236
    239 ALIGN JUMP_ALIGN
    240237.PrintTypeOfLoadedBios:
    241238    mov     si, g_szSourceAndTypeSeparator
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm

    r425 r525  
    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
     
    168168    call    GetConfigurationBufferToESDIforMenuitemInDSSI
    169169    add     di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
    170        
     170
    171171    push    bx
    172172    mov     bx,[si+MENUITEM.itemValue+ITEM_VALUE.fnValueWriter]
     
    176176.NoWriter:
    177177    pop     bx
    178        
     178
    179179    jmp     [cs:bx+.rgfnJumpToStoreValueBasedOnItemType]
    180180.InvalidItemType:
     
    295295    CALL_MENU_LIBRARY RefreshTitle
    296296    CALL_MENU_LIBRARY GetHighlightedItemToAX
    297     CALL_MENU_LIBRARY RefreshItemFromAX
    298     ret
     297    JMP_MENU_LIBRARY RefreshItemFromAX
    299298
    300299ALIGN JUMP_ALIGN
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupage.asm

    r376 r525  
    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
     
    3939    xor     ax, ax
    4040    CALL_MENU_LIBRARY HighlightItemFromAX
    41     CALL_MENU_LIBRARY RefreshWindow
    42     ret
     41    JMP_MENU_LIBRARY RefreshWindow
    4342
    4443
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm

    r376 r525  
    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 initialized data
     
    2929iend
    3030
    31 g_MenuitemMainMenuLicense:     
     31g_MenuitemMainMenuLicense:
    3232istruc MENUITEM
    3333    at  MENUITEM.fnActivate,        dw  Menuitem_DisplayHelpMessageFromDSSI
     
    3535    at  MENUITEM.szQuickInfo,       dw  g_szNfoMainLicense
    3636    at  MENUITEM.szHelp,            dw  g_szHelpMainLicense
    37     at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE       
    38     at  MENUITEM.bType,             db  TYPE_MENUITEM_ACTION
    39 iend
    40        
     37    at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE
     38    at  MENUITEM.bType,             db  TYPE_MENUITEM_ACTION
     39iend
     40
    4141g_MenuitemMainMenuLoadBiosFromFile:
    4242istruc MENUITEM
     
    8989iend
    9090
    91 g_MenuitemMainMenuSaveFile:     
     91g_MenuitemMainMenuSaveFile:
    9292istruc MENUITEM
    9393    at  MENUITEM.fnActivate,        dw  BiosFile_SaveUnsavedChanges
     
    9797    at  MENUITEM.bFlags,            db  NULL
    9898    at  MENUITEM.bType,             db  TYPE_MENUITEM_ACTION
    99 iend       
     99iend
    100100
    101101g_MenuitemMainMenuExitToDos:
     
    109109iend
    110110
    111 g_MenuitemMainMenuHomePage:     
     111g_MenuitemMainMenuHomePage:
    112112istruc MENUITEM
    113113    at  MENUITEM.fnActivate,        dw  Menuitem_DisplayHelpMessageFromDSSI
     
    115115    at  MENUITEM.szQuickInfo,       dw  g_szNfoMainHomePage
    116116    at  MENUITEM.szHelp,            dw  g_szNfoMainHomePage
    117     at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE       
    118     at  MENUITEM.bType,             db  TYPE_MENUITEM_ACTION
    119 iend                       
     117    at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE
     118    at  MENUITEM.bType,             db  TYPE_MENUITEM_ACTION
     119iend
    120120
    121121
     
    139139    call    .EnableOrDisableConfigureXtideUniversalBios
    140140    call    .EnableOrDisableFlashEeprom
    141     call    .EnableOrDisableSave           
     141    call    .EnableOrDisableSave
    142142    mov     si, g_MenupageForMainMenu
    143143    jmp     Menupage_ChangeToNewMenupageInDSSI
     
    220220;       Nothing
    221221;--------------------------------------------------------------------
    222 ALIGN JUMP_ALIGN       
    223 .EnableOrDisableSave:   
     222ALIGN JUMP_ALIGN
     223.EnableOrDisableSave:
    224224    test    WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED
    225225    jz      SHORT .DisableSave
     
    227227    ret
    228228
    229 ALIGN JUMP_ALIGN               
     229ALIGN JUMP_ALIGN
    230230.DisableSave:
    231231    and     BYTE [g_MenuitemMainMenuSaveFile+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
    232232    ret
    233                
     233
    234234;--------------------------------------------------------------------
    235235; MENUITEM activation functions (.fnActivate)
     
    243243ALIGN JUMP_ALIGN
    244244ExitToDosSelectedFromMenu:
    245     CALL_MENU_LIBRARY CloseMenuIfExitEventAllows
    246 ExitToDosFromBackButton:
    247     ret
     245    JMP_MENU_LIBRARY CloseMenuIfExitEventAllows
    248246
    249247
     
    262260.CancelFileLoading:
    263261    add     sp, BYTE FILE_DIALOG_IO_size
     262ExitToDosFromBackButton:
    264263    ret
    265264
     
    284283    jmp     Dialogs_DisplayNotificationFromCSDX
    285284
    286 
    287    
Note: See TracChangeset for help on using the changeset viewer.