[41] | 1 | ; File name : DialogSelection.asm
|
---|
| 2 | ; Project name : Assembly Library
|
---|
| 3 | ; Created date : 13.8.2010
|
---|
[58] | 4 | ; Last update : 18.11.2010
|
---|
[41] | 5 | ; Author : Tomi Tilli
|
---|
| 6 | ; Description : Displays selection dialog.
|
---|
| 7 |
|
---|
[376] | 8 | ;
|
---|
| 9 | ; XTIDE Universal BIOS and Associated Tools
|
---|
| 10 | ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
|
---|
| 11 | ;
|
---|
| 12 | ; This program is free software; you can redistribute it and/or modify
|
---|
| 13 | ; it under the terms of the GNU General Public License as published by
|
---|
| 14 | ; the Free Software Foundation; either version 2 of the License, or
|
---|
| 15 | ; (at your option) any later version.
|
---|
| 16 | ;
|
---|
| 17 | ; This program is distributed in the hope that it will be useful,
|
---|
| 18 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | ; GNU General Public License for more details.
|
---|
| 21 | ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
---|
| 22 | ;
|
---|
| 23 |
|
---|
| 24 |
|
---|
[41] | 25 | ; Section containing code
|
---|
| 26 | SECTION .text
|
---|
| 27 |
|
---|
| 28 | ;--------------------------------------------------------------------
|
---|
| 29 | ; DialogSelection_GetSelectionToAXwithInputInDSSI
|
---|
| 30 | ; Parameters:
|
---|
| 31 | ; DS:SI: Ptr to DIALOG_INPUT
|
---|
| 32 | ; SS:BP: Ptr to parent MENU
|
---|
| 33 | ; Returns:
|
---|
| 34 | ; Nothing
|
---|
| 35 | ; Corrupts registers:
|
---|
| 36 | ; AX, BX, CX, DX, SI, DI
|
---|
| 37 | ;--------------------------------------------------------------------
|
---|
| 38 | ALIGN JUMP_ALIGN
|
---|
| 39 | DialogSelection_GetSelectionToAXwithInputInDSSI:
|
---|
| 40 | mov bx, SelectionEventHandler
|
---|
| 41 | jmp Dialog_DisplayWithDialogInputInDSSIandHandlerInBX
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | ;--------------------------------------------------------------------
|
---|
| 45 | ; SelectionEventHandler
|
---|
| 46 | ; Common parameters for all events:
|
---|
| 47 | ; BX: Menu event (anything from MENUEVENT struct)
|
---|
| 48 | ; SS:BP: Ptr to DIALOG
|
---|
| 49 | ; Common return values for all events:
|
---|
| 50 | ; CF: Set if event processed
|
---|
| 51 | ; Cleared if event not processed
|
---|
| 52 | ; Corrupts registers:
|
---|
| 53 | ; All
|
---|
| 54 | ;--------------------------------------------------------------------
|
---|
| 55 | ALIGN JUMP_ALIGN
|
---|
| 56 | SelectionEventHandler:
|
---|
| 57 | jmp [cs:bx+.rgfnEventHandlers]
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | ALIGN JUMP_ALIGN
|
---|
| 61 | .InitializeMenuinitFromDSSI:
|
---|
[52] | 62 | xor ax, ax
|
---|
| 63 | jmp Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX
|
---|
[41] | 64 |
|
---|
| 65 |
|
---|
| 66 | ALIGN WORD_ALIGN
|
---|
| 67 | .rgfnEventHandlers:
|
---|
| 68 | istruc MENUEVENT
|
---|
| 69 | at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI
|
---|
[58] | 70 | at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu
|
---|
[41] | 71 | at MENUEVENT.IdleProcessing, dw Dialog_EventNotHandled
|
---|
| 72 | at MENUEVENT.ItemHighlightedFromCX, dw Dialog_EventNotHandled
|
---|
| 73 | at MENUEVENT.ItemSelectedFromCX, dw Dialog_EventAnyThatClosesDialog
|
---|
| 74 | at MENUEVENT.KeyStrokeInAX, dw Dialog_EventNotHandled
|
---|
| 75 | at MENUEVENT.RefreshTitle, dw Dialog_EventRefreshTitle
|
---|
| 76 | at MENUEVENT.RefreshInformation, dw Dialog_EventRefreshInformation
|
---|
| 77 | at MENUEVENT.RefreshItemFromCX, dw Dialog_EventRefreshItemFromCX
|
---|
| 78 | iend
|
---|