Index: /trunk/Assembly_Library/Inc/MenuEvents.inc
===================================================================
--- /trunk/Assembly_Library/Inc/MenuEvents.inc	(revision 182)
+++ /trunk/Assembly_Library/Inc/MenuEvents.inc	(revision 183)
@@ -19,4 +19,18 @@
 ;		All
 ;--------------------------------------------------------------------
+
+;
+; There are two ways to use MENUEVENT:
+;
+; 1. If the program needs two different menus, include the definition of the MENUEVENT structure below,
+;    instantiate with members that point to the routines that make up the menu.
+;
+; 2. If the program needs only one menu, %define MENUEVENT_INLINE_OFFSETS before this include file,
+;    and define (through EQU statements) each of the entry points as offsets from a base address.  
+;    Entry points must be within 256 bytes of the base (only a byte is used to pass the offset).
+;
+
+%ifndef MENUEVENT_INLINE_OFFSETS
+
 struc MENUEVENT
 	; Parameters:
@@ -25,4 +39,5 @@
 	;	DS:SI:		Ptr to initialized MENUINIT struct
 	.InitializeMenuinitFromDSSI		resb	2
+%define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI
 
 	; Parameters:
@@ -32,8 +47,10 @@
 	;				Clear to cancel exit
 	.ExitMenu						resb	2
+%define MENUEVENT_ExitMenu MENUEVENT.ExitMenu
 
 	; Parameters:
 	;	None
 	.IdleProcessing					resb	2
+%define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing
 
 	; Parameters:
@@ -41,8 +58,10 @@
 	;	DX:			Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
 	.ItemHighlightedFromCX			resb	2
+%define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX
 
 	; Parameters:
 	;	CX:			Index of selected item
 	.ItemSelectedFromCX				resb	2
+%define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX
 
 	; Parameters:
@@ -50,4 +69,5 @@
 	;	AH:			Keyboard library scan code for the key
 	.KeyStrokeInAX					resb	2
+%define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX
 
 	; Parameters:
@@ -56,4 +76,6 @@
 	.RefreshTitle					resb	2
 	.RefreshInformation				resb	2
+%define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle
+%define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation
 
 	; Parameters:
@@ -61,6 +83,8 @@
 	;	Cursor has been positioned to the beginning of item line
 	.RefreshItemFromCX				resb	2
+%define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX
 endstruc
 
+%endif ; MENUEVENTS_INLINE_OFFSETS
 
 %endif ; MENUEVENTS_INC
Index: /trunk/Assembly_Library/Src/Menu/MenuEvent.asm
===================================================================
--- /trunk/Assembly_Library/Src/Menu/MenuEvent.asm	(revision 182)
+++ /trunk/Assembly_Library/Src/Menu/MenuEvent.asm	(revision 183)
@@ -21,5 +21,5 @@
 	pop		ds
 	mov		si, bp
-	mov		bl, MENUEVENT.InitializeMenuinitFromDSSI
+	mov		bl, MENUEVENT_InitializeMenuinitFromDSSI
 	jmp		SHORT MenuEvent_SendFromBX
 
@@ -37,5 +37,5 @@
 ALIGN JUMP_ALIGN
 MenuEvent_ExitMenu:
-	mov		bl, MENUEVENT.ExitMenu
+	mov		bl, MENUEVENT_ExitMenu
 	jmp		SHORT MenuEvent_SendFromBX
 
@@ -53,5 +53,5 @@
 ALIGN JUMP_ALIGN
 MenuEvent_IdleProcessing:
-	mov		bl, MENUEVENT.IdleProcessing
+	mov		bl, MENUEVENT_IdleProcessing
 	jmp		SHORT MenuEvent_SendFromBX
 
@@ -71,9 +71,9 @@
 ALIGN JUMP_ALIGN
 MenuEvent_RefreshTitle:
-	mov		bl, MENUEVENT.RefreshTitle
+	mov		bl, MENUEVENT_RefreshTitle
 	SKIP2B	cx	; mov cx, <next instruction>
 
 MenuEvent_RefreshInformation:
-	mov		bl, MENUEVENT.RefreshInformation
+	mov		bl, MENUEVENT_RefreshInformation
 	mov		cx, [bp+MENUINIT.wHighlightedItem]
 	jmp		SHORT MenuEvent_SendFromBX
@@ -94,5 +94,5 @@
 ALIGN JUMP_ALIGN
 MenuEvent_RefreshItemFromCX:
-	mov		bl, MENUEVENT.RefreshItemFromCX
+	mov		bl, MENUEVENT_RefreshItemFromCX
 	jmp		SHORT MenuEvent_SendFromBX
 
@@ -114,5 +114,5 @@
 	push	dx
 
-	mov		bl, MENUEVENT.ItemHighlightedFromCX
+	mov		bl, MENUEVENT_ItemHighlightedFromCX
 	call	MenuEvent_SendFromBX
 
@@ -137,5 +137,5 @@
 ALIGN JUMP_ALIGN
 MenuEvent_KeyStrokeInAX:
-	mov		bl, MENUEVENT.KeyStrokeInAX
+	mov		bl, MENUEVENT_KeyStrokeInAX
 	SKIP2B	dx	; mov dx, <next instruction>
 
@@ -153,5 +153,5 @@
 ;--------------------------------------------------------------------
 MenuEvent_ItemSelectedFromCX:
-	mov		bl, MENUEVENT.ItemSelectedFromCX
+	mov		bl, MENUEVENT_ItemSelectedFromCX
 	; Fall to MenuEvent_SendFromBX
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 182)
+++ /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 183)
@@ -24,11 +24,36 @@
 ALIGN JUMP_ALIGN
 BootMenuEvent_Handler:
+		
+%ifdef MENUEVENT_INLINE_OFFSETS
+		
+	add		bx, BootMenuEvent_Handler
+	jmp		bx
+		
+%else
+		
 	cmp		bx, BYTE MENUEVENT.RefreshItemFromCX	; Above last supported item?
 	ja		SHORT .EventNotHandled
 	jmp		[cs:bx+.rgfnEventSpecificHandlers]
+		
+%endif
+		
 .EventNotHandled:
 	clc
 	ret
 
+%ifdef MENUEVENT_INLINE_OFFSETS
+		
+MENUEVENT_InitializeMenuinitFromDSSI equ  (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler)
+MENUEVENT_ExitMenu equ  (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler)
+MENUEVENT_IdleProcessing equ (BootMenuEvent_Handler.EventNotHandled - BootMenuEvent_Handler)
+MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler)
+MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler)
+MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler)
+MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler)
+MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler)
+MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler)
+
+%else
+		
 ALIGN WORD_ALIGN
 .rgfnEventSpecificHandlers:
@@ -42,4 +67,6 @@
 	dw		.RefreshInformation			; MENUEVENT.RefreshInformation
 	dw		.RefreshItemFromCX			; MENUEVENT.RefreshItemFromCX
+		
+%endif
 
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 182)
+++ /trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 183)
@@ -15,5 +15,6 @@
 ORG 000h						; Code start offset 0000h
 
-
+%define MENUEVENT_INLINE_OFFSETS    ; Only one menu required, save space and inline offsets
+		
 	; Included .inc files
 	%include "AssemblyLibrary.inc"	; Assembly Library. Must be included first!
@@ -150,5 +151,4 @@
 iend
 
-
 	; Libraries and data
 	%include "AssemblyLibrary.asm"
@@ -170,8 +170,8 @@
 	%include "BootMenu.asm"			; For Boot Menu operations
 	%include "BootMenuEvent.asm"	; For menu library event handling
+	%include "BootMenuPrint.asm"	; For printing Boot Menu strings (needs to come after BootMenuEvent.asm)
 	%include "FloppyDrive.asm"		; Floppy Drive related functions
 	%include "BootSector.asm"		; For loading boot sector
 	%include "BootPrint.asm"		; For printing boot information
-	%include "BootMenuPrint.asm"	; For printing Boot Menu strings
 	%include "BootMenuPrintCfg.asm"	; For printing hard disk configuration
 
