source: xtideuniversalbios/trunk/Configurator/Src/MenuEventHotkey.asm@ 21

Last change on this file since 21 was 2, checked in by Tomi Tilli, 14 years ago
File size: 1.9 KB
Line 
1; File name : MenuEventHotkey.asm
2; Project name : XTIDE Univeral BIOS Configurator
3; Created date : 16.4.2010
4; Last update : 16.4.2010
5; Author : Tomi Tilli
6; Description : Functions to handle menu hotkeys.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; Handles all menu hotkeys.
13;
14; MenuEventHotkey_Pressed
15; Parameters:
16; CX: Index (menu library) of currently selected Menuitem
17; DL: ASCII character for pressed key
18; DH: BIOS Scan Code for pressed key
19; DS:SI: Ptr to MENUPAGE
20; DS:DI: Ptr to MENUPAGEITEM
21; SS:BP: Ptr to MENUVARS
22; Returns:
23; Nothing
24; Corrupts registers:
25; AX, BX, CX, DX, DI, ES
26;--------------------------------------------------------------------
27ALIGN JUMP_ALIGN
28MenuEventHotkey_Pressed:
29 cmp dh, KEY_BSC_F1 ; Display help?
30 je SHORT MenuEventHotkey_Help
31 cmp dh, KEY_BSC_F2 ; Toggle menu information?
32 je SHORT MenuEventHotkey_ToggleInfo
33 ret
34
35
36;--------------------------------------------------------------------
37; Displays help dialog for menuitem.
38;
39; MenuEventHotkey_Help
40; Parameters:
41; DS:SI: Ptr to MENUPAGE
42; DS:DI: Ptr to MENUPAGEITEM
43; SS:BP: Ptr to MENUVARS
44; Returns:
45; Nothing
46; Corrupts registers:
47; AX, BX, CX, DX, DI, ES
48;--------------------------------------------------------------------
49ALIGN JUMP_ALIGN
50MenuEventHotkey_Help:
51 jmp MenuPageItem_DisplayHelpDialog
52
53
54;--------------------------------------------------------------------
55; Hides or sets menu information visible.
56;
57; MenuEventHotkey_ToggleInfo
58; Parameters:
59; SS:BP: Ptr to MENUVARS
60; Returns:
61; Nothing
62; Corrupts registers:
63; AX, BX, DX
64;--------------------------------------------------------------------
65ALIGN JUMP_ALIGN
66MenuEventHotkey_ToggleInfo:
67 xor WORD [g_cfgVars+CFGVARS.wFlags], BYTE FLG_CFGVARS_HIDEINFO
68 jmp Menu_ToggleInfo
Note: See TracBrowser for help on using the repository browser.