Changeset 58 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/MenuLoop.asm
- Timestamp:
- Nov 18, 2010, 2:42:28 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r52 r58 2 2 ; Project name : Assembly Library 3 3 ; Created date : 22.7.2010 4 ; Last update : 1 2.10.20104 ; Last update : 18.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu loop for waiting keystrokes. … … 20 20 ALIGN JUMP_ALIGN 21 21 MenuLoop_Enter: 22 call KeystrokeProcessing 23 call TimeoutProcessing 24 call IdleTimeProcessing 22 25 test BYTE [bp+MENU.bFlags], FLG_MENU_EXIT 23 jnz SHORT .ExitMenu24 call IdleTimeProcessing25 26 call MenuTime_UpdateSelectionTimeout27 mov ah, MENU_KEY_ENTER ; Fake ENTER to select item28 jc SHORT .ProcessFakedKeystrokeCausedByTimeout29 30 call Keyboard_GetKeystrokeToAX31 26 jz SHORT MenuLoop_Enter 32 .ProcessFakedKeystrokeCausedByTimeout: 33 call ProcessKeystrokeFromAX 34 jmp SHORT MenuLoop_Enter 35 36 ALIGN JUMP_ALIGN 37 .ExitMenu: 38 jmp MenuEvent_ExitMenu 27 ret 39 28 40 29 41 30 ;-------------------------------------------------------------------- 42 31 ; IdleTimeProcessing 32 ; TimeoutProcessing 33 ; KeystrokeProcessing 43 34 ; Parameters 44 35 ; SS:BP: Ptr to MENU … … 46 37 ; Nothing 47 38 ; Corrupts registers: 48 ; A X, BX, DX39 ; All, except SS:BP 49 40 ;-------------------------------------------------------------------- 50 41 ALIGN JUMP_ALIGN 51 42 IdleTimeProcessing: 52 jmp MenuEvent_IdleProcessing ; User idle processing 43 jmp MenuEvent_IdleProcessing ; User idle processing 44 45 ALIGN JUMP_ALIGN 46 TimeoutProcessing: 47 call MenuTime_UpdateSelectionTimeout 48 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 53 57 54 58 … … 101 105 ALIGN JUMP_ALIGN 102 106 .LeaveMenuWithoutSelectingItem: 107 call MenuEvent_ExitMenu 108 jnc SHORT .CancelMenuExit 103 109 call MenuInit_CloseMenuWindow 104 110 mov WORD [bp+MENUINIT.wHighlightedItem], NO_ITEM_HIGHLIGHTED 111 .CancelMenuExit: 105 112 stc 106 113 ret
Note:
See TracChangeset
for help on using the changeset viewer.