Changeset 105 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/MenuLoop.asm


Ignore:
Timestamp:
Feb 17, 2011, 2:52:42 PM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:

  • More optimizations to reduce size.
  • Removed some utility functions to reduce size.
File:
1 edited

Legend:

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

    r60 r105  
    1 ; File name     :   MenuLoop.asm
    21; Project name  :   Assembly Library
    3 ; Created date  :   22.7.2010
    4 ; Last update   :   25.11.2010
    5 ; Author        :   Tomi Tilli
    62; Description   :   Menu loop for waiting keystrokes.
    73
     
    2218    call    KeystrokeProcessing
    2319    call    TimeoutProcessing
    24     call    IdleTimeProcessing
     20    call    MenuEvent_IdleProcessing    ; User idle processing
    2521    test    BYTE [bp+MENU.bFlags], FLG_MENU_EXIT
    2622    jz      SHORT MenuLoop_Enter
     
    2925
    3026;--------------------------------------------------------------------
    31 ; IdleTimeProcessing
     27; KeystrokeProcessing
    3228; TimeoutProcessing
    33 ; KeystrokeProcessing
    3429;   Parameters
    3530;       SS:BP:  Ptr to MENU
     
    4035;--------------------------------------------------------------------
    4136ALIGN JUMP_ALIGN
    42 IdleTimeProcessing:
    43     jmp     MenuEvent_IdleProcessing        ; User idle processing
     37KeystrokeProcessing:
     38    call    Keyboard_GetKeystrokeToAX
     39    jnz     SHORT ProcessKeystrokeFromAX
     40NoKeystrokeToProcess:
     41    ret
    4442
    4543ALIGN JUMP_ALIGN
    4644TimeoutProcessing:
    4745    call    MenuTime_UpdateSelectionTimeout
     46    jnc     NoKeystrokeToProcess
    4847    mov     ah, MENU_KEY_ENTER              ; Fake ENTER to select item
    49     jc      SHORT ProcessKeystrokeFromAX    ; Process faked ENTER
    50     ret
    51 
    52 ALIGN JUMP_ALIGN
    53 KeystrokeProcessing:
    54     call    Keyboard_GetKeystrokeToAX
    55     jnz     SHORT ProcessKeystrokeFromAX
    56     ret
     48    ; Fall to ProcessKeystrokeFromAX
    5749
    5850
     
    7466    xchg    ax, cx
    7567    call    .ProcessMenuSystemKeystrokeFromAX
    76     jc      SHORT .Return
     68    jc      SHORT NoKeystrokeToProcess
    7769    jmp     MenuEvent_KeyStrokeInAX
    78 ALIGN JUMP_ALIGN, ret
    79 .Return:
    80     ret
    8170
    8271;--------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.