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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.