Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm	(revision 491)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm	(revision 492)
@@ -24,13 +24,15 @@
 ; Displays Boot Menu and returns Drive or Function number.
 ;
-; BootMenu_DisplayAndReturnSelectionInDX
+; BootMenu_DisplayAndStoreSelection
 ;	Parameters:
 ;		DS:		RAMVARS segment
 ;	Returns:
-;		Nothing, selected drive is converted to hotkey
+;		DL:		Drive number selected
+;		CF:		Set if selected item is an actual drive, DL is valid
+;				Clear if selected item is Rom Boot, DL is invalid
 ;	Corrupts registers:
 ;		All General Purpose Registers
 ;--------------------------------------------------------------------
-BootMenu_DisplayAndStoreSelectionAsHotkey:
+BootMenu_DisplayAndReturnDriveInDLRomBootClearCF:
 	call	DriveXlate_Reset
 
@@ -38,9 +40,11 @@
 	CALL_MENU_LIBRARY	DisplayWithHandlerInBXandUserDataInDXAX
 
+	xchg	cx, ax
+		
 	; Clear Boot Menu from screen
 	mov		ax, ' ' | (MONO_NORMAL<<8)
 	CALL_DISPLAY_LIBRARY	ClearScreenWithCharInALandAttrInAH
-	ret
 
+	; fall through to BootMenu_GetDriveToDXforMenuitemInCX
 
 ;--------------------------------------------------------------------
@@ -52,12 +56,13 @@
 ;		DS:		RAMVARS segment
 ;       CF:     Set: There is a selected menu item, DL is valid
-;               Clear: There is no selected menu item, DL is not valid
+;               Clear: The item selected is Rom Boot, DL is not valid
 ;	Corrupts registers:
-;		AX, DI
+;		AX, BX, DI
+;
+; NOTE: We can't use the menu structure in here, as we are falling through
+; through from BootMenu_DisplayAndReturnDriveInDLRomBootClearCF when the
+; menu structure has already been destroyed.
 ;--------------------------------------------------------------------
 BootMenu_GetDriveToDXforMenuitemInCX:
-	cmp		cl, NO_ITEM_HIGHLIGHTED
-	je		SHORT .ReturnFloppyDriveInDX	; Clear CF if branch taken
-
 	mov		dl, cl							; Copy menuitem index to DX
 	call	FloppyDrive_GetCountToAX
@@ -65,8 +70,10 @@
 	jb		SHORT .ReturnFloppyDriveInDX	; Set CF if branch taken
 	or		al, 80h							; Or 80h into AL before the sub
-											; to cause CF to be set after
-											; and result has high order bit set
+											; shorter instruction than or'ing it in afterward
 	sub		dl, al							; Remove floppy drives from index
-
+	call	RamVars_GetHardDiskCountFromBDAtoAX
+	or		al, 80h							; Or 80h into AL before the sub				
+	cmp		dl, al							; Set CF if hard disk
+											; Clear CF if last item, beyond hard disk list, which indicates ROM boot
 .ReturnFloppyDriveInDX:
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm	(revision 491)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm	(revision 492)
@@ -21,25 +21,4 @@
 SECTION .text
 
-
-;--------------------------------------------------------------------
-; GetDefaultMenuitemToDL
-;	Parameters:
-;		DL:		Drive number
-;		ES:		Ptr to BDA (zero)
-;	Returns:
-;		DL:		Menuitem index (assuming drive is available)
-;	Corrupts registers:
-;		AX, DH
-;--------------------------------------------------------------------
-GetDefaultMenuitemToDX:
-	mov		dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters]
-	test	BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST
-	eCMOVZ	dl, dh
-	call	IsDriveDLinSystem
-	jnc		SHORT BootMenuEvent_Handler.DoNotSetDefaultMenuitem
-	call	DriveXlate_SetDriveToSwap
-	; Fall to GetMenuitemToDXforDriveInDL
-
-
 ;--------------------------------------------------------------------
 ; GetMenuitemToDXforDriveInDL
@@ -63,28 +42,4 @@
 
 ;--------------------------------------------------------------------
-; IsDriveDLinSystem
-;	Parameters:
-;		DL:		Drive number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set if drive number is valid
-;				Clear if drive is not present in system
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-IsDriveDLinSystem:
-	test	dl, dl								; Floppy drive?
-	jns		SHORT .IsFloppyDriveInSystem
-	call	RamVars_GetHardDiskCountFromBDAtoAX	; Hard Disk count to AX
-	or		al, 80h								; Set Hard Disk bit to AX
-	jmp		SHORT .CompareDriveNumberToDriveCount
-.IsFloppyDriveInSystem:
-	call	FloppyDrive_GetCountToAX
-.CompareDriveNumberToDriveCount:
-	cmp		dl, al								; Set CF when DL is smaller
-	ret
-
-
-;--------------------------------------------------------------------
 ; BootMenuEvent_Handler
 ;	Common parameters for all events:
@@ -115,5 +70,4 @@
 MENUEVENT_ItemHighlightedFromCX equ (EventItemHighlightedFromCX - FirstEvent)
 MENUEVENT_ItemSelectedFromCX equ (EventItemSelectedFromCX - FirstEvent)
-MENUEVENT_KeyStrokeInAX equ (EventKeyStrokeInAX - FirstEvent)
 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - FirstEvent)
 MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - FirstEvent)
@@ -164,5 +118,5 @@
 EventInitializeMenuinitFromSSBP:
 	; Store default Menuitem (=default drive to boot from)
-	call	GetDefaultMenuitemToDX
+	xor		dx, dx
 	mov		[bp+MENUINIT.wHighlightedItem], dx
 
@@ -172,6 +126,7 @@
 	call	FloppyDrive_GetCountToAX
 	add		ax, cx
+	inc		ax								; extra entry for ROM Boot item
 	mov		[bp+MENUINIT.wItems], ax
-
+				
 	; Store menu size
 	mov		WORD [bp+MENUINIT.wTitleAndInfoLines], BOOT_MENU_TITLE_AND_INFO_LINES
@@ -180,5 +135,4 @@
 	xchg	cx, ax
 	CALL_DISPLAY_LIBRARY	GetColumnsToALandRowsToAH
-	sub		ah, MENU_SCREEN_BOTTOM_LINES*2	; Leave space for Hotkey Bar
 	MIN_U	ah, cl
 	mov		[bp+MENUINIT.bHeight], ah
@@ -207,14 +161,10 @@
 EventItemHighlightedFromCX:
 	push	cx
+	call	DriveXlate_Reset		
 	call	BootMenu_GetDriveToDXforMenuitemInCX		
-	call	DriveXlate_Reset
+	jnc		.noDriveSwap		
 	call	DriveXlate_SetDriveToSwap
-
-	; We need to generate keystroke so selection two drives is possible.
-	; The secondary boot drive is selected by highlighting it using menu keys
-	; and the primary boot drive is selected by pressing drive letter hotkey.
-	call	BootVars_StoreHotkeyForDriveNumberInDL
-	call	RedrawHotkeyBarFromInsideMenuEventHandler
-
+.noDriveSwap:	
+		
 	; Redraw changes in drive numbers
 	xor		ax, ax	; Update first floppy drive (for translated drive number)
@@ -230,29 +180,5 @@
 	ret
 
-
-;--------------------------------------------------------------------
-; EventKeyStrokeInAX
-;	Parameters
-;		AL:		ASCII character for the key
-;		AH:		Keyboard library scan code for the key
-;		DS:		Ptr to RAMVARS
-;		ES:		Ptr to BDA (zero)
-;		SS:BP:	Menu library handle
-;	Returns:
-;		CF:		Set if event processed
-;				Cleared if event not processed
-;	Corrupts registers:
-;		Does not matter
-;--------------------------------------------------------------------
-EventKeyStrokeInAX:
-	cmp		ah, BOOT_MENU_HOTKEY_SCANCODE
-	je		SHORT BootMenuEvent_Completed	; Ignore Boot Menu hotkey
-	call	HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX
-	jnc		SHORT BootMenuEvent_Completed
-
-	; Hotkey is now stored to BOOTVARS and menu can be closed
-	jmp		SHORT CloseBootMenu
-
-
+		
 ;--------------------------------------------------------------------
 ; EventItemSelectedFromCX
@@ -269,9 +195,4 @@
 ;--------------------------------------------------------------------
 EventItemSelectedFromCX:
-	call	BootMenu_GetDriveToDXforMenuitemInCX
-	jnc		SHORT BootMenuEvent_Completed	; No menuitem selected
-
-	; Convert selected drive to hotkey keystroke
-	call	HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL
 	; Fall to CloseBootMenu
 
@@ -290,28 +211,7 @@
 	call	DriveXlate_Reset
 	CALL_MENU_LIBRARY	Close
-	; Fall to RedrawHotkeyBarFromInsideMenuEventHandler
-
-
-;--------------------------------------------------------------------
-; RedrawHotkeyBarFromInsideMenuEventHandler
-;	Parameters
-;		DS:		RAMVARS segment
-;		ES:		BDA segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI, DI
-;--------------------------------------------------------------------
-RedrawHotkeyBarFromInsideMenuEventHandler:
-	mov		al, MONO_NORMAL
-	CALL_DISPLAY_LIBRARY	SetCharacterAttributeFromAL
-
-	mov		bl, ATTRIBUTES_ARE_USED
-	mov		ax, TELETYPE_OUTPUT_WITH_ATTRIBUTE
-	CALL_DISPLAY_LIBRARY	SetCharOutputFunctionFromAXwithAttribFlagInBL
-	call	HotkeyBar_DrawToTopOfScreen
 	; Fall to BootMenuEvent_Completed
 
-
+		
 ;--------------------------------------------------------------------
 ; BootMenuEvent_Completed
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 491)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 492)
@@ -33,9 +33,11 @@
 ;--------------------------------------------------------------------
 BootMenuPrint_RefreshItem:
-	call	BootMenu_GetDriveToDXforMenuitemInCX
-	jnc		BootMenuEvent_Completed					; if no menu item selected, out we go
-
 	push	bp
 	mov		bp, sp
+
+	call	BootMenu_GetDriveToDXforMenuitemInCX
+	mov		si, g_szRomBootDash						; Standard "Rom Boot" but with a "-" at the front
+	mov		al, 20h									; The space between "Rom" and "Boot"
+	jnc		.ROMBoot								; display "Rom Boot" option for last entry
 
 	call	FindDPT_ForDriveNumberInDL
@@ -57,8 +59,16 @@
 	mov		ax, dx									; preserve DL for the floppy drive letter addition
 	call	DriveXlate_ToOrBack
+
+	test	dl, 0f0h								; if there is a character in the upper nibble
+	jnz		.noSpace
+	dec		si										; backup a character to a leading space
+.noSpace:
+
 	push	dx										; translated drive number
 	push	bx										; sub string
 	add		al, 'A'									; floppy drive letter (we always push this although
-	push	ax										; the hard disks don't ever use it, but it does no harm)
+													; the hard disks don't ever use it, but it does no harm)
+.ROMBoot:		
+	push	ax										
 
 	jmp		SHORT BootMenuPrint_RefreshInformation.FormatRelay
@@ -95,5 +105,5 @@
 
 	call	BootMenu_GetDriveToDXforMenuitemInCX
-	jnc		BootMenuEvent_Completed						; if no menu selection, abort
+	jnc		BootMenuEvent_Completed						; nothing to display if "Rom Boot" option
 
 	push	bp
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 491)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 492)
@@ -20,4 +20,81 @@
 ; Section containing code
 SECTION .text
+
+;--------------------------------------------------------------------
+; DriveXlate_ConvertDriveLetterInDLtoDriveNumber
+;	Parameters:
+;		DS:		RAMVARS segment
+;		DL:		Drive letter ('A'...)
+;	Returns:
+;		DL:		Drive number (0xh for Floppy Drives, 8xh for Hard Drives)
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+DriveXlate_ConvertDriveLetterInDLtoDriveNumber:
+	call	DriveXlate_GetLetterForFirstHardDriveToAX
+	cmp		dl, al
+	jb		SHORT .ConvertLetterInDLtoFloppyDriveNumber
+
+	; Convert letter in DL to Hard Drive number
+	sub		dl, al
+	or		dl, 80h
+	ret
+
+.ConvertLetterInDLtoFloppyDriveNumber:
+	sub		dl, DEFAULT_FLOPPY_DRIVE_LETTER
+	ret
+
+%ifdef MODULE_HOTKEY
+%if HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber <> DriveXlate_ConvertDriveLetterInDLtoDriveNumber
+	%error "DriveXlate_ConvertDriveLetterInDLtoDriveNumber must be at the top of DriveXlate.asm, and that file must immediately follow HotKeys.asm"
+%endif		
+%endif
+		
+;--------------------------------------------------------------------
+; DriveXlate_ConvertDriveNumberFromDLtoDriveLetter
+;	Parameters:
+;		DL:		Drive number (0xh for Floppy Drives, 8xh for Hard Drives)
+;		DS:		RAMVARS Segment
+;	Returns:
+;		DL:		Drive letter ('A'...)
+;		CF:		Set if Hard Drive
+;				Clear if Floppy Drive
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+DriveXlate_ConvertDriveNumberFromDLtoDriveLetter:
+	test	dl, dl
+	jns		SHORT .GetDefaultFloppyDrive
+
+	; Store default hard drive to boot from
+	call	DriveXlate_GetLetterForFirstHardDriveToAX
+	sub		dl, 80h
+	add		dl, al
+	stc
+	ret
+
+.GetDefaultFloppyDrive:
+	add		dl, DEFAULT_FLOPPY_DRIVE_LETTER		; Clears CF
+	ret
+
+
+;--------------------------------------------------------------------
+; Returns letter for first hard disk. Usually it will be 'C' but it
+; can be higher if more than two floppy drives are found.
+;
+; DriveXlate_GetLetterForFirstHardDriveToAX
+;	Parameters:
+;		DS:		RAMVARS segment
+;	Returns:
+;		AX:		Upper case letter for first hard disk
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+DriveXlate_GetLetterForFirstHardDriveToAX:
+	call	FloppyDrive_GetCountToAX
+	add		al, DEFAULT_FLOPPY_DRIVE_LETTER
+	MAX_U	al, DEFAULT_HARD_DRIVE_LETTER
+	ret
+				
 
 ;--------------------------------------------------------------------
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 491)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 492)
@@ -32,8 +32,8 @@
 ;--------------------------------------------------------------------
 HotkeyBar_UpdateDuringDriveDetection:
-	call	ScanHotkeysFromKeyBufferAndStoreToBootvars
+	call	HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars
 	; Fall to HotkeyBar_DrawToTopOfScreen
-
-
+		
+		
 ;--------------------------------------------------------------------
 ; HotkeyBar_DrawToTopOfScreen
@@ -66,11 +66,12 @@
 ;--------------------------------------------------------------------
 .PrintFloppyDriveHotkeys:
+	mov		cx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters]
+		
 	call	FloppyDrive_GetCountToAX
 	test	ax, ax		; Any Floppy Drives?
 	jz		SHORT .SkipFloppyDriveHotkeys
 
-	mov		di, DEFAULT_FLOPPY_DRIVE_LETTER | (ANGLE_QUOTE_RIGHT<<8)
-	mov		cl, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFddLetter]
-	mov		si, g_szFDD
+	mov		ax, (ANGLE_QUOTE_RIGHT << 8) | DEFAULT_FLOPPY_DRIVE_LETTER
+	mov		di, g_szFDD
 	call	FormatDriveHotkeyString
 
@@ -88,9 +89,8 @@
 ;		AX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
-	call	HotkeyBar_GetLetterForFirstHardDriveToAX
+	call	DriveXlate_GetLetterForFirstHardDriveToAX
 	mov		ah, ANGLE_QUOTE_RIGHT
-	xchg	di, ax
-	mov		cl, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bHddLetter]
-	mov		si, g_szHDD
+	mov		cl, ch
+	mov		di, g_szHDD
 	call	FormatDriveHotkeyString
 	; Fall to .PrintBootMenuHotkey
@@ -107,10 +107,26 @@
 .PrintBootMenuHotkey:
 %ifdef MODULE_BOOT_MENU
-	mov		ah, BOOT_MENU_HOTKEY_SCANCODE
-	mov		di, 'F' | ('2'<<8)		; F2
-	mov		si, g_szBootMenu
+	mov		ax, BOOT_MENU_HOTKEY_SCANCODE | ('2' << 8)
+	mov		di, g_szBootMenu
 	call	FormatFunctionHotkeyString
 %endif
-	; Fall to .PrintRomBootHotkey
+	; Fall to .PrintComDetectHotkey
+
+;--------------------------------------------------------------------
+; .PrintComDetectHotkey
+;	Parameters:
+;		ES:		BDA segment (zero)
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX, DX, SI, DI
+;--------------------------------------------------------------------
+.PrintComDetectHotkey:
+%ifdef MODULE_SERIAL
+	mov		ax, COM_DETECT_HOTKEY_SCANCODE | ('6' << 8)
+	mov		di, g_szHotComDetect
+	call	FormatFunctionHotkeyString
+%endif
+	; Fall to .PrintRomBootHotkey		
 
 ;--------------------------------------------------------------------
@@ -124,7 +140,6 @@
 ;--------------------------------------------------------------------
 .PrintRomBootHotkey:
-	mov		ah, ROM_BOOT_HOTKEY_SCANCODE
-	mov		di, 'F' | ('8'<<8)		; F8
-	mov		si, g_szRomBoot
+	mov		ax, ROM_BOOT_HOTKEY_SCANCODE | ('8' << 8)
+	mov		di, g_szRomBoot
 	call	FormatFunctionHotkeyString
 	; Fall to .EndHotkeyBarRendering
@@ -168,6 +183,6 @@
 ;	Parameters:
 ;		CL:			Drive letter hotkey from BOOTVARS
-;		DI low:		First character for drive key string
-;		DI high:	Second character for drive key string (ANGLE_QUOTE_RIGHT)
+;		AL:			First character for drive key string
+;		AH:			Second character for drive key string (ANGLE_QUOTE_RIGHT)
 ;		SI:			Offset to hotkey description string
 ;		ES:			BDA segment (zero)
@@ -177,16 +192,14 @@
 ;		AX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
-FormatDriveHotkeyString:
-	ePUSH_T	ax, PushHotkeyParamsAndFormat
-	jmp		SHORT GetNonSelectedHotkeyDescriptionAttributeToDX
-
+;; No work to do before going into FormatFunctionHotkeyString
+FormatDriveHotkeyString  equ  GetNonSelectedHotkeyDescriptionAttributeToDX
 
 ;--------------------------------------------------------------------
 ; FormatFunctionHotkeyString
 ;	Parameters:
-;		AH:			Hotkey scancode to compare with BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode
+;		AL:			Scancode of function key, to know which if any to show as selected
+;					Later replaced with an 'F' for the call to the output routine
+;		AH:			Second character for drive key string
 ;		SI:			Offset to hotkey description string
-;		DI low:		First character for drive key string
-;		DI high:	Second character for drive key string
 ;		ES:			BDA segment (zero)
 ;	Returns:
@@ -196,48 +209,32 @@
 ;--------------------------------------------------------------------
 FormatFunctionHotkeyString:
-	ePUSH_T	ax, PushHotkeyParamsAndFormat
-	mov		cx, g_szBoot		; Description parameter string
-	cmp		[es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ah
-	jne		SHORT GetNonSelectedHotkeyDescriptionAttributeToDX
-	; Fall to GetSelectedHotkeyDescriptionAttributeToDX
-
-
-;--------------------------------------------------------------------
-; GetSelectedHotkeyDescriptionAttributeToDX
-; GetNonSelectedHotkeyDescriptionAttributeToDX
-;	Parameters:
-;		CF:		Set if selected hotkey
-;				Cleared if unselected hotkey
-;		ES:		BDA segment (zero)
-;	Returns:
-;		DX:		Description Attribute
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
+	xor		cx, cx		; Null character, eaten in output routines
+
+	cmp		[es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], al
+	mov		al, 'F'		; Replace scancode with character for output
+
 %ifdef MODULE_BOOT_MENU
-GetSelectedHotkeyDescriptionAttributeToDX:
-	push	si
+
 	mov		si, ATTRIBUTE_CHARS.cHurryTimeout		; Selected hotkey
-	jmp		SHORT GetDescriptionAttributeToDX
+	jz		SHORT GetDescriptionAttributeToDX		; From compare with bScancode above
 
 GetNonSelectedHotkeyDescriptionAttributeToDX:
-	push	si
 	mov		si, ATTRIBUTE_CHARS.cHighlightedItem	; Unselected hotkey
 
 	; Display Library should not be called like this
 GetDescriptionAttributeToDX:
+	xchg	dx, ax
 	call	MenuAttribute_GetToAXfromTypeInSI
-	pop		si
 	xchg	dx, ax					; DX = Description attribute
-	ret
-
-%else	; No boot menu so use simpler attributes
-
-GetSelectedHotkeyDescriptionAttributeToDX:
+	;;  fall through to PushHotkeyParamsAndFormat 
+
+%else ; MODULE_BOOT_MENU - No boot menu so use simpler attributes
+
 	mov		dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK
-	jmp		SHORT SelectAttributeFromDHorDLbasedOnVideoMode
+	jz		SHORT SelectAttributeFromDHorDLbasedOnVideoMode			; From compare with bScancode above
 
 GetNonSelectedHotkeyDescriptionAttributeToDX:
 	mov		dx, (COLOR_ATTRIBUTE(COLOR_BLACK, COLOR_CYAN) << 8) | MONO_REVERSE
+
 SelectAttributeFromDHorDLbasedOnVideoMode:
 	mov		al, [es:BDA.bVidMode]
@@ -248,7 +245,7 @@
 	mov		dl, dh
 .AttributeLoadedToDL:
-	ret
-
-%endif
+	;;  fall through to PushHotkeyParamsAndFormat 		
+
+%endif ; MODULE_BOOT_MENU
 
 
@@ -256,9 +253,9 @@
 ; PushHotkeyParamsAndFormat
 ;	Parameters:
-;		DI low:		First character
-;		DI high:	Second character
+;		BL:			First character
+;		BH:			Second character
 ;		DX:			Description Attribute
 ;		CX:			Description string parameter
-;		CS:SI:		Description string
+;		CS:DI:		Description string
 ;	Returns:
 ;		Nothing
@@ -270,16 +267,17 @@
 	mov		bp, sp
 
-	mov		ax, MONO_BRIGHT
-	push	ax				; Key attribute
-	xchg	ax, di
-	push	ax				; First character
-	xchg	al, ah
-	push	ax				; Second character
+	mov		si, MONO_BRIGHT
+
+	push	si				; Key attribute
+	push	ax				; First Character
+	mov		al, ah
+	push	ax				; Second Character
 
 	push	dx				; Description attribute
-	push	si				; Description string
+	push	di				; Description string
 	push	cx				; Description string parameter
-
-	push	di				; Key attribute for last space
+		
+	push	si				; Key attribute for last space
+
 	mov		si, g_szHotkey
 	jmp		DetectPrint_FormatCSSIfromParamsInSSBP
@@ -332,18 +330,18 @@
 
 ;--------------------------------------------------------------------
-; ScanHotkeysFromKeyBufferAndStoreToBootvars
-;	Parameters:
-;		DS:		RAMVARS segment
-;		ES:		BDA segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-ScanHotkeysFromKeyBufferAndStoreToBootvars:
+; HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars
+;	Parameters:
+;		DS:		RAMVARS segment
+;		ES:		BDA segment (zero)
+;	Returns:
+;		AL:		Last scancode value
+;	Corrupts registers:
+;		AH, CX
+;--------------------------------------------------------------------
+HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars:
 	call	Keyboard_GetKeystrokeToAX
 	jz		SHORT NoHotkeyToProcess
 
-	ePUSH_T	cx, ScanHotkeysFromKeyBufferAndStoreToBootvars
+	ePUSH_T	cx, HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars
 	; Fall to HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX
 
@@ -357,32 +355,28 @@
 ;		ES:		BDA segment (zero)
 ;	Returns:
-;		CF:		Set if valid keystroke
-;				Clear if invalid keystroke
-;	Corrupts registers:
-;		AX, CX, DI
+;       AL:     Last scancode seen
+;	Corrupts registers:
+;		AH, CX, DI
 ;--------------------------------------------------------------------
 HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX:
-	; Boot menu
-%ifdef MODULE_BOOT_MENU
-	cmp		ah, BOOT_MENU_HOTKEY_SCANCODE	; Display Boot Menu?
-	je		SHORT .StoreFunctionHotkeyFromAH
-%endif
-
-	; ROM Boot
-	cmp		ah, ROM_BOOT_HOTKEY_SCANCODE	; ROM Boot?
-	je		SHORT .StoreFunctionHotkeyFromAH
-
+	mov		di, BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode
+
+	; All scancodes are saved, even if it wasn't a drive letter,
+	; which also covers our function key case.  Invalid function keys
+	; will not do anything (won't be printed, won't be accepted as input)		
+	mov		[es:di], ah
+		
 	; Drive letter hotkeys remaining, allow 'a' to 'z'
 	call	Char_IsLowerCaseLetterInAL
-	jnc		SHORT .KeystrokeIsNotValidHotkey
+	jnc		SHORT .KeystrokeIsNotValidDriveLetter
 	xor		al, 32					; We want to print upper case letters
 
 	; Clear HD First flag to assume Floppy Drive hotkey
-	mov		di, BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags
+	dec		di
 	and		BYTE [es:di], ~FLG_HOTKEY_HD_FIRST
 
 	; Determine if Floppy or Hard Drive hotkey
 	eMOVZX	cx, al					; Clear CH to clear scancode
-	call	HotkeyBar_GetLetterForFirstHardDriveToAX
+	call	DriveXlate_GetLetterForFirstHardDriveToAX
 	cmp		cl, al
 	jb		SHORT .StoreDriveLetter	; Store Floppy Drive letter
@@ -392,109 +386,33 @@
 
 .StoreDriveLetter:
-	adc		di, BYTE 1			; Add CF if Floppy Drive
+	sbb		di, BYTE 1			; Sub CF if Floppy Drive
 	xchg	ax, cx
 	mov		[es:di], al			; AH = zero to clear function hotkey
 
-.StoreFunctionHotkeyFromAH:
-	mov		[es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ah
-	stc		; Valid hotkey
-
-.KeystrokeIsNotValidHotkey:
+.KeystrokeIsNotValidDriveLetter:		
 NoHotkeyToProcess:
+	mov		al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode]
 	ret
 
-
-;--------------------------------------------------------------------
-; HotkeyBar_GetSecondaryBootDriveNumberToDL
-; HotkeyBar_GetPrimaryBootDriveNumberToDL
-;	Parameters:
-;		DS:		RAMVARS segment
-;		ES:		BDA segment (zero)
-;	Returns:
-;		DL:		Drive selected as boot device
-;	Corrupts registers:
-;		AX, DH
-;--------------------------------------------------------------------
-HotkeyBar_GetSecondaryBootDriveNumberToDL:
+;--------------------------------------------------------------------
+; HotkeyBar_GetBootDriveNumbersToDX
+;	Parameters:
+;		DS:		RAMVARS segment
+;		ES:		BDA segment (zero)
+;	Returns:
+;		DX:		Drives selected as boot device, DL is primary
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+HotkeyBar_GetBootDriveNumbersToDX:
 	mov		dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters]
+	test	BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST		
+	jnz		.noflip
 	xchg	dl, dh
-	jmp		SHORT GetBootDriveNumberFromLettersInDX
-
-HotkeyBar_GetPrimaryBootDriveNumberToDL:
-	mov		dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters]
-GetBootDriveNumberFromLettersInDX:
-	test	BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST
-	eCMOVZ	dl, dh
-	; Fall to HotkeyBar_ConvertDriveLetterInDLtoDriveNumber
-
-
-;--------------------------------------------------------------------
-; HotkeyBar_ConvertDriveLetterInDLtoDriveNumber
-;	Parameters:
-;		DS:		RAMVARS segment
-;		DL:		Drive letter ('A'...)
-;	Returns:
-;		DL:		Drive number (0xh for Floppy Drives, 8xh for Hard Drives)
-;	Corrupts registers:
-;		AX, DH
-;--------------------------------------------------------------------
-HotkeyBar_ConvertDriveLetterInDLtoDriveNumber:
-	call	HotkeyBar_GetLetterForFirstHardDriveToAX
-	cmp		dl, al
-	jb		SHORT .ConvertLetterInDLtoFloppyDriveNumber
-
-	; Convert letter in DL to Hard Drive number
-	sub		dl, al
-	or		dl, 80h
-	ret
-
-.ConvertLetterInDLtoFloppyDriveNumber:
-	sub		dl, DEFAULT_FLOPPY_DRIVE_LETTER
-	ret
-
-
-;--------------------------------------------------------------------
-; HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter
-;	Parameters:
-;		DL:		Drive number (0xh for Floppy Drives, 8xh for Hard Drives)
-;		DS:		RAMVARS Segment
-;	Returns:
-;		DL:		Drive letter ('A'...)
-;		CF:		Set if Hard Drive
-;				Clear if Floppy Drive
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter:
-	test	dl, dl
-	jns		SHORT .GetDefaultFloppyDrive
-
-	; Store default hard drive to boot from
-	call	HotkeyBar_GetLetterForFirstHardDriveToAX
-	sub		dl, 80h
-	add		dl, al
-	stc
-	ret
-
-.GetDefaultFloppyDrive:
-	add		dl, DEFAULT_FLOPPY_DRIVE_LETTER		; Clears CF
-	ret
-
-
-;--------------------------------------------------------------------
-; Returns letter for first hard disk. Usually it will be 'C' but it
-; can be higher if more than two floppy drives are found.
-;
-; HotkeyBar_GetLetterForFirstHardDriveToAX
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		AX:		Upper case letter for first hard disk
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-HotkeyBar_GetLetterForFirstHardDriveToAX:
-	call	FloppyDrive_GetCountToAX
-	add		al, DEFAULT_FLOPPY_DRIVE_LETTER
-	MAX_U	al, DEFAULT_HARD_DRIVE_LETTER
-	ret
+.noflip:	
+	call	DriveXlate_ConvertDriveLetterInDLtoDriveNumber
+	xchg	dl, dh
+	; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber		
+		
+HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber:		
+
