Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc	(revision 593)
@@ -20,4 +20,20 @@
 %ifndef MENU_STRUCTS_INC
 %define MENU_STRUCTS_INC
+
+struc ITEM_VALUE
+	.wRomvarsValueOffset	resb	2	; ROMVARS offset to actual value to be configured
+	.szDialogTitle			resb	2	; Dialog title string
+
+	.szMultichoice			resb	2	; Multiple choices in one string
+	.rgwChoiceToValueLookup	resb	2	; Ptr to lookup table for translating selected choice to actual value
+	.rgszValueToStringLookup:			; Ptr to lookup table for translating value to string
+	.rgszChoiceToStringLookup:
+	.wMinValue				resb	2	; Minimum allowed integer value
+	.wMaxValue:
+	.wValueBitmask			resb	2	; Bitmask for item value flag or field
+	.fnValueReader			resb	2	; Called just after ROMVARS is read, providing a hook for further action
+	.fnValueWriter			resb	2	; Called just before ROMVARS is written, providing a hook for further action
+	.bFieldPosition			resb	1	; Bit field position
+endstruc
 
 struc MENUPAGE
@@ -61,20 +77,3 @@
 
 
-struc ITEM_VALUE
-	.wRomvarsValueOffset	resb	2	; ROMVARS offset to actual value to be configured
-	.szDialogTitle			resb	2	; Dialog title string
-
-	.szMultichoice			resb	2	; Multiple choices in one string
-	.rgwChoiceToValueLookup	resb	2	; Ptr to lookup table for translating selected choice to actual value
-	.rgszValueToStringLookup:			; Ptr to lookup table for translating value to string
-	.rgszChoiceToStringLookup:
-	.wMinValue				resb	2	; Minimum allowed integer value
-	.wMaxValue:
-	.wValueBitmask			resb	2	; Bitmask for item value flag or field
-	.fnValueReader			resb	2	; Called just after ROMVARS is read, providing a hook for further action
-	.fnValueWriter			resb	2	; Called just before ROMVARS is written, providing a hook for further action
-	.bFieldPosition			resb	1	; Bit field position
-endstruc
-
-
 %endif ; MENU_STRUCTS_INC
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 593)
@@ -189,9 +189,5 @@
 	cld
 %endif
-;%if g_rgwEepromTypeToSizeInWords = 0	; *FIXME* It really is but NASM won't accept this.
-	mov		cx, [cs:bx]
-;%else
-;	mov		cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
-;%endif
+	mov		cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
 	rep movsw
 
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Flash.asm	(revision 593)
@@ -292,5 +292,5 @@
 	loop	.WriteActualDataByteAfterSdpCommand
 	sti						; Enable interrupts
-	; Fall to WaitUntilEepromPageWriteHasCompleted
+	; Fall to .WaitUntilEepromPageWriteHasCompleted
 
 
@@ -305,6 +305,5 @@
 ;		AX, BX, DI, DS, ES
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-WaitUntilEepromPageWriteHasCompleted:
+.WaitUntilEepromPageWriteHasCompleted:
 	push	ss
 	pop		ds
@@ -325,4 +324,5 @@
 	ret
 
+
 ;--------------------------------------------------------------------
 ; DisplayFlashProgressWithPagesLeftInCXandFlashvarsInSSBP
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm	(revision 593)
@@ -85,4 +85,11 @@
 	ret
 .DosVersionIsOK:
+	mov		[bDosVersionMajor], al					; bDosVersionMajor must be initialized by the application (library code depends on it)
+	cmp		al, 5
+	jb		SHORT .DoNotInstallInt2FhHandler
+	; Since we are installing our Int2Fh handler we must also hook interrupt 23h to ensure a clean exit on ctrl-c/ctrl-break
+	call	HookInterrupt23h
+	call	HookInterrupt2Fh
+.DoNotInstallInt2FhHandler:
 
 	mov		ax, SCREEN_BACKGROUND_CHARACTER_AND_ATTRIBUTE
@@ -93,4 +100,6 @@
 	mov		ax, DOS_BACKGROUND_CHARACTER_AND_ATTRIBUTE
 	call	InitializeScreenWithBackgroundCharAndAttrInAX
+
+	call	UnhookInterrupt2Fh
 
 	; Exit to DOS
@@ -156,2 +165,5 @@
 ; Section containing uninitialized data
 SECTION .bss
+
+bDosVersionMajor:	resb	1
+
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 593)
@@ -346,10 +346,7 @@
 .GetSelectedEepromSizeInWordsToAX:
 	eMOVZX	bx, [cs:g_cfgVars+CFGVARS.bEepromType]
-;%if g_rgwEepromTypeToSizeInWords = 0	; *FIXME* It really is but NASM won't accept this.
-	mov		ax, [cs:bx]
-;%else
-;	mov		ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
-;%endif
+	mov		ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
 	ret
+
 
 ;--------------------------------------------------------------------
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile	(revision 592)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile	(revision 593)
@@ -54,5 +54,5 @@
 # Assembler preprocessor defines.                               #
 #################################################################
-DEFINES = EXCLUDE_FROM_XTIDECFG
+DEFINES = EXCLUDE_FROM_XTIDECFG CLD_NEEDED
 DEFINES_XT = ELIMINATE_CGA_SNOW
 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
