Changeset 525 in xtideuniversalbios for trunk/Assembly_Library/Inc/Menu.inc


Ignore:
Timestamp:
Mar 14, 2013, 9:45:07 PM (11 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/Assembly_Library/Inc/Menu.inc

    r370 r525  
    55
    66;--------------------------------------------------------------------
    7 ; Menu Library users need to use this macro since it will provide
     7; Menu Library users need to use these macros since it will provide
    88; compatibility with future library versions.
    99;
    1010; CALL_MENU_LIBRARY
     11; JMP_MENU_LIBRARY
    1112;   Parameters:
    1213;       %1:         Function to call (functionName from MENU_LIB)
     
    2122    %ifidn %1, CloseMenuIfExitEventAllows
    2223        call    MenuInit_CloseMenuIfExitEventAllows
    23 
    2424    %elifidn %1, Close
    2525        call    MenuInit_CloseMenuWindow
    26 
    2726    %elifidn %1, SetUserDataFromDSSI
    2827        call    MenuInit_SetUserDataFromDSSI
    29 
    3028    %elifidn %1, GetUserDataToDSSI
    3129        call    MenuInit_GetUserDataToDSSI
    32 
    3330    %elifidn %1, SetTitleHeightFromAL
    3431        call    MenuInit_SetTitleHeightFromAL
    35 
    3632    %elifidn %1, GetHighlightedItemToAX
    3733        call    MenuInit_GetHighlightedItemToAX
    38 
    3934    %elifidn %1, SetTotalItemsFromAX
    4035        call    MenuInit_SetTotalItemsFromAX
    41 
    4236    %elifidn %1, SetInformationHeightFromAL
    4337        call    MenuInit_SetInformationHeightFromAL
    44 
    4538    %elifidn %1, SetTimeoutValueFromAX
    4639        call    MenuTime_SetSelectionTimeoutValueFromAX
    47 
    4840    %else
    4941        mov     di, %1
    5042        call    Menu_FunctionFromDI
     43    %endif
     44%endmacro
     45
     46%macro JMP_MENU_LIBRARY 1
     47    %ifidn %1, CloseMenuIfExitEventAllows
     48        jmp     MenuInit_CloseMenuIfExitEventAllows
     49    %elifidn %1, Close
     50        jmp     MenuInit_CloseMenuWindow
     51    %elifidn %1, SetUserDataFromDSSI
     52        jmp     MenuInit_SetUserDataFromDSSI
     53    %elifidn %1, GetUserDataToDSSI
     54        jmp     MenuInit_GetUserDataToDSSI
     55    %elifidn %1, SetTitleHeightFromAL
     56        jmp     MenuInit_SetTitleHeightFromAL
     57    %elifidn %1, GetHighlightedItemToAX
     58        jmp     MenuInit_GetHighlightedItemToAX
     59    %elifidn %1, SetTotalItemsFromAX
     60        jmp     MenuInit_SetTotalItemsFromAX
     61    %elifidn %1, SetInformationHeightFromAL
     62        jmp     MenuInit_SetInformationHeightFromAL
     63    %elifidn %1, SetTimeoutValueFromAX
     64        jmp     MenuTime_SetSelectionTimeoutValueFromAX
     65    %else
     66        mov     di, %1
     67        jmp     Menu_FunctionFromDI
    5168    %endif
    5269%endmacro
Note: See TracChangeset for help on using the changeset viewer.