Index: trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 120)
+++ trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 121)
@@ -32,3 +32,79 @@
 
 
+;--------------------------------------------------------------------
+; Stores POST stack pointer to BOOTVARS.
+;
+; STORE_POST_STACK_POINTER
+;	Parameters:
+;		DS:		BDA and Interrupt Vector segment (zero)
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro STORE_POST_STACK_POINTER 0
+	mov		[BOOTVARS.dwPostStack], sp
+	mov		[BOOTVARS.dwPostStack+2], ss
+%endmacro
+
+
+;--------------------------------------------------------------------
+; Initializes stack for boot menu usage.
+; POST stack is not large enough when DPTs are stored to 30:0h.
+;
+; Note regarding LOAD_BDA_SEGMENT_TO: If you force the use of SP
+; then you also have to unconditionally enable the CLI/STI pair.
+; The reason for this is that only some buggy 808x CPU:s need the
+; CLI/STI instruction pair when changing stacks. Other CPU:s disable
+; interrupts automatically when SS is modified for the duration of
+; the immediately following instruction to give time to change SP.
+;
+; SWITCH_TO_BOOT_MENU_STACK
+;	Parameters:
+;		Nothing
+;	Returns:
+;		SS:SP:	Pointer to top of Boot Menu stack
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro SWITCH_TO_BOOT_MENU_STACK 0
+%ifndef USE_186
+	cli									; Disable interrupts
+%endif
+	LOAD_BDA_SEGMENT_TO	ss, sp
+	mov		sp, BOOTVARS.rgbMnuStack	; Load offset to stack
+%ifndef USE_186
+	sti									; Enable interrupts
+%endif
+%endmacro
+
+
+;--------------------------------------------------------------------
+; Restores SS and SP to initial boot loader values.
+;
+; Before doing any changes, see the note regarding
+; LOAD_BDA_SEGMENT_TO in BootVars_SwitchToBootMenuStack
+;
+; SWITCH_BACK_TO_POST_STACK
+;	Parameters:
+;		Nothing
+;	Returns:
+;		SS:SP:	Ptr to POST stack
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro SWITCH_BACK_TO_POST_STACK 0
+%ifndef USE_386
+	cli									; Disable interrupts
+	LOAD_BDA_SEGMENT_TO	ss, sp
+	mov		sp, [ss:BOOTVARS.dwPostStack]
+	mov		ss, [ss:BOOTVARS.dwPostStack+2]
+	sti									; Enable interrupts
+%else
+	LOAD_BDA_SEGMENT_TO	ss, sp
+	lss		sp, [ss:BOOTVARS.dwPostStack]
+%endif
+%endmacro
+
+
 %endif ; BOOTVARS_INC
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 120)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 121)
@@ -67,6 +67,10 @@
 	add		si, BYTE ATA1.strModel		; DS:SI now points drive name
 	lea		di, [bx+BOOTNFO.szDrvName]	; ES:DI now points to name destination
-	mov		cx, LEN_BOOTNFO_DRV
-	call	Memory_CopyCXbytesFromDSSItoESDI
+	mov		cx, LEN_BOOTNFO_DRV / 2		; Max number of WORDs allowed
+.CopyNextWord:
+	lodsw
+	xchg	al, ah						; Change endianness
+	stosw
+	loop	.CopyNextWord
 	xor		ax, ax
 	stosb								; Terminate with NULL
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm	(revision 120)
+++ 	(revision )
@@ -1,86 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Functions to access BOOTVARS struct.
-
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Stores POST stack pointer to BOOTVARS.
-;
-; BootVars_StorePostStackPointer
-;	Parameters:
-;		DS:		BDA and Interrupt Vector segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootVars_StorePostStackPointer:
-	pop		ax							; Pop return address
-	mov		[BOOTVARS.dwPostStack], sp
-	mov		[BOOTVARS.dwPostStack+2], ss
-	jmp		ax
-
-
-;--------------------------------------------------------------------
-; Initializes stack for boot menu usage.
-; POST stack is not large enough when DPTs are stored to 30:0h.
-;
-; Note regarding LOAD_BDA_SEGMENT_TO: If you force the use of SP
-; then you also have to unconditionally enable the CLI/STI pair.
-; The reason for this is that only some buggy 808x CPU:s need the
-; CLI/STI instruction pair when changing stacks. Other CPU:s disable
-; interrupts automatically when SS is modified for the duration of
-; the immediately following instruction to give time to change SP.
-;
-; BootVars_SwitchToBootMenuStack
-;	Parameters:
-;		Nothing
-;	Returns:
-;		SS:SP:	Pointer to top of Boot Menu stack
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootVars_SwitchToBootMenuStack:
-	pop		ax							; Pop return address
-%ifndef USE_186
-	cli									; Disable interrupts
-%endif
-	LOAD_BDA_SEGMENT_TO	ss, sp
-	mov		sp, BOOTVARS.rgbMnuStack	; Load offset to stack
-%ifndef USE_186
-	sti									; Enable interrupts
-%endif
-	jmp		ax
-
-
-;--------------------------------------------------------------------
-; Restores SS and SP to initial boot loader values.
-;
-; Before doing any changes, see the note regarding
-; LOAD_BDA_SEGMENT_TO in BootVars_SwitchToBootMenuStack
-;
-; BootVars_SwitchBackToPostStack
-;	Parameters:
-;		Nothing
-;	Returns:
-;		SS:SP:	Ptr to POST stack
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootVars_SwitchBackToPostStack:
-	pop		ax							; Pop return address
-%ifndef USE_386
-	cli									; Disable interrupts
-	LOAD_BDA_SEGMENT_TO	ss, sp
-	mov		sp, [ss:BOOTVARS.dwPostStack]
-	mov		ss, [ss:BOOTVARS.dwPostStack+2]
-	sti									; Enable interrupts
-%else
-	LOAD_BDA_SEGMENT_TO	ss, sp
-	lss		sp, [ss:BOOTVARS.dwPostStack]
-%endif
-	jmp		ax
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm	(revision 120)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm	(revision 121)
@@ -18,6 +18,7 @@
 ALIGN JUMP_ALIGN
 Int19hMenu_BootLoader:
+	; Store POST stack pointer
 	LOAD_BDA_SEGMENT_TO	ds, ax
-	call	BootVars_StorePostStackPointer
+	STORE_POST_STACK_POINTER
 
 	; Install new INT 19h handler now that BOOTVARS has been initialized
@@ -35,5 +36,6 @@
 ALIGN JUMP_ALIGN
 DisplayBootMenu:
-	call	BootVars_SwitchToBootMenuStack
+	SWITCH_TO_BOOT_MENU_STACK
+	CALL_DISPLAY_LIBRARY InitializeDisplayContext
 	call	RamVars_GetSegmentToDS
 	; Fall to .ProcessMenuSelectionsUntilBootable
@@ -52,5 +54,5 @@
 	call	BootSector_TryToLoadFromDriveDL
 	jnc		SHORT .ProcessMenuSelectionsUntilBootable	; Boot failure, show menu again
-	call	BootVars_SwitchBackToPostStack
+	SWITCH_BACK_TO_POST_STACK
 	; Fall to JumpToBootSector
 
@@ -68,5 +70,4 @@
 	push	bx								; Push boot sector offset
 	call	ClearSegmentsForBoot
-	xor		dh, dh							; Device supported by INT 13h
 	retf
 
@@ -81,5 +82,5 @@
 ALIGN JUMP_ALIGN
 Int19hMenu_RomBoot:
-	call	BootVars_SwitchBackToPostStack
+	SWITCH_BACK_TO_POST_STACK
 	call	ClearSegmentsForBoot
 	int		INTV_BOOT_FAILURE		; Never returns
@@ -91,12 +92,13 @@
 ;		Nothing
 ;	Returns:
+;		DX:		Zero
 ;		DS=ES:	Zero
 ;	Corrupts registers:
-;		AX
+;		Nothing
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 ClearSegmentsForBoot:
-	xor		ax, ax
-	mov		ds, ax
-	mov		es, ax
+	xor		dx, dx					; Device supported by INT 13h
+	mov		ds, dx
+	mov		es, dx
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 120)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 121)
@@ -117,5 +117,4 @@
 
 ; Include .asm files (boot menu)
-%include "BootVars.asm"			; For accessing BOOTVARS struct
 %include "BootMenu.asm"			; For Boot Menu operations
 %include "BootMenuEvent.asm"	; For menu library event handling
