Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 169)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 170)
@@ -265,6 +265,5 @@
 .FilterCurrentDirectory:
 	cmp		WORD [si+DTA.szFile], CURRENTDIR_CHARACTERS
-	jne		SHORT .ReturnWithoutFiltering
-	add		sp, BYTE 2		; Remove return address from stack
+	je		SHORT .ReturnWithFiltering
 	ret
 
@@ -275,4 +274,5 @@
 	cmp		WORD [si+DTA.szFile], UPDIR_CHARACTERS
 	jne		SHORT .ReturnWithoutFiltering
+.ReturnWithFiltering:
 	add		sp, BYTE 2		; Remove return address from stack
 ALIGN JUMP_ALIGN, ret
Index: trunk/Configurator/Src/Libraries/menu/menudraw.asm
===================================================================
--- trunk/Configurator/Src/Libraries/menu/menudraw.asm	(revision 169)
+++ trunk/Configurator/Src/Libraries/menu/menudraw.asm	(revision 170)
@@ -1,8 +1,3 @@
-; File name		:	menudraw.asm
 ; Project name	:	Menu library
-; Created date	:	9.11.2009
-; Last update	:	4.1.2011
-; Author		:	Tomi Tilli,
-;				:	Krister Nordvall (optimizations)
 ; Description	:	ASM library to menu system.
 ;					Contains menu drawing functions.
@@ -164,5 +159,5 @@
 ;	call	MenuDraw_ItemBorders			; Draw borders to clear old strings
 ALIGN JUMP_ALIGN
-MenuDraw_AllItemsNoBord:	
+MenuDraw_AllItemsNoBord:
 	cmp		WORD [bp+MENUVARS.wItemCnt], 0	; Any items to draw?
 	jz		MenuDraw_NothingToDraw			;  If not, return
@@ -358,5 +353,5 @@
 	mov		dh, B_TR
 	jmp		SHORT MenuDraw_BorderChars
-	
+
 ALIGN JUMP_ALIGN
 MenuDraw_StringBorder:
@@ -447,5 +442,5 @@
 	cmp		ax, bx						; Need scroll bars?
 	jbe		.Return						;  If not, return
-	
+
 	; Calculate last menuitem index for thumb char on this line
 	push	bx							; Store number of visible menuitems
@@ -462,5 +457,5 @@
 	jc		.Return						;  If so, draw thumb
 	mov		dh, T_V						; Load track character
-ALIGN JUMP_ALIGN
+ALIGN JUMP_ALIGN, ret
 .Return:
 	ret
Index: trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 170)
@@ -10,5 +10,5 @@
 ENHANCED_DRIVE_ACCESS_SUPPORT		EQU	(1<<0)	; 41h, 42h, 43h 44h, 47h and 48h are available
 DRIVE_LOCKING_AND_EJECTING_SUPPORT	EQU	(1<<1)	; 41h, 45h, 46h, 48h, 49h are available and INT 15h, AH=52h
-ENHANDED_DISK_DRIVE_SUPPORT			EQU	(1<<2)	; 41h, 48h, 4Eh are available (EDD)
+ENHANCED_DISK_DRIVE_SUPPORT			EQU	(1<<2)	; 41h, 48h, 4Eh are available (EDD)
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 170)
@@ -35,8 +35,6 @@
 
 	; Are we reading or writing?
-	test	al, 16	; Bit 4 is cleared on all the read commands but set on 3 of the 4 write commands
-	jnz		SHORT .PrepareToWriteDataFromESSI
-	cmp		al, COMMAND_WRITE_MULTIPLE
-	je		SHORT .PrepareToWriteDataFromESSI
+	test	al, 11001b
+	jpo		SHORT .PrepareToWriteDataFromESSI
 
 	; Prepare to read data to ESSI
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 170)
@@ -55,5 +55,5 @@
 ;		AL, BX, CX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;ALIGN JUMP_ALIGN
 AH23h_SetControllerFeatures:
 	mov		al, COMMAND_SET_FEATURES
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 170)
@@ -51,5 +51,5 @@
 ;		AL, BX, CX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;ALIGN JUMP_ALIGN
 AH24h_SetBlockSize:
 	MIN_U	al, MAX_SUPPORTED_BLOCK_SIZE_IN_SECTORS
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 170)
@@ -43,5 +43,5 @@
 ;		AL, BX, CX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;ALIGN JUMP_ALIGN
 AH25h_GetDriveInformationToBufferInESSI:
 	push	es
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 170)
@@ -41,5 +41,5 @@
 ;		AL, BX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;ALIGN JUMP_ALIGN
 AH9h_InitializeDriveForUse:
 	push	cx
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm	(revision 170)
@@ -42,5 +42,5 @@
 ;		AL, CX, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;ALIGN JUMP_ALIGN
 AHDh_ResetDrive:
 	push	dx
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 170)
@@ -39,11 +39,10 @@
 	mov		ds, [bp+IDEPACK.intpack+INTPACK.ds]
 	mov		ax, MINIMUM_EDRIVEINFO_SIZE
-	cmp		WORD [di+EDRIVE_INFO.wSize], ax
+	cmp		[di+EDRIVE_INFO.wSize], ax
 	jb		SHORT AH42h_ReturnWithInvalidFunctionError
 	je		SHORT .SkipEddConfigurationParameters
 
 	; We do not support EDD Configuration Parameters so set to FFFF:FFFFh
-	xor		ax, ax
-	dec		ax			; AX = FFFFh
+	mov		ax, -1		; AX = FFFFh
 	mov		[di+EDRIVE_INFO.fpEDDparams], ax
 	mov		[di+EDRIVE_INFO.fpEDDparams+2], ax
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm	(revision 169)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Dialogs.asm	(revision 170)
@@ -125,11 +125,5 @@
 	call	InitializeDialogInputFromDSSI
 	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szDlgExitToDos
-	mov		WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiceBooleanFlag
-	CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
-	add		sp, BYTE DIALOG_INPUT_size
-	cmp		ax, BYTE 1		; 1 = YES
-
-	pop		ds
-	ret
+	jmp		Dialogs_DisplayQuitAndSaveChangesDialogsSharedEnding
 
 
@@ -142,4 +136,5 @@
 	call	InitializeDialogInputFromDSSI
 	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szDlgSaveChanges
+Dialogs_DisplayQuitAndSaveChangesDialogsSharedEnding:
 	mov		WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiceBooleanFlag
 	CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
