Changeset 178 in xtideuniversalbios for trunk/Assembly_Library
- Timestamp:
- Oct 23, 2011, 8:19:04 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/Assembly_Library
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Menu.inc
r177 r178 1 ; File name : Menu.inc2 1 ; Project name : Assembly Library 3 ; Created date : 13.7.20104 ; Last update : 22.11.20105 ; Author : Tomi Tilli6 2 ; Description : Defines for Menu library. 7 3 %ifndef MENU_INC … … 146 142 147 143 ; Keyboard keys (scan codes) used by menu library 148 MENU_KEY_ENTER EQU 1Ch149 MENU_KEY_ESC EQU 01h144 ;MENU_KEY_ENTER EQU 1Ch 145 ;MENU_KEY_ESC EQU 01h 150 146 MENU_KEY_UP EQU 48h 151 147 MENU_KEY_DOWN EQU 50h -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r133 r178 45 45 call MenuTime_UpdateSelectionTimeout 46 46 jnc NoKeystrokeToProcess 47 mov a h, MENU_KEY_ENTER; Fake ENTER to select item47 mov al, CR ; Fake ENTER to select item 48 48 ; Fall to ProcessKeystrokeFromAX 49 49 … … 85 85 ALIGN JUMP_ALIGN 86 86 .ProcessMenuSystemKeystrokeFromAX: 87 cmp a h, MENU_KEY_ESC87 cmp al, ESC 88 88 je SHORT .LeaveMenuWithoutSelectingItem 89 cmp a h, MENU_KEY_ENTER89 cmp al, CR 90 90 je SHORT .SelectItem 91 91 … … 128 128 ALIGN JUMP_ALIGN 129 129 MenuLoop_ProcessScrollingKeysFromAX: 130 cmp ah, MENU_KEY_PGUP 130 xchg ah, al 131 cmp al, MENU_KEY_PGUP 131 132 je SHORT .ChangeToPreviousPage 132 cmp a h, MENU_KEY_PGDN133 cmp al, MENU_KEY_PGDN 133 134 je SHORT .ChangeToNextPage 134 cmp a h, MENU_KEY_HOME135 cmp al, MENU_KEY_HOME 135 136 je SHORT .SelectFirstItem 136 cmp a h, MENU_KEY_END137 cmp al, MENU_KEY_END 137 138 je SHORT .SelectLastItem 138 139 139 cmp a h, MENU_KEY_UP140 cmp al, MENU_KEY_UP 140 141 je SHORT .DecrementSelectedItem 141 cmp a h, MENU_KEY_DOWN142 cmp al, MENU_KEY_DOWN 142 143 je SHORT .IncrementSelectedItem 143 144 clc ; Clear CF since keystroke not processed 145 xchg ah, al 144 146 ret 145 147 … … 170 172 ALIGN JUMP_ALIGN 171 173 .SelectLastItem: 174 stc 172 175 mov ax, [bp+MENUINIT.wItems] 173 sub ax, [bp+MENUINIT.wHighlightedItem] 174 dec ax 176 sbb ax, [bp+MENUINIT.wHighlightedItem] 175 177 jmp SHORT .MoveHighlightedItemByAX 176 178 … … 178 180 .DecrementSelectedItem: 179 181 mov ax, -1 180 jmp SHORT .MoveHighlightedItemByAX 181 ALIGN JUMP_ALIGN 182 SKIP2B cx ; mov cx, <next instruction> 182 183 .IncrementSelectedItem: 183 mov a x, 1184 mov al, 1 ; AH is already 0 184 185 ALIGN JUMP_ALIGN 185 186 .MoveHighlightedItemByAX:
Note:
See TracChangeset
for help on using the changeset viewer.