- Timestamp:
- Nov 15, 2011, 4:35:14 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk
- Files:
-
- 4 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 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r140 r183 24 24 ALIGN JUMP_ALIGN 25 25 BootMenuEvent_Handler: 26 27 %ifdef MENUEVENT_INLINE_OFFSETS 28 29 add bx, BootMenuEvent_Handler 30 jmp bx 31 32 %else 33 26 34 cmp bx, BYTE MENUEVENT.RefreshItemFromCX ; Above last supported item? 27 35 ja SHORT .EventNotHandled 28 36 jmp [cs:bx+.rgfnEventSpecificHandlers] 37 38 %endif 39 29 40 .EventNotHandled: 30 41 clc 31 42 ret 32 43 44 %ifdef MENUEVENT_INLINE_OFFSETS 45 46 MENUEVENT_InitializeMenuinitFromDSSI equ (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler) 47 MENUEVENT_ExitMenu equ (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler) 48 MENUEVENT_IdleProcessing equ (BootMenuEvent_Handler.EventNotHandled - BootMenuEvent_Handler) 49 MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler) 50 MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler) 51 MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler) 52 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler) 53 MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler) 54 MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler) 55 56 %else 57 33 58 ALIGN WORD_ALIGN 34 59 .rgfnEventSpecificHandlers: … … 42 67 dw .RefreshInformation ; MENUEVENT.RefreshInformation 43 68 dw .RefreshItemFromCX ; MENUEVENT.RefreshItemFromCX 69 70 %endif 44 71 45 72 -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r181 r183 15 15 ORG 000h ; Code start offset 0000h 16 16 17 17 %define MENUEVENT_INLINE_OFFSETS ; Only one menu required, save space and inline offsets 18 18 19 ; Included .inc files 19 20 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first! … … 150 151 iend 151 152 152 153 153 ; Libraries and data 154 154 %include "AssemblyLibrary.asm" … … 170 170 %include "BootMenu.asm" ; For Boot Menu operations 171 171 %include "BootMenuEvent.asm" ; For menu library event handling 172 %include "BootMenuPrint.asm" ; For printing Boot Menu strings (needs to come after BootMenuEvent.asm) 172 173 %include "FloppyDrive.asm" ; Floppy Drive related functions 173 174 %include "BootSector.asm" ; For loading boot sector 174 175 %include "BootPrint.asm" ; For printing boot information 175 %include "BootMenuPrint.asm" ; For printing Boot Menu strings176 176 %include "BootMenuPrintCfg.asm" ; For printing hard disk configuration 177 177
Note:
See TracChangeset
for help on using the changeset viewer.