source: xtideuniversalbios/trunk/Assembly_Library/Src/Menu/Dialog/DialogSelection.asm@ 47

Last change on this file since 47 was 41, checked in by Tomi Tilli, 14 years ago

Initial commit for Assembly Library.

File size: 2.0 KB
Line 
1; File name : DialogSelection.asm
2; Project name : Assembly Library
3; Created date : 13.8.2010
4; Last update : 13.8.2010
5; Author : Tomi Tilli
6; Description : Displays selection dialog.
7
8; Section containing code
9SECTION .text
10
11;--------------------------------------------------------------------
12; DialogSelection_GetSelectionToAXwithInputInDSSI
13; Parameters:
14; DS:SI: Ptr to DIALOG_INPUT
15; SS:BP: Ptr to parent MENU
16; Returns:
17; Nothing
18; Corrupts registers:
19; AX, BX, CX, DX, SI, DI
20;--------------------------------------------------------------------
21ALIGN JUMP_ALIGN
22DialogSelection_GetSelectionToAXwithInputInDSSI:
23 mov bx, SelectionEventHandler
24 jmp Dialog_DisplayWithDialogInputInDSSIandHandlerInBX
25
26
27;--------------------------------------------------------------------
28; SelectionEventHandler
29; Common parameters for all events:
30; BX: Menu event (anything from MENUEVENT struct)
31; SS:BP: Ptr to DIALOG
32; Common return values for all events:
33; CF: Set if event processed
34; Cleared if event not processed
35; Corrupts registers:
36; All
37;--------------------------------------------------------------------
38ALIGN JUMP_ALIGN
39SelectionEventHandler:
40 jmp [cs:bx+.rgfnEventHandlers]
41
42
43ALIGN JUMP_ALIGN
44.InitializeMenuinitFromDSSI:
45 mov WORD [bp+MENU.wHighlightedItem], 0
46 jmp Dialog_EventInitializeMenuinitFromDSSI
47
48
49ALIGN WORD_ALIGN
50.rgfnEventHandlers:
51istruc MENUEVENT
52 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI
53 at MENUEVENT.ExitMenu, dw Dialog_EventNotHandled
54 at MENUEVENT.IdleProcessing, dw Dialog_EventNotHandled
55 at MENUEVENT.ItemHighlightedFromCX, dw Dialog_EventNotHandled
56 at MENUEVENT.ItemSelectedFromCX, dw Dialog_EventAnyThatClosesDialog
57 at MENUEVENT.KeyStrokeInAX, dw Dialog_EventNotHandled
58 at MENUEVENT.RefreshTitle, dw Dialog_EventRefreshTitle
59 at MENUEVENT.RefreshInformation, dw Dialog_EventRefreshInformation
60 at MENUEVENT.RefreshItemFromCX, dw Dialog_EventRefreshItemFromCX
61iend
Note: See TracBrowser for help on using the repository browser.