Changeset 183 in xtideuniversalbios for trunk/Assembly_Library
- Timestamp:
- Nov 15, 2011, 4:35:14 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/Assembly_Library
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/MenuEvents.inc
r58 r183 19 19 ; All 20 20 ;-------------------------------------------------------------------- 21 22 ; 23 ; There are two ways to use MENUEVENT: 24 ; 25 ; 1. If the program needs two different menus, include the definition of the MENUEVENT structure below, 26 ; instantiate with members that point to the routines that make up the menu. 27 ; 28 ; 2. If the program needs only one menu, %define MENUEVENT_INLINE_OFFSETS before this include file, 29 ; and define (through EQU statements) each of the entry points as offsets from a base address. 30 ; Entry points must be within 256 bytes of the base (only a byte is used to pass the offset). 31 ; 32 33 %ifndef MENUEVENT_INLINE_OFFSETS 34 21 35 struc MENUEVENT 22 36 ; Parameters: … … 25 39 ; DS:SI: Ptr to initialized MENUINIT struct 26 40 .InitializeMenuinitFromDSSI resb 2 41 %define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI 27 42 28 43 ; Parameters: … … 32 47 ; Clear to cancel exit 33 48 .ExitMenu resb 2 49 %define MENUEVENT_ExitMenu MENUEVENT.ExitMenu 34 50 35 51 ; Parameters: 36 52 ; None 37 53 .IdleProcessing resb 2 54 %define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing 38 55 39 56 ; Parameters: … … 41 58 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED 42 59 .ItemHighlightedFromCX resb 2 60 %define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX 43 61 44 62 ; Parameters: 45 63 ; CX: Index of selected item 46 64 .ItemSelectedFromCX resb 2 65 %define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX 47 66 48 67 ; Parameters: … … 50 69 ; AH: Keyboard library scan code for the key 51 70 .KeyStrokeInAX resb 2 71 %define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX 52 72 53 73 ; Parameters: … … 56 76 .RefreshTitle resb 2 57 77 .RefreshInformation resb 2 78 %define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle 79 %define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation 58 80 59 81 ; Parameters: … … 61 83 ; Cursor has been positioned to the beginning of item line 62 84 .RefreshItemFromCX resb 2 85 %define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX 63 86 endstruc 64 87 88 %endif ; MENUEVENTS_INLINE_OFFSETS 65 89 66 90 %endif ; MENUEVENTS_INC -
trunk/Assembly_Library/Src/Menu/MenuEvent.asm
r133 r183 21 21 pop ds 22 22 mov si, bp 23 mov bl, MENUEVENT .InitializeMenuinitFromDSSI23 mov bl, MENUEVENT_InitializeMenuinitFromDSSI 24 24 jmp SHORT MenuEvent_SendFromBX 25 25 … … 37 37 ALIGN JUMP_ALIGN 38 38 MenuEvent_ExitMenu: 39 mov bl, MENUEVENT .ExitMenu39 mov bl, MENUEVENT_ExitMenu 40 40 jmp SHORT MenuEvent_SendFromBX 41 41 … … 53 53 ALIGN JUMP_ALIGN 54 54 MenuEvent_IdleProcessing: 55 mov bl, MENUEVENT .IdleProcessing55 mov bl, MENUEVENT_IdleProcessing 56 56 jmp SHORT MenuEvent_SendFromBX 57 57 … … 71 71 ALIGN JUMP_ALIGN 72 72 MenuEvent_RefreshTitle: 73 mov bl, MENUEVENT .RefreshTitle73 mov bl, MENUEVENT_RefreshTitle 74 74 SKIP2B cx ; mov cx, <next instruction> 75 75 76 76 MenuEvent_RefreshInformation: 77 mov bl, MENUEVENT .RefreshInformation77 mov bl, MENUEVENT_RefreshInformation 78 78 mov cx, [bp+MENUINIT.wHighlightedItem] 79 79 jmp SHORT MenuEvent_SendFromBX … … 94 94 ALIGN JUMP_ALIGN 95 95 MenuEvent_RefreshItemFromCX: 96 mov bl, MENUEVENT .RefreshItemFromCX96 mov bl, MENUEVENT_RefreshItemFromCX 97 97 jmp SHORT MenuEvent_SendFromBX 98 98 … … 114 114 push dx 115 115 116 mov bl, MENUEVENT .ItemHighlightedFromCX116 mov bl, MENUEVENT_ItemHighlightedFromCX 117 117 call MenuEvent_SendFromBX 118 118 … … 137 137 ALIGN JUMP_ALIGN 138 138 MenuEvent_KeyStrokeInAX: 139 mov bl, MENUEVENT .KeyStrokeInAX139 mov bl, MENUEVENT_KeyStrokeInAX 140 140 SKIP2B dx ; mov dx, <next instruction> 141 141 … … 153 153 ;-------------------------------------------------------------------- 154 154 MenuEvent_ItemSelectedFromCX: 155 mov bl, MENUEVENT .ItemSelectedFromCX155 mov bl, MENUEVENT_ItemSelectedFromCX 156 156 ; Fall to MenuEvent_SendFromBX 157 157
Note:
See TracChangeset
for help on using the changeset viewer.