Index: /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 192)
+++ /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 193)
@@ -65,4 +65,9 @@
 ADDRESSING_MODE_LBA48			EQU		3	; 48-bit LBA Addressing Mode
 
+%macro CustomDPT_GetUnshiftedAddressModeToALZF 0
+	mov		al, [di+DPT.bFlagsLow]
+	and		al, MASKL_DPT_ADDRESSING_MODE
+%endmacro
+
 ; Number of Sectors per Track is fixed to 63 for LBA assist calculation.
 ; 1024 cylinders, 256 heads, 63 sectors = 8.4 GB limit (but DOS does not support more than 255 heads)
Index: /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 192)
+++ /trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 193)
@@ -54,7 +54,13 @@
 ;--------------------------------------------------------------------
 PushAddressingMode:
-	call	AccessDPT_GetAddressingModeToAXZF
-	mov		bl,g_szAddressingModes_Displacement
+	CustomDPT_GetUnshiftedAddressModeToALZF
+	;; 
+	;; This multiply both shifts the addressing mode bits down to low order bits, and 
+	;; at the same time multiplies by the size of the string displacement.  The result is in AH,
+	;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
+	;; 
+	mov		bl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
 	mul		bl
+	xchg	al,ah
 	add		ax,g_szAddressingModes
 	push	ax
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 192)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 193)
@@ -86,8 +86,15 @@
 Address_OldInt13hAddressToIdeAddress:
 	call	Address_ExtractLCHSparametersFromOldInt13hAddress
-	call	AccessDPT_GetAddressingModeToAXZF
+		
+	CustomDPT_GetUnshiftedAddressModeToALZF
 	jz		DoNotConvertLCHS	; 0, ADDR_DPT_LCHS
-	dec		ax
+		
+	;; 
+	;; Since we are only checking for zero, we can do our math in the high order bits,
+	;; in this case effectively subtracting 1 from the address mode.
+	;; 
+	sub		al,(1<<ADDRESSING_MODE_FIELD_POSITION)
 	jz		ConvertLCHStoPCHS	; 1, ADDR_DPT_PCHS
+		
 ;; Fall-through                 ; 2, ADDR_DPT_LBA28 and 3, ADDR_DPT_LBA48
 		
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 192)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 193)
@@ -40,23 +40,5 @@
 	ret
 
-
-;--------------------------------------------------------------------
-; AccessDPT_GetAddressingModeToAXZF
-;	Parameters:
-;		DS:DI:	Ptr to Disk Parameter Table
-;	Returns:
-;		AX:		Addressing Mode (L-CHS, P-CHS, LBA28, LBA48)
-;       ZF:		Set if AX=0
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-AccessDPT_GetAddressingModeToAXZF:
-	mov		al, [di+DPT.bFlagsLow]
-	and		ax, BYTE MASKL_DPT_ADDRESSING_MODE 
-	eSHR_IM	ax, ADDRESSING_MODE_FIELD_POSITION
-	ret
-
-
+		
 ;--------------------------------------------------------------------
 ; AccessDPT_GetLCHS
@@ -121,23 +103,5 @@
 	ret
 
-
-;--------------------------------------------------------------------
-; AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive
-;	Parameters:
-;		AX:		Bitmask to test DRVPARAMS.wFlags
-;		DS:DI:	Ptr to Disk Parameter Table
-;	Returns:
-;		ZF:		Set if tested bit was zero
-;				Cleared if tested bit was non-zero
-;		CF:		0
-;	Corrupts registers:
-;		BX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive:
-	call	AccessDPT_GetPointerToDRVPARAMStoCSBX
-	test	[cs:bx+DRVPARAMS.wFlags], ax
-	ret
-
+		
 ;--------------------------------------------------------------------
 ; Returns pointer to DRVPARAMS for master or slave drive.
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 192)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 193)
@@ -86,6 +86,6 @@
 .StoreAddressing:
 	; Check if CHS defined in ROMVARS
-	mov		al, FLG_DRVPARAMS_USERCHS	; User specified CHS?
-	call	AccessDPT_TestIdeVarsFlagsForMasterOrSlaveDrive
+	call	AccessDPT_GetPointerToDRVPARAMStoCSBX
+	test	byte [cs:bx+DRVPARAMS.wFlags], FLG_DRVPARAMS_USERCHS    ; User specified CHS?
 	jnz		SHORT .StoreUserDefinedCHSaddressing
 
