Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm	(revision 583)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm	(revision 592)
@@ -196,5 +196,4 @@
 	dw	DISABLE_WRITE_CACHE
 	dw	ENABLE_WRITE_CACHE
-
 g_rgszChoiceToStringLookupForWriteCache:
 	dw	g_szValueBootDispModeDefault
@@ -207,5 +206,4 @@
 	dw	TRANSLATEMODE_ASSISTED_LBA
 	dw	TRANSLATEMODE_AUTO
-
 g_rgszChoiceToStringLookupForXlateMode:
 	dw	g_szValueDrvXlateNormal
@@ -229,22 +227,35 @@
 ALIGN JUMP_ALIGN
 MasterSlaveMenu_InitializeToDrvparamsOffsetInBX:
+	push	ds
+
+	push	cs
+	pop		ds
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+%if DRVPARAMS.wFlags = 0
+	mov		ax, bx
+%else
 	lea		ax, [bx+DRVPARAMS.wFlags]
-	mov		[cs:g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-	mov		[cs:g_MenuitemMasterSlaveChsTranslateMode+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-	mov		[cs:g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-	mov		[cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-	mov		[cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+%endif
+%endif
+	mov		[g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveChsTranslateMode+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveWriteCache+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
 
 	lea		ax, [bx+DRVPARAMS.wCylinders]
-	mov		[cs:g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
 
 	lea		ax, [bx+DRVPARAMS.bHeads]
-	mov		[cs:g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
 
 	lea		ax, [bx+DRVPARAMS.bSect]
-	mov		[cs:g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
 
 	lea		ax, [bx+DRVPARAMS.dwMaximumLBA]
-	mov		[cs:g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[g_MenuitemMasterSlaveUserLbaValue+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	pop		ds
 	ret
 
@@ -283,7 +294,7 @@
 	mov		bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
 	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
-	test	ax, FLG_DRVPARAMS_USERLBA
+	test	al, FLG_DRVPARAMS_USERLBA
 	jnz		SHORT .DisableCHSandEnableLBA
-	test	ax, FLG_DRVPARAMS_USERCHS
+	test	al, FLG_DRVPARAMS_USERCHS
 	jnz		SHORT .EnableCHSandDisableLBA
 
@@ -320,9 +331,9 @@
 ALIGN JUMP_ALIGN
 .EnableOrDisableCHandS:
-	mov		bx, [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	mov		bx, [g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
 	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
-	test	ax, FLG_DRVPARAMS_USERCHS
+	test	al, FLG_DRVPARAMS_USERCHS
 	jz		SHORT .DisableCHandS
-	test	ax, FLG_DRVPARAMS_USERLBA
+	test	al, FLG_DRVPARAMS_USERLBA
 	jnz		SHORT .DisableCHandS
 
@@ -355,10 +366,10 @@
 ALIGN JUMP_ALIGN
 .EnableOrDisableUserLbaValue:
-	mov		bx, [cs:g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	mov		bx, [g_MenuitemMasterSlaveUserLBA+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
 	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
 	mov		bx, g_MenuitemMasterSlaveUserLbaValue
-	test	ax, FLG_DRVPARAMS_USERCHS
+	test	al, FLG_DRVPARAMS_USERCHS
 	jnz		SHORT .DisableMenuitemFromCSBX
-	test	ax, FLG_DRVPARAMS_USERLBA
+	test	al, FLG_DRVPARAMS_USERLBA
 	jz		SHORT .DisableMenuitemFromCSBX
 	; Fall to .EnableMenuitemFromCSBX
@@ -443,6 +454,6 @@
 ALIGN JUMP_ALIGN
 MasterSlaveMenu_WriteCHSFlag:
-	test	word [es:di], FLG_DRVPARAMS_USERCHS
-	jnz		.alreadySet
+	test	BYTE [es:di], FLG_DRVPARAMS_USERCHS
+	jnz		SHORT .AlreadySet
 
 	push	ax
@@ -466,5 +477,5 @@
 	pop		ax
 
-.alreadySet:
+.AlreadySet:
 	ret
 
@@ -475,6 +486,6 @@
 ALIGN JUMP_ALIGN
 MasterSlaveMenu_WriteLBAFlag:
-	test	word [es:di], FLG_DRVPARAMS_USERLBA
-	jnz		.alreadySet
+	test	BYTE [es:di], FLG_DRVPARAMS_USERLBA
+	jnz		SHORT .AlreadySet
 
 	push	ax
@@ -490,4 +501,5 @@
 	pop		ax
 
-.alreadySet:
+.AlreadySet:
 	ret
+
