Changeset 133 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu


Ignore:
Timestamp:
Mar 12, 2011, 1:48:48 PM (14 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Size optimizations in various files in the Assembly Library. Also a very small change to a string in XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

Location:
trunk/Assembly_Library/Src/Menu
Files:
7 edited

Legend:

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

    r52 r133  
    1 ; File name     :   ItemLineSplitter.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   12.10.2010
    4 ; Last update   :   12.10.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Functions for splitting strings to item lines.
    73
     
    130126
    131127    inc     bx                  ; Increment line
    132     xor     cx, cx              ; Zero character counter
     128    xor     cx, cx              ; Zero character counter (and clear CF)
    133129    mov     si, di              ; Start from complete word
    134130    mov     [bp+ITEM_LINE_SPLITTER.wStartOfLine], di
    135     clc
    136131    ret
    137132
  • trunk/Assembly_Library/Src/Menu/MenuEvent.asm

    r104 r133  
    2121    pop     ds
    2222    mov     si, bp
    23     mov     bx, MENUEVENT.InitializeMenuinitFromDSSI
     23    mov     bl, MENUEVENT.InitializeMenuinitFromDSSI
    2424    jmp     SHORT MenuEvent_SendFromBX
    2525
     
    3737ALIGN JUMP_ALIGN
    3838MenuEvent_ExitMenu:
    39     mov     bx, MENUEVENT.ExitMenu
     39    mov     bl, MENUEVENT.ExitMenu
    4040    jmp     SHORT MenuEvent_SendFromBX
    4141
     
    5353ALIGN JUMP_ALIGN
    5454MenuEvent_IdleProcessing:
    55     mov     bx, MENUEVENT.IdleProcessing
     55    mov     bl, MENUEVENT.IdleProcessing
    5656    jmp     SHORT MenuEvent_SendFromBX
    5757
     
    7171ALIGN JUMP_ALIGN
    7272MenuEvent_RefreshTitle:
    73     mov     bx, MENUEVENT.RefreshTitle
    74     jmp     SHORT LoadHighlightedItemToCXandSendMessageFromBX
     73    mov     bl, MENUEVENT.RefreshTitle
     74    SKIP2B  cx  ; mov cx, <next instruction>
    7575
    76 ALIGN JUMP_ALIGN
    7776MenuEvent_RefreshInformation:
    78     mov     bx, MENUEVENT.RefreshInformation
    79 LoadHighlightedItemToCXandSendMessageFromBX:
     77    mov     bl, MENUEVENT.RefreshInformation
    8078    mov     cx, [bp+MENUINIT.wHighlightedItem]
    8179    jmp     SHORT MenuEvent_SendFromBX
     
    9694ALIGN JUMP_ALIGN
    9795MenuEvent_RefreshItemFromCX:
    98     mov     bx, MENUEVENT.RefreshItemFromCX
     96    mov     bl, MENUEVENT.RefreshItemFromCX
    9997    jmp     SHORT MenuEvent_SendFromBX
    10098
     
    116114    push    dx
    117115
    118     mov     bx, MENUEVENT.ItemHighlightedFromCX
     116    mov     bl, MENUEVENT.ItemHighlightedFromCX
    119117    call    MenuEvent_SendFromBX
    120118
     
    139137ALIGN JUMP_ALIGN
    140138MenuEvent_KeyStrokeInAX:
    141     mov     bx, MENUEVENT.KeyStrokeInAX
    142     jmp     SHORT MenuEvent_SendFromBX
     139    mov     bl, MENUEVENT.KeyStrokeInAX
     140    SKIP2B  dx  ; mov dx, <next instruction>
    143141
    144142
     
    154152;       AX, BX, DX
    155153;--------------------------------------------------------------------
    156 ALIGN JUMP_ALIGN
    157154MenuEvent_ItemSelectedFromCX:
    158     mov     bx, MENUEVENT.ItemSelectedFromCX
    159     jmp     SHORT MenuEvent_SendFromBX
     155    mov     bl, MENUEVENT.ItemSelectedFromCX
     156    ; Fall to MenuEvent_SendFromBX
    160157
    161158
     
    163160; MenuEvent_SendFromBX
    164161;   Parameters
    165 ;       BX:                 Menu event to send
     162;       BL:                 Menu event to send
    166163;       SS:BP:              Ptr to MENU
    167164;       Other registers:    Event specific parameters
     
    180177    push    si
    181178    push    cx
     179    xor     bh, bh
    182180    call    [bp+MENU.fnEventHandler]
    183181    pop     cx
  • trunk/Assembly_Library/Src/Menu/MenuInit.asm

    r129 r133  
    5757    CALL_DISPLAY_LIBRARY SetCursorShapeFromAX
    5858    call    MenuEvent_InitializeMenuinit    ; User initialization
     59%ifndef USE_186
    5960    call    MenuInit_RefreshMenuWindow
    6061    jmp     MenuLoop_Enter
     62%else
     63    push    MenuLoop_Enter
     64    ; Fall to MenuInit_RefreshMenuWindow
     65%endif
    6166
    6267
     
    117122;       Nothing
    118123;--------------------------------------------------------------------
     124%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    119125ALIGN JUMP_ALIGN
    120126MenuInit_GetHighlightedItemToAX:
    121127    mov     ax, [bp+MENUINIT.wHighlightedItem]
    122128    ret
     129%endif
    123130
    124131
     
    135142;       Nothing
    136143;--------------------------------------------------------------------
     144%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    137145ALIGN JUMP_ALIGN
    138146MenuInit_SetTitleHeightFromAL:
     
    149157    mov     [bp+MENUINIT.wItems], ax
    150158    ret
     159%endif
    151160
    152161
     
    162171;       Nothing
    163172;--------------------------------------------------------------------
     173%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
    164174ALIGN JUMP_ALIGN
    165175MenuInit_SetUserDataFromDSSI:
     
    172182    lds     si, [bp+MENU.dwUserData]
    173183    ret
     184%endif
  • trunk/Assembly_Library/Src/Menu/MenuLoop.asm

    r105 r133  
    5656;       SS:BP:  Ptr to MENU
    5757;   Returns:
    58 ;       Nothing 
     58;       Nothing
    5959;   Corrupts registers:
    6060;       AX, BX, CX, DX, SI, DI
     
    9292    test    BYTE [bp+MENU.bFlags], FLG_MENU_USER_HANDLES_SCROLLING
    9393    jz      SHORT MenuLoop_ProcessScrollingKeysFromAX
    94     clc     ; Clear CF since keystroke not processed
    95     ret
     94    ret     ; Return with CF cleared since keystroke not processed
    9695
    9796ALIGN JUMP_ALIGN
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r105 r133  
    5959;   Corrupts registers:
    6060;       CX, DX
    61 ;--------------------------------------------------------------------   
     61;--------------------------------------------------------------------
    6262ALIGN JUMP_ALIGN
    6363.GetLastThumbLineToAX:
     
    161161.RotateItemInCX:
    162162    mov     dx, [bp+MENUINIT.wItems]
    163     cmp     cx, BYTE 0
    164     jl      SHORT .RotateNegativeItemInCX
     163    test    cx, cx
     164    js      SHORT .RotateNegativeItemInCX
    165165    cmp     cx, dx
    166166    jae     SHORT .RotatePositiveItemInCX
     
    193193ALIGN JUMP_ALIGN
    194194MenuScrollbars_IsItemInCXonVisiblePage:
    195     cmp     cx, [bp+MENU.wFirstVisibleItem]
    196     jb      SHORT .ItemIsNotVisible
     195    cmp     [bp+MENU.wFirstVisibleItem], cx
     196    ja      SHORT .ItemIsNotVisible
    197197
    198198    call    MenuScrollbars_GetLastVisibleItemOnPageToAX
     
    200200    ja      SHORT .ItemIsNotVisible
    201201    stc     ; Item is visible
    202     ret
    203 ALIGN JUMP_ALIGN
     202ALIGN JUMP_ALIGN, ret
    204203.ItemIsNotVisible:
    205     clc
    206204    ret
    207205
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r125 r133  
    155155    call    MenuLocation_GetTextCoordinatesToAXforItemInAX
    156156    mov     dx, MenuCharOut_MenuTeletypeOutput
    157     ; Fall to AdjustDisplayContextForDrawingTextsAtCoordinatesInAXwithAttributeTypeInSI
     157    ; Fall to AdjustDisplayContextForDrawingTextsAtCoordsInAXwithAttrTypeInSIandCharOutFunctionInDX
    158158
    159159;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Menu/MenuTime.asm

    r105 r133  
    9797    xchg    dx, ax
    9898    call    TimerTicks_GetSecondsToAXfromTicksInDX
    99     jmp     SHORT .PopRegistersAndReturn
     99    SKIP2B  f   ; cmp ax, <next instruction>
    100100.TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero:
    101101    xor     ax, ax
    102 .PopRegistersAndReturn:
     102
    103103    pop     bx
    104104    pop     cx
Note: See TracChangeset for help on using the changeset viewer.