Changeset 177 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Menu.asm


Ignore:
Timestamp:
Oct 22, 2011, 9:31:12 PM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Optimiztion, replaced the jump tables for MENU_LIB and DISPLAY_LIB with direct jump offsets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Menu/Menu.asm

    r104 r177  
    2323    push    cx
    2424    push    bx
    25     call    [cs:di+.rgfnMenuLibraryFunctions]
     25    call    di
    2626    pop     bx
    2727    pop     cx
     
    3131
    3232
    33 ALIGN WORD_ALIGN
    34 .rgfnMenuLibraryFunctions:
    35 istruc MENU_LIB
    36     at  MENU_LIB.DisplayWithHandlerInBXandUserDataInDXAX,   dw  MenuInit_DisplayMenuWithHandlerInBXandUserDataInDXAX
    37     ;at MENU_LIB.Close,                         dw  MenuInit_CloseMenuWindow                ; Special case in CALL_MENU_LIBRARY
    38     at  MENU_LIB.RefreshWindow,                 dw  MenuInit_RefreshMenuWindow
     33%define DisplayWithHandlerInBXandUserDataInDXAX     MenuInit_DisplayMenuWithHandlerInBXandUserDataInDXAX
     34;%define Close                                      MenuInit_CloseMenuWindow                ; Special case in CALL_MENU_LIBRARY
     35%define RefreshWindow                       MenuInit_RefreshMenuWindow
    3936
    40     ;at MENU_LIB.SetUserDataFromDSSI,           dw  MenuInit_SetUserDataFromDSSI            ; Special case in CALL_MENU_LIBRARY
    41     ;at MENU_LIB.GetUserDataToDSSI,             dw  MenuInit_GetUserDataToDSSI              ; Special case in CALL_MENU_LIBRARY
     37;%define SetUserDataFromDSSI                MenuInit_SetUserDataFromDSSI            ; Special case in CALL_MENU_LIBRARY
     38;%define GetUserDataToDSSI                  MenuInit_GetUserDataToDSSI              ; Special case in CALL_MENU_LIBRARY
    4239
    43     ;at MENU_LIB.SetTitleHeightFromAL,          dw  MenuInit_SetTitleHeightFromAL           ; Special case in CALL_MENU_LIBRARY
    44     at  MENU_LIB.ClearTitleArea,                dw  MenuText_ClearTitleArea
    45     at  MENU_LIB.RefreshTitle,                  dw  MenuText_RefreshTitle
     40;%define SetTitleHeightFromAL               MenuInit_SetTitleHeightFromAL           ; Special case in CALL_MENU_LIBRARY
     41%define ClearTitleArea                      MenuText_ClearTitleArea
     42%define RefreshTitle                        MenuText_RefreshTitle
    4643
    47     at  MENU_LIB.HighlightItemFromAX,           dw  MenuInit_HighlightItemFromAX
    48     ;at MENU_LIB.SetTotalItemsFromAX,           dw  MenuInit_SetTotalItemsFromAX            ; Special case in CALL_MENU_LIBRARY
    49     at  MENU_LIB.RefreshItemFromAX,             dw  MenuText_RefreshItemFromAX
     44%define HighlightItemFromAX                 MenuInit_HighlightItemFromAX
     45;%define SetTotalItemsFromAX                MenuInit_SetTotalItemsFromAX            ; Special case in CALL_MENU_LIBRARY
     46%define RefreshItemFromAX                   MenuText_RefreshItemFromAX
    5047
    51     ;at MENU_LIB.SetInformationHeightFromAL,    dw  MenuInit_SetInformationHeightFromAL     ; Special case in CALL_MENU_LIBRARY
    52     at  MENU_LIB.ClearInformationArea,          dw  MenuText_ClearInformationArea
    53     at  MENU_LIB.RefreshInformation,            dw  MenuText_RefreshInformation
     48;%define SetInformationHeightFromAL                     MenuInit_SetInformationHeightFromAL     ; Special case in CALL_MENU_LIBRARY
     49%define ClearInformationArea                            MenuText_ClearInformationArea
     50%define RefreshInformation                              MenuText_RefreshInformation
    5451
    55     at  MENU_LIB.StartSelectionTimeoutWithTicksInAX,    dw  MenuTime_StartSelectionTimeoutWithTicksInAX
     52%define StartSelectionTimeoutWithTicksInAX              MenuTime_StartSelectionTimeoutWithTicksInAX
    5653
    5754%ifdef INCLUDE_MENU_DIALOGS
    58     at  MENU_LIB.StartProgressTaskWithIoInDSSIandParamInDXAX,   dw  DialogProgress_StartProgressTaskWithIoInDSSIandParamInDXAX
    59     at  MENU_LIB.SetProgressValueFromAX,                        dw  DialogProgress_SetProgressValueFromAX
     55%define StartProgressTaskWithIoInDSSIandParamInDXAX     DialogProgress_StartProgressTaskWithIoInDSSIandParamInDXAX
     56%define SetProgressValueFromAX                          DialogProgress_SetProgressValueFromAX
    6057
    61     at  MENU_LIB.DisplayMessageWithInputInDSSI,                 dw  DialogMessage_DisplayMessageWithInputInDSSI
    62     at  MENU_LIB.GetSelectionToAXwithInputInDSSI,               dw  DialogSelection_GetSelectionToAXwithInputInDSSI
    63     at  MENU_LIB.GetWordWithIoInDSSI,                           dw  DialogWord_GetWordWithIoInDSSI
    64     at  MENU_LIB.GetStringWithIoInDSSI,                         dw  DialogString_GetStringWithIoInDSSI
    65     at  MENU_LIB.GetFileNameWithIoInDSSI,                       dw  DialogFile_GetFileNameWithIoInDSSI
    66     at  MENU_LIB.GetDriveWithIoInDSSI,                          dw  DialogDrive_GetDriveWithIoInDSSI
     58%define DisplayMessageWithInputInDSSI                   DialogMessage_DisplayMessageWithInputInDSSI
     59%define GetSelectionToAXwithInputInDSSI                 DialogSelection_GetSelectionToAXwithInputInDSSI
     60%define GetWordWithIoInDSSI                             DialogWord_GetWordWithIoInDSSI
     61%define GetStringWithIoInDSSI                           DialogString_GetStringWithIoInDSSI
     62%define GetFileNameWithIoInDSSI                         DialogFile_GetFileNameWithIoInDSSI
     63%define GetDriveWithIoInDSSI                            DialogDrive_GetDriveWithIoInDSSI
    6764%endif
    68 iend
     65
Note: See TracChangeset for help on using the changeset viewer.