Index: trunk/Assembly_Library/Inc/Emulate.inc
===================================================================
--- trunk/Assembly_Library/Inc/Emulate.inc	(revision 490)
+++ trunk/Assembly_Library/Inc/Emulate.inc	(revision 491)
@@ -57,4 +57,79 @@
 
 ;==========================================================================
+
+;--------------------------------------------------------------------
+; The undocumented instruction SALC (Set AL According to CF).
+; Available on all Intel processors and truly compatible clones.
+; Does not work on the NEC V20/V30 or Sony CXQ70108 processors.
+;
+; eSALC
+;	Parameters:
+;		Nothing
+;	Returns:
+;		AL:		FFh if CF=1
+;				00h if CF=0
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro eSALC 0
+	db		0D6h
+%endmacro
+
+
+;--------------------------------------------------------------------
+; The AAD instruction (ASCII Adjust before Division).
+; Available on all Intel processors and truly compatible clones.
+; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
+; unless %1 is 10 (0Ah).
+;
+; eAAD
+;	Parameters:
+;		%1:		Any 8 bit number (0...255)
+;	Returns:
+;		AL:		AH * %1 + AL
+;		AH:		0
+;		Flags:	Set according to result
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro eAAD 1
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+	%if %1 > 255
+		%error Invalid parameter passed to eAAD (%1 > 255)
+	%else
+		db		0D5h, %1
+	%endif
+%endif
+%endmacro
+
+
+;--------------------------------------------------------------------
+; The AAM instruction (ASCII Adjust after Multiplication).
+; Available on all Intel processors and truly compatible clones.
+; Does not work on the NEC V20/V30 or Sony CXQ70108 processors
+; unless %1 is 10 (0Ah).
+;
+; eAAM
+;	Parameters:
+;		%1:		Any 8 bit number except 0 (1...255)
+;	Returns:
+;		AL:		AL MOD %1
+;		AH:		AL / %1
+;		Flags:	Set according to result
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro eAAM 1
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+	%if %1 > 255
+		%error Invalid parameter passed to eAAM (%1 > 255)
+	%elif %1 = 0
+		%error Invalid parameter passed to eAAM (%1 = 0). This would cause a divide-by-zero exception!
+	%else
+		db		0D4h, %1
+	%endif
+%endif
+%endmacro
+
 
 ;--------------------------------------------------------------------
Index: trunk/Assembly_Library/Src/Display/CgaSnow.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/CgaSnow.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Display/CgaSnow.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -94,5 +94,5 @@
 	ret
 
-%ifdef INCLUDE_MENU_LIBRARY
+
 ;--------------------------------------------------------------------
 ; CgaSnow_RepMovsb
@@ -107,4 +107,14 @@
 ;		AX, CX, DX
 ;--------------------------------------------------------------------
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifdef MODULE_STRINGS_COMPRESSED
+		%define EXCLUDE
+	%endif
+	%ifdef MODULE_BOOT_MENU
+		%undef EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN DISPLAY_JUMP_ALIGN
 CgaSnow_RepMovsb:
@@ -123,4 +133,6 @@
 	ret
 %endif
+%undef EXCLUDE
+
 
 ;--------------------------------------------------------------------
Index: trunk/Assembly_Library/Src/Display/DisplayContext.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/DisplayContext.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Display/DisplayContext.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -102,8 +102,7 @@
 
 
-%ifdef INCLUDE_MENU_LIBRARY
-
 ;--------------------------------------------------------------------
 ; DisplayContext_Push
+; DisplayContext_Pop
 ;	Parameters:
 ;		Nothing
@@ -113,4 +112,11 @@
 ;		AX, DI
 ;--------------------------------------------------------------------
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_BOOT_MENU
+		%define EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_Push:
@@ -126,17 +132,9 @@
 	%endrep
 %endif
-		
+
 	mov		ds, di					; Restore DS
 	jmp		ax
 
-;--------------------------------------------------------------------
-; DisplayContext_Pop
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
+
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_Pop:
@@ -145,5 +143,5 @@
 	pop		ax						; Pop return address
 
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS		
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 	%assign i DISPLAY_CONTEXT_size-2
 	%rep DISPLAY_CONTEXT_size / 2
@@ -152,5 +150,5 @@
 	%endrep
 %endif
-		
+
 	push	ax						; Push return address
 	push	dx
@@ -159,5 +157,7 @@
 	mov		ds, di					; Restore DS
 	ret
-%endif
+%endif ; EXCLUDE
+%undef EXCLUDE
+
 
 ;--------------------------------------------------------------------
@@ -189,6 +189,5 @@
 	pop		ds
 	ret
-
-%endif  ; INCLUDE_MENU_LIBRARY
+%endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 
 
@@ -231,6 +230,10 @@
 %endif
 
-%ifdef INCLUDE_MENU_LIBRARY
-
+
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_BOOT_MENU
+		%define EXCLUDE
+	%endif
+%endif
 ;--------------------------------------------------------------------
 ; DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL
@@ -244,4 +247,5 @@
 ;		BL
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE	; 1 of 3
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_SetCharOutputFunctionFromAXwithAttribFlagInBL:
@@ -251,4 +255,5 @@
 	mov		[VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut], ax
 	ret
+%endif
 
 
@@ -263,8 +268,10 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE	; 2 of 3
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_SetCharacterAttributeFromAL:
 	mov		[VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute], al
 	ret
+%endif
 
 
@@ -279,11 +286,14 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE	; 3 of 3
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_SetCharacterOutputParameterFromAX:
 	mov		[VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam], ax
 	ret
-		
-%endif	 ; INCLUDE_MENU_LIBRARY
-		
+%endif
+
+%undef EXCLUDE
+
+
 ;--------------------------------------------------------------------
 ; DisplayContext_GetCharacterOutputParameterToDX
@@ -295,5 +305,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG	; This is currently unused (dead code)
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayContext_GetCharacterOutputParameterToDX:
@@ -322,5 +332,5 @@
 %endif
 
-		
+
 ;--------------------------------------------------------------------
 ; DisplayContext_GetByteOffsetToAXfromCharacterOffsetInAX
Index: trunk/Assembly_Library/Src/Display/DisplayCursor.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/DisplayCursor.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Display/DisplayCursor.asm	(revision 491)
@@ -37,5 +37,5 @@
 	ret
 
-%ifdef INCLUDE_MENU_LIBRARY
+
 ;--------------------------------------------------------------------
 ; DisplayCursor_SetShapeFromAX
@@ -48,4 +48,11 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_BOOT_MENU
+		%define EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayCursor_SetShapeFromAX:
@@ -53,5 +60,7 @@
 	ret
 %endif
-		
+%undef EXCLUDE
+
+
 ;--------------------------------------------------------------------
 ; DisplayCursor_SetCoordinatesFromAX
Index: trunk/Assembly_Library/Src/Display/DisplayPrint.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/DisplayPrint.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Display/DisplayPrint.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -109,5 +109,4 @@
 
 
-%ifndef MODULE_STRINGS_COMPRESSED
 ;--------------------------------------------------------------------
 ; DisplayPrint_WordFromAXWithBaseInBX
@@ -122,4 +121,5 @@
 ;		AX, DX
 ;--------------------------------------------------------------------
+%ifndef MODULE_STRINGS_COMPRESSED
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayPrint_WordFromAXWithBaseInBX:
@@ -152,4 +152,6 @@
 g_rgcDigitToCharacter:	db	"0123456789ABCDEF"
 
+%endif ; MODULE_STRINGS_COMPRESSED
+
 ;--------------------------------------------------------------------
 ; DisplayPrint_QWordFromSSBPwithBaseInBX
@@ -164,5 +166,5 @@
 ;		AX, DX, [SS:BP]
 ;--------------------------------------------------------------------
-%ifndef EXCLUDE_FROM_XTIDECFG	; Not used in XTIDECFG
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayPrint_QWordFromSSBPwithBaseInBX:
@@ -181,7 +183,5 @@
 	mov		cx, bx				; Character count to CX
 	jmp		SHORT PrintAllPushedDigits
-%endif	; EXCLUDE_FROM_XTIDECFG
-
-%endif	; MODULE_STRINGS_COMPRESSED
+%endif
 
 
@@ -220,5 +220,4 @@
 
 
-%ifdef INCLUDE_MENU_LIBRARY
 ;--------------------------------------------------------------------
 ; DisplayPrint_ClearScreenWithCharInALandAttributeInAH
@@ -233,4 +232,5 @@
 ;		AX, DX
 ;--------------------------------------------------------------------
+%ifdef INCLUDE_MENU_LIBRARY
 ALIGN DISPLAY_JUMP_ALIGN
 DisplayPrint_ClearScreenWithCharInALandAttributeInAH:
@@ -251,5 +251,6 @@
 	ret
 %endif
-		
+
+
 ;--------------------------------------------------------------------
 ; DisplayPrint_ClearAreaWithHeightInAHandWidthInAL
Index: trunk/Assembly_Library/Src/File/FileIO.asm
===================================================================
--- trunk/Assembly_Library/Src/File/FileIO.asm	(revision 490)
+++ trunk/Assembly_Library/Src/File/FileIO.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 
 ; Section containing code
@@ -37,8 +37,7 @@
 ALIGN JUMP_ALIGN
 FileIO_CreateWithPathInDSSIandAttributesInCX:
-	xchg	dx, si		; Path now in DS:DX
 	mov		ah, CREATE_OR_TRUNCATE_FILE
-	jmp		SHORT CreateOrOpenFile
-
+	SKIP2B	bx
+	; Fall to FileIO_OpenWithPathInDSSIandFileAccessInAL
 
 ;--------------------------------------------------------------------
@@ -55,9 +54,7 @@
 ;		AX, BX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 FileIO_OpenWithPathInDSSIandFileAccessInAL:
+	mov		ah, OPEN_EXISTING_FILE
 	xchg	dx, si		; Path now in DS:DX
-	mov		ah, OPEN_EXISTING_FILE
-CreateOrOpenFile:
 	int		DOS_INTERRUPT_21h
 	xchg	si, dx
@@ -87,29 +84,4 @@
 	ret
 
-;--------------------------------------------------------------------
-; File position is updated so next read will start where
-; previous read stopped.
-;
-; FileIO_ReadCXbytesToDSSIusingHandleFromBX
-;	Parameters:
-;		BX:		File handle
-;		CX:		Number of bytes to read
-;		DS:SI:	Ptr to destination buffer
-;	Returns:
-;		AX:		Number of bytes actually read if successful (0 if at EOF before call)
-;				DOS error code if CF set
-;		CF:		Clear if successful
-;				Set if error
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-FileIO_ReadCXbytesToDSSIusingHandleFromBX:
-	xchg	dx, si				; DS:DX now points to destination buffer
-	mov		ah, READ_FROM_FILE_OR_DEVICE
-	int		DOS_INTERRUPT_21h
-	xchg	si, dx
-	ret
-
 
 ;--------------------------------------------------------------------
@@ -134,9 +106,33 @@
 	ret
 
+
+;--------------------------------------------------------------------
+; File position is updated so next read will start where
+; previous read stopped.
+;
+; FileIO_ReadCXbytesToDSSIusingHandleFromBX
+;	Parameters:
+;		BX:		File handle
+;		CX:		Number of bytes to read
+;		DS:SI:	Ptr to destination buffer
+;	Returns:
+;		AX:		Number of bytes actually read if successful (0 if at EOF before call)
+;				DOS error code if CF set
+;		CF:		Clear if successful
+;				Set if error
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+FileIO_ReadCXbytesToDSSIusingHandleFromBX:
+	mov		ah, READ_FROM_FILE_OR_DEVICE
+	SKIP2B	f
+	; Fall to FileIO_WriteCXbytesFromDSSIusingHandleFromBX
+
 ;--------------------------------------------------------------------
 ; File position is updated so next write will start where
 ; previous write stopped.
 ;
-; FileIO_WriteCXbytesFromDSSIusingHandleFromBX:
+; FileIO_WriteCXbytesFromDSSIusingHandleFromBX
 ;	Parameters:
 ;		BX:		File handle
@@ -151,8 +147,7 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 FileIO_WriteCXbytesFromDSSIusingHandleFromBX:
-	xchg	dx, si				; DS:DX now points to source buffer
 	mov		ah, WRITE_TO_FILE_OR_DEVICE
+	xchg	dx, si				; DS:DX now points to buffer
 	int		DOS_INTERRUPT_21h
 	xchg	si, dx
@@ -232,5 +227,5 @@
 
 ;--------------------------------------------------------------------
-; FileIO_GetFileSizeToDXAXusingHandleFromBXandResetFilePosition:
+; FileIO_GetFileSizeToDXAXusingHandleFromBXandResetFilePosition
 ;	Parameters:
 ;		BX:		File handle
@@ -287,5 +282,5 @@
 
 ;--------------------------------------------------------------------
-; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX:
+; FileIO_SeekFromOriginInALtoOffsetInDXAXusingHandleFromBX
 ;	Parameters:
 ;		AL:		SEEK_FROM.(origin)
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 
 ; Section containing code
@@ -99,5 +99,5 @@
 	mov		[si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
 
-	; 0 = 65536 but it needs to be adjusted to 65535 prevent division by zero
+	; 0 = 65536 but it needs to be adjusted to 65535 to prevent division by zero
 	cmp		WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], BYTE 0
 	jne		SHORT CalculateProgressNeededBeforeUpdatingCharacter
@@ -288,5 +288,5 @@
 	div		cx			; AX = Estimated ticks left
 	xchg	dx, ax
-	SKIP2B	f	; cmp ax, <next instruction>
+	SKIP2B	ax
 .PreventDivisionByZero:
 	xor		dx, dx
@@ -309,5 +309,5 @@
 	mov		bp, sp
 	mov		si, g_szTimeFormat
-	call	TimerTicks_GetMinutesToAXfromTicksInDX
+	call	TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX
 	push	ax
 	call	TimerTicks_GetSecondsToAXfromTicksInDX
Index: trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 
 ; Section containing code
@@ -79,5 +79,5 @@
 ;		AX:		Item line for last thumb character
 ;	Corrupts registers:
-;		CX, DX
+;		DX
 ;--------------------------------------------------------------------
 ALIGN MENU_JUMP_ALIGN
@@ -95,5 +95,5 @@
 ;		AX:		Item line for first thumb character
 ;	Corrupts registers:
-;		CX, DX
+;		DX
 ;--------------------------------------------------------------------
 ALIGN MENU_JUMP_ALIGN
Index: trunk/Assembly_Library/Src/Menu/MenuTime.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/MenuTime.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Menu/MenuTime.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 
 ; Section containing code
@@ -101,5 +101,5 @@
 ;		AX:		Seconds until timeout
 ;	Corrupts registers:
-;		AX
+;		Nothing
 ;--------------------------------------------------------------------
 ALIGN MENU_JUMP_ALIGN
@@ -116,5 +116,5 @@
 	xchg	dx, ax
 	call	TimerTicks_GetSecondsToAXfromTicksInDX
-	SKIP2B	f	; cmp ax, <next instruction>
+	SKIP2B	dx
 .TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero:
 	xor		ax, ax
Index: trunk/Assembly_Library/Src/Serial/SerialServer.asm
===================================================================
--- trunk/Assembly_Library/Src/Serial/SerialServer.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Serial/SerialServer.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 
 %include "SerialServer.inc"
@@ -75,5 +75,5 @@
 
 		mov		al,83h
-		add		dl,Serial_UART_lineControl
+		add		dl, Serial_UART_lineControl	; Clears CF
 		out		dx,al
 
@@ -82,5 +82,9 @@
 		out		dx,al
 
+%ifdef USE_UNDOC_INTEL
+		eSALC	; Clear AL using CF
+%else
 		xor		ax,ax
+%endif
 		inc		dx				; divisor high
 		push	dx
@@ -103,5 +107,9 @@
 
 		pop		dx				; base, interrupts disabled
+%ifdef USE_UNDOC_INTEL
+		eSALC	; Clear AL using CF
+%else
 		xor		ax,ax
+%endif
 		out		dx,al
 
Index: trunk/Assembly_Library/Src/String/Char.asm
===================================================================
--- trunk/Assembly_Library/Src/String/Char.asm	(revision 490)
+++ trunk/Assembly_Library/Src/String/Char.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -29,5 +29,5 @@
 ;		%3:		Last accepted value in range
 ;	Returns:
-;		CF:		Set if character is range
+;		CF:		Set if character in range
 ;				(Jumps to Char_CharIsNotValid if before range)
 ;	Corrupts registers:
@@ -51,8 +51,18 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_HOTKEYS
+		%define EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN STRING_JUMP_ALIGN
 Char_IsLowerCaseLetterInAL:
 	IS_BETWEEN_IMMEDIATES al, 'a', 'z'
 	ret
+%endif
+%undef EXCLUDE
+
 
 ;--------------------------------------------------------------------
@@ -72,4 +82,5 @@
 	ret
 %endif
+
 
 ;--------------------------------------------------------------------
@@ -94,4 +105,5 @@
 %endif
 
+
 ;--------------------------------------------------------------------
 ; Char_IsDecimalDigitInAL
@@ -110,4 +122,5 @@
 	ret
 %endif
+
 
 ;--------------------------------------------------------------------
@@ -141,4 +154,5 @@
 %endif
 
+
 ;--------------------------------------------------------------------
 ; Char_CharIsValid
@@ -159,8 +173,21 @@
 %endif
 
+
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_HOTKEYS
+		%define EXCLUDE
+	%endif
+	%ifndef MODULE_STRINGS_COMPRESSED
+		%undef EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN STRING_JUMP_ALIGN
 Char_CharIsNotValid:
 	clc
 	ret
+%endif
+%undef EXCLUDE
 
 
@@ -181,5 +208,5 @@
 %endif
 
-				
+
 ;--------------------------------------------------------------------
 ; Char_ALtoUpperCaseLetter
@@ -191,5 +218,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS		
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN STRING_JUMP_ALIGN
 Char_ALtoUpperCaseLetter:
@@ -200,5 +227,5 @@
 %endif
 
-		
+
 ;--------------------------------------------------------------------
 ; Char_ChangeCaseInAL
@@ -210,8 +237,11 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 Char_ChangeCaseInAL:
 	xor		al, 32
 .Return:
 	ret
+%endif
+
 
 ;--------------------------------------------------------------------
Index: trunk/Assembly_Library/Src/Time/TimerTicks.asm
===================================================================
--- trunk/Assembly_Library/Src/Time/TimerTicks.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Time/TimerTicks.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,14 +10,23 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
-
-; System timer ticks 18.2 times per second = 54.9 ms / tick
-TICKS_PER_HOUR			EQU		65520
+;
+
+; With a PIT input clock of 1193181.6666... Hz and a maximum
+; 16 bit divisor of 65536 (if PIT programmed with 0) we get:
+;
+; Clock / Divisor = ~18.2065 ticks per second
+; Clock * SecondsPerMinute / Divisor = ~1092 ticks per minute
+; Clock * SecondsPerHour / Divisor = ~65543 ticks per hour
+;
+; Since 65543 can't fit in a 16 bit register we use the
+; maximum possible instead and disregard the last ~8 ticks.
+
+TICKS_PER_HOUR			EQU		65535
 TICKS_PER_MINUTE		EQU		1092
 TICKS_PER_SECOND		EQU		18
@@ -28,7 +37,7 @@
 
 ;--------------------------------------------------------------------
-; TimerTicks_GetHoursToAXfromTicksInDXAX
-; TimerTicks_GetMinutesToAXfromTicksInDX
-; TimerTicks_GetSecondsToAXfromTicksInDX
+; TimerTicks_GetHoursToAXandRemainderTicksToDXfromTicksInDXAX
+; TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX
+; TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX
 ;	Parameters
 ;		DX(:AX):	Timer ticks to convert
@@ -42,5 +51,5 @@
 %ifndef EXCLUDE_FROM_XTIDECFG
 ALIGN JUMP_ALIGN
-TimerTicks_GetHoursToAXfromTicksInDXAX:
+TimerTicks_GetHoursToAXandRemainderTicksToDXfromTicksInDXAX:
 	mov		cx, TICKS_PER_HOUR
 	div		cx		; Divide DX:AX by CX, Hours to AX, remainder ticks to DX
@@ -49,5 +58,5 @@
 
 ALIGN JUMP_ALIGN
-TimerTicks_GetMinutesToAXfromTicksInDX:
+TimerTicks_GetMinutesToAXandRemainderTicksToDXfromTicksInDX:
 	xor		ax, ax
 	xchg	ax, dx	; Ticks now in DX:AX
@@ -57,7 +66,9 @@
 %endif ; EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 
-%ifdef INCLUDE_MENU_LIBRARY
-ALIGN JUMP_ALIGN
-TimerTicks_GetSecondsToAXfromTicksInDX:
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
+ALIGN JUMP_ALIGN
+TimerTicks_GetSecondsToAXandRemainderTicksToDXfromTicksInDX:
+	; This procedure can handle at most 4607 ticks in DX (almost 256 seconds)
+	; More than 4607 ticks will generate a divide overflow exception!
 	xchg	ax, dx	; Ticks now in AX
 	mov		cl, TICKS_PER_SECOND
@@ -68,4 +79,29 @@
 %endif
 
+
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_BOOT_MENU
+		%define EXCLUDE
+	%endif
+%endif
+;--------------------------------------------------------------------
+; TimerTicks_GetSecondsToAXfromTicksInDX
+;	Parameters
+;		DX:			Timer ticks to convert
+;	Returns:
+;		AX:			Seconds
+;	Corrupts registers:
+;		DX
+;--------------------------------------------------------------------
+%ifndef EXCLUDE	; 1 of 3
+ALIGN JUMP_ALIGN
+TimerTicks_GetSecondsToAXfromTicksInDX:
+	mov		ax, 3600	; Approximately 65536 / (Clock / Divisor)
+	mul		dx
+	xchg	dx, ax
+	ret
+%endif
+
+
 ;--------------------------------------------------------------------
 ; First tick might take 0...54.9 ms and remaining ticks
@@ -82,5 +118,5 @@
 ;		AX
 ;--------------------------------------------------------------------
-%ifdef INCLUDE_MENU_LIBRARY		
+%ifndef EXCLUDE	; 2 of 3
 ALIGN JUMP_ALIGN
 TimerTicks_InitializeTimeoutFromAX:
@@ -90,4 +126,5 @@
 	ret
 %endif
+
 
 ;--------------------------------------------------------------------
@@ -102,5 +139,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-%ifdef INCLUDE_MENU_LIBRARY		
+%ifndef EXCLUDE	; 3 of 3
 ALIGN JUMP_ALIGN
 TimerTicks_GetTimeoutTicksLeftToAXfromDSBX:
@@ -114,4 +151,7 @@
 %endif
 
+%undef EXCLUDE
+
+
 ;--------------------------------------------------------------------
 ; TimerTicks_GetElapsedToAXandResetDSBX
@@ -134,4 +174,5 @@
 %endif
 
+
 ;--------------------------------------------------------------------
 ; TimerTicks_GetElapsedToAXfromDSBX
@@ -161,4 +202,11 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+	%ifndef MODULE_BOOT_MENU OR MODULE_HOTKEYS
+		%define EXCLUDE
+	%endif
+%endif
+
+%ifndef EXCLUDE
 ALIGN JUMP_ALIGN
 TimerTicks_ReadFromBdaToAX:
@@ -170,2 +218,4 @@
 	pop		ds
 	ret
+%endif
+%undef EXCLUDE
Index: trunk/Assembly_Library/Src/Util/Registers.asm
===================================================================
--- trunk/Assembly_Library/Src/Util/Registers.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Util/Registers.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,12 +10,12 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-		
+
 ; Section containing code
 SECTION .text
@@ -52,6 +52,6 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifdef INCLUDE_MENU_LIBRARY
 ALIGN JUMP_ALIGN
-%ifdef INCLUDE_MENU_LIBRARY		
 Registers_CopySSBPtoESDI:
 	COPY_SSBP_TO_ESDI
Index: trunk/Assembly_Library/Src/Util/Size.asm
===================================================================
--- trunk/Assembly_Library/Src/Util/Size.asm	(revision 490)
+++ trunk/Assembly_Library/Src/Util/Size.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 %ifdef INCLUDE_MENU_LIBRARY
@@ -68,7 +68,13 @@
 	; Convert remainder to tenths
 	xchg	bx, ax						; Store AX
-	mov		ax, 10
-	mul		cx							; DX:AX = remainder * 10
-	eSHR_IM	ax, 10						; Divide AX by 1024
+	mov		ax, 5
+	mul		cx							; DX:AX = remainder * (10 / 2)
+%ifdef USE_186
+	shr		ax, 9						; Divide AX by (1024 / 2)
+%else
+	shr		ax, 1
+	mov		al, ah
+	cbw
+%endif
 	xchg	cx, ax						; CX = tenths
 	xchg	ax, bx
@@ -124,5 +130,5 @@
 ;--------------------------------------------------------------------
 ALIGN UTIL_SIZE_JUMP_ALIGN
-Size_ConvertSectorCountInBXDXAXtoKiB:               ; unused entrypoint ok
+Size_ConvertSectorCountInBXDXAXtoKiB:	; unused entrypoint ok
 Size_DivideBXDXAXbyTwo:
 	shr		bx, 1					; Divide sector count by 2...
Index: trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc	(revision 491)
@@ -5,5 +5,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -12,9 +12,9 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
@@ -34,4 +34,5 @@
 ; Possible base addresses. Note that all XT-CF IDE registers are SHL 1 compared
 ; to standard IDE registers.
+XTCF_BASE_PORT_DETECTION_SEED		EQU		140h	; Not a valid base address but needed for autodetection
 XTCF_BASE_PORT_1					EQU		200h
 XTCF_BASE_PORT_2					EQU		240h
@@ -42,5 +43,5 @@
 ; XT-CF Control Register (do not SHL 1 these!)
 XTCF_CONTROL_REGISTER				EQU		1Fh
-XTCT_CONTROL_REGISTER_INVERTED_in	EQU		1Eh
+XTCF_CONTROL_REGISTER_INVERTED_in	EQU		1Eh
 
 ; Control Register contents:
@@ -48,5 +49,5 @@
 ; Control Register holds high byte from Sector Window segment if >= A0h
 ; (First possible segment for Sector Window is A000h)
-; 
+;
 ; 8-bit PIO transfers (port I/O) are used if Control Register is zero.
 ; Any other value means DMA transfers (using DMA channel 3).
Index: trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 491)
@@ -45,5 +45,5 @@
 	.twLbaSectors			resb	6	; 48-bit sector count for LBA addressing
 %endif
-							alignb	2	; WORD alignent for DPT_SERIAL or DPT_ATA
+							alignb	2	; WORD alignment for DPT_SERIAL or DPT_ATA
 endstruc
 
@@ -133,9 +133,9 @@
 ; first! DPT_ATA.bDevice uses small values so there will be no problems.
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-%if DPT_SERIAL.bSerialPort <> DPT_ATA.bDevice
-	%error "DPT_ATA.bDevice and DPT_SERIAL.bSerialPort must be in same offsets!"
+	%if DPT_SERIAL.bSerialPort <> DPT_ATA.bDevice
+		%error "DPT_ATA.bDevice and DPT_SERIAL.bSerialPort must be in same offsets!"
+	%endif
 %endif
-%endif
-%endif
+%endif ; MODULE_SERIAL
 
 
Index: trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 491)
@@ -55,6 +55,9 @@
 	shl		cx, 5
 %else
-	UNROLL_SECTORS_IN_CX_TO_QWORDS
-	shr		cx, 1
+;	UNROLL_SECTORS_IN_CX_TO_QWORDS
+;	shr		cx, 1
+	mov		ch, cl		; 2 bytes shorter but possibly slower
+	mov		cl, 3
+	shr		cx, cl
 %endif
 %endmacro
Index: trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 491)
@@ -1,8 +1,7 @@
-; /*
 ; Project name	:	XTIDE Universal BIOS
 ; Description	:	Dependencies for optional modules.
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -11,9 +10,9 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
@@ -31,5 +30,4 @@
 	%endif
 %endif
-
 
 
@@ -53,5 +51,5 @@
 	%include "HotkeyBar.inc"		; For Hotkeys
 	%ifdef MODULE_BOOT_MENU
-		%include "BootMenu.inc"			; For Boot Menu
+		%include "BootMenu.inc"		; For Boot Menu
 	%endif
 %endif
@@ -60,5 +58,4 @@
 	%include "IntController.inc"
 %endif
-
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm	(revision 491)
@@ -74,5 +74,5 @@
 ;--------------------------------------------------------------------
 TransferBlockToOrFromXTCF:
-	; 8-bit DMA transfers must be done withing 64k physical page.
+	; 8-bit DMA transfers must be done within 64k physical page.
 	; XT-CF support maximum of 64 sector (32768 bytes) blocks in DMA mode
 	; so we never need to separate transfer to more than 2 separate DMA operations.
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 491)
@@ -53,5 +53,5 @@
 IdeIO_InputToALfromIdeRegisterInDL:
 	xor		dh, dh	; IDE Register index now in DX
-
+	mov		bx, dx	; and BX
 	mov		al, [di+DPT_ATA.bDevice]
 	cmp		al, DEVICE_8BIT_XTIDE_REV2
@@ -63,19 +63,16 @@
 
 .InputToALfromMemoryMappedRegisterInDX:
-	mov		bx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
-	add		bx, dx
 	push	ds
 	mov		ds, [di+DPT.wBasePort]	; Segment for JR-IDE/ISA
-	mov		al, [bx]
+	mov		al, [bx+JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET]
 	pop		ds
 	ret
 
 .ReverseA0andA3fromRegisterIndexInDX:
-	mov		bx, dx
 	mov		dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
 	SKIP2B	bx	; Skip shl dx, 1
 
 .ShlRegisterIndexInDX:
-	shl		dx, 1
+	eSHL_IM	dx, 1
 	; Fall to .InputToALfromRegisterInDX
 
@@ -116,5 +113,5 @@
 .ShlRegisterIndexInDX:
 	add		dl, OFFSET_TO_CONTROL_BLOCK_REGISTERS
-	shl		dx, 1
+	eSHL_IM	dx, 1
 	jmp		SHORT OutputALtoRegisterInDX
 
@@ -164,5 +161,5 @@
 
 .ShlRegisterIndexInDX:
-	shl		dx, 1
+	eSHL_IM	dx, 1
 	; Fall to OutputALtoRegisterInDX
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 491)
@@ -231,13 +231,53 @@
 
 	; Convert ES:SI to physical address
-	xor		dx, dx
-	mov		ax, es
+%ifdef USE_186			; Bytes	EU Cycles(286)
+	mov		ax, es		; 2		2
+	rol		ax, 4		; 3		9
+	mov		dx, ax		; 2		2
+	and		ax, BYTE 0Fh; 3		3
+	xor		dx, ax		; 2		2
+	add		si, dx		; 2		2
+	adc		al, ah		; 2		2
+	mov		es, ax		; 2		2
+	;------------------------------------
+						; 18	24
+%else ; 808x
+
+%if 0
+						; Bytes	EU Cycles(808x)
+	mov		al, 4		; 2		4
+	mov		dx, es		; 2		2
+	xchg	cx, ax		; 1		3
+	rol		dx, cl		; 2		24
+	mov		cx, dx		; 2		2
+	xchg	cx, ax		; 1		3
+	and		ax, BYTE 0Fh; 3		4
+	xor		dx, ax		; 2		3
+	add		si, dx		; 2		3
+	adc		al, ah		; 2		3
+	mov		es, ax		; 2		2
+	;------------------------------------
+						; 21	53
+;
+; Judging by the Execution Unit cycle count the above block of code is
+; apparently slower. However, the shifts and rotates in the block below
+; execute faster than the Bus Interface Unit on an 8088 can fetch them,
+; thus causing the EU to starve. The difference in true execution speed
+; (if any) might not be worth the extra 5 bytes.
+; In other words, we could use a real world test here.
+;
+%endif ; 0
+						; Bytes	EU Cycles(808x/286)
+	xor		dx, dx		; 2		3/2
+	mov		ax, es		; 2		2/2
 %rep 4
-	shl		ax, 1
-	rcl		dx, 1
+	shl		ax, 1		; 8		8/8
+	rcl		dx, 1		; 8		8/8
 %endrep
-	add		si, ax
-	adc		dl, dh
-	mov		es, dx
+	add		si, ax		; 2		3/2
+	adc		dl, dh		; 2		3/2
+	mov		es, dx		; 2		2/2
+	;------------------------------------
+%endif					; 26	29/26
 	ret
 %endif ; MODULE_8BIT_IDE
@@ -266,5 +306,5 @@
 %ifdef MODULE_8BIT_IDE
 		dw		IdePioBlock_ReadFrom8bitDataPort	; 2, DEVICE_8BIT_ATA
-		dw		IdePioBlock_ReadFromXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1		
+		dw		IdePioBlock_ReadFromXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1
 		dw		IdePioBlock_ReadFromXtideRev2		; 4, DEVICE_8BIT_XTIDE_REV2
 		dw		IdePioBlock_ReadFrom8bitDataPort	; 5, DEVICE_8BIT_XTCF_PIO8
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -93,5 +93,5 @@
 ;		AL, BX, CX, DX
 ;--------------------------------------------------------------------
-.IdePollBsyAndFlgInAH:
+PollBsyAndFlgInAH:
 	call	IdeIO_InputStatusRegisterToAL		; Discard contents of first read
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -155,5 +155,5 @@
 	mov		dl, ROMVARS.ideVars0						; starting Idevars offset
 
-    ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd, 
+    ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd,
     ; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from
 	; RamVars_GetIdeControllerCountToCX was used.  Unused controllers won't make a difference, since no DPT
@@ -174,4 +174,3 @@
 
 .done:
-.NoForeignDrivesToReset:
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -63,5 +63,5 @@
 	call	AccessDPT_IsThisDeviceXTCF
 	jne		SHORT XTCFnotFound
-	and		ax, BYTE 7Fh				; Subcommand now in AX
+	and		ax, BYTE 7Fh				; Subcommand now in AX (clears AH and CF)
 	jz		SHORT .ReturnWithSuccess	; IS_THIS_DRIVE_XTCF
 
@@ -70,12 +70,11 @@
 	jnz		SHORT .SkipReadXtcfControlRegisterToDH
 	mov		dx, [di+DPT.wBasePort]
-	add		dl, XTCF_CONTROL_REGISTER
+	add		dl, XTCF_CONTROL_REGISTER	; Will never overflow (keeps CF cleared)
 	in		al, dx
 	mov		[bp+IDEPACK.intpack+INTPACK.dh], al
 .ReturnWithSuccess:
-	xor		ah, ah
-	ret
+	ret		; With AH and CF cleared
+
 .SkipReadXtcfControlRegisterToDH:
-
 	; WRITE_DH_TO_XTCF_CONTROL_REGISTER
 	dec		ax							; Subcommand
@@ -122,8 +121,8 @@
 	mov		BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_PIO8
 	; Fall to .Enable8bitPioMode
-	
+
 	; We always need to enable 8-bit mode since 16-bit mode is restored
-	; when controller is reset (AH=0h or Dh)
-.Enable8bitPioMode:	
+	; when controller is reset (AH=00h or 0Dh)
+.Enable8bitPioMode:
 	jmp		AH23h_Enable8bitPioMode
 
@@ -143,5 +142,5 @@
 AH1Eh_DetectXTCFwithBasePortInDX:
 	push	dx
-	add		dl, XTCT_CONTROL_REGISTER_INVERTED_in	; set DX to XT-CF config register (inverted)
+	add		dl, XTCF_CONTROL_REGISTER_INVERTED_in	; set DX to XT-CF config register (inverted)
 	in		al, dx		; get value
 	mov		ah, al		; save in ah
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -59,11 +59,10 @@
 ;--------------------------------------------------------------------
 AH24h_SetBlockSize:
+%ifdef MODULE_8BIT_IDE
 	; XT-CF does not support largest block size in DMA mode.
-%ifdef MODULE_8BIT_IDE
-	call	AccessDPT_IsThisDeviceXTCF
-	cmp		ah, DEVICE_8BIT_XTCF_DMA
-	jne		SHORT .NoNeedToLimitBlockSize
 	cmp		al, XTCF_DMA_MODE_MAX_BLOCK_SIZE
-	ja		SHORT AH1Eh_LoadInvalidCommandToAHandSetCF
+	jbe		SHORT .NoNeedToLimitBlockSize
+	cmp		BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA
+	je		SHORT AH1Eh_LoadInvalidCommandToAHandSetCF
 .NoNeedToLimitBlockSize:
 %endif ; MODULE_8BIT_IDE
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 491)
@@ -36,5 +36,5 @@
 	; corrupted. We start by making sure P-CHS values are valid.
 	; If they are, we assume the ATA ID to be valid. Fortunately we can do
-	; futher checking for ATA-5 and later since they contain signature and
+	; further checking for ATA-5 and later since they contain signature and
 	; checksum bytes. Those are not available for ATA-4 and older.
 
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -153,6 +153,6 @@
 ;--------------------------------------------------------------------
 StartDetectionWithDriveSelectByteInBHandStringInCX:
+%ifdef MODULE_8BIT_IDE
 	; Autodetect port for XT-CF
-%ifdef MODULE_8BIT_IDE
 	call	DetectDrives_DoesIdevarsInCSBPbelongToXTCF
 	jne		SHORT .SkipXTCFportDetection
@@ -165,7 +165,12 @@
 	; for next drive (another XT-CF card on same system)
 .DetectNextPort:
-	call	BootVars_GetNextXTCFportToDetectToDX
-	cmp		dx, XTCF_BASE_PORT_4
+	mov		dx, [es:BOOTVARS.wNextXTCFportToScan]
+	xor		dl, 40h
+	jnz		SHORT .StoreNextXTCFportToScan
+	inc		dh
+	cmp		dh, XTCF_BASE_PORT_4 >> 8
 	ja		SHORT .SkipXTCFportDetection		; XT-CF not found from any port
+.StoreNextXTCFportToScan:
+	mov		[es:BOOTVARS.wNextXTCFportToScan], dx
 
 	call	AH1Eh_DetectXTCFwithBasePortInDX
@@ -178,5 +183,5 @@
 	jmp		SHORT .DriveDetectionStringPrintedOnScreen
 
-	; Print detect string for devices that do not support autodetection 	
+	; Print detect string for devices that do not support autodetection
 .SkipXTCFportDetection:
 	push	dx
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -97,7 +97,7 @@
 .InitializeHardwareIrqHandlers:
 	call	RamVars_GetIdeControllerCountToCX
-	mov		di, ROMVARS.ideVars0			; CS:SI points to first IDEVARS
+	mov		di, ROMVARS.ideVars0+IDEVARS.bIRQ	; CS:SI points to first IDEVARS
 .IdeControllerLoop:
-	mov		al, [cs:di+IDEVARS.bIRQ]
+	mov		al, [cs:di]
 	add		di, BYTE IDEVARS_size			; Increment to next controller
 	call	.InstallLowOrHighIrqHandler
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 491)
@@ -80,5 +80,5 @@
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 %ifdef MODULE_BOOT_MENU
-		at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
 %endif
 	at	ROMVARS.bIdeCnt,		db	2						; Number of supported controllers
@@ -88,6 +88,6 @@
 	at	ROMVARS.bIdleTimeout,	db	0						; Standby timer disabled by default
 
-	at	ROMVARS.ideVars0+IDEVARS.wBasePort,			dw	300h 		; Controller Command Block base port
-	at	ROMVARS.ideVars0+IDEVARS.wControlBlockPort,	dw	310h 	; Controller Control Block base port
+	at	ROMVARS.ideVars0+IDEVARS.wBasePort,			dw	DEVICE_ATA_PRIMARY_PORT 		; Controller Command Block base port
+	at	ROMVARS.ideVars0+IDEVARS.wControlBlockPort,	dw	DEVICE_ATA_PRIMARY_PORTCTRL 	; Controller Control Block base port
 	at	ROMVARS.ideVars0+IDEVARS.bDevice,			db	DEVICE_16BIT_ATA
 	at	ROMVARS.ideVars0+IDEVARS.bIRQ,				db	0
@@ -126,5 +126,5 @@
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 %ifdef MODULE_BOOT_MENU
-		at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
 %endif
 	at	ROMVARS.bIdeCnt,		db	2						; Number of supported controllers
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 491)
@@ -76,9 +76,9 @@
 ;--------------------------------------------------------------------
 BootMenuPrint_TitleStrings:
-	xor		di,di						; Null character will be eaten 
+	xor		di,di						; Null character will be eaten
 	mov		si, g_szBootMenuTitle
 	jmp		DetectPrint_RomFoundAtSegment.BootMenuEntry
 
-		
+
 ;--------------------------------------------------------------------
 ; BootMenuPrint_RefreshInformation
@@ -203,10 +203,10 @@
 	jz		SHORT BootMenuPrint_RefreshInformation.FormatRelay
 
-%include "BootMenuPrintCfg.asm"			; inline of code to fill out remainder of information string
+%include "BootMenuPrintCfg.asm"		; Inline of code to fill out remainder of information string
 	jmp		DetectPrint_FormatCSSIfromParamsInSSBP
 
 
 FloppyTypes:
-.rgbCapacityMultiplier equ 20	        ; Multiplier to reduce word sized values to byte size
+.rgbCapacityMultiplier equ 120		; Multiplier to reduce word sized values to byte size
 .rgbCapacity:
 	db		360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrintCfg.asm	(revision 491)
@@ -51,5 +51,5 @@
 ;		CS:BX:	Ptr to IDEVARS
 ;	Returns:
-;		Nothing (jumps to next push below)
+;		Nothing (falls to next push below)
 ;	Corrupts registers:
 ;		AX, CX, DX
@@ -86,33 +86,8 @@
 .PushBlockSizeFromAX:
 	push	ax
+	; Fall to .PushDeviceType
 
 ;--------------------------------------------------------------------
-; PushDeviceType
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (jumps to next push below)
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-.PushDeviceType:
-	mov		al,g_szDeviceTypeValues_Displacement
-%ifdef MODULE_SERIAL
-	mov		ah, [cs:bx+IDEVARS.bDevice]
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
-	eCMOVZ	ah, [di+DPT_ATA.bDevice]	; DPT_ATA contains up to date device information for IDE drives
-	mul		ah
-%else	
-	mul		BYTE [di+DPT_ATA.bDevice]
-%endif
-
-	shr		ax,1			; divide by 2 since IDEVARS.bDevice is multiplied by 2
-
-	add		ax, g_szDeviceTypeValues
-	push	ax
-
-;--------------------------------------------------------------------
-; PushIRQ
+; .PushDeviceType
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
@@ -121,5 +96,43 @@
 ;		Nothing (falls to next push below)
 ;	Corrupts registers:
-;		AX, DX
+;		AX
+;--------------------------------------------------------------------
+.PushDeviceType:
+%ifndef MODULE_SERIAL
+	mov		al, g_szDeviceTypeValues_Displacement
+	mul		BYTE [di+DPT_ATA.bDevice]
+%else
+	mov		ah, [cs:bx+IDEVARS.bDevice]
+	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE	; Clears CF
+	eCMOVZ	ah, [di+DPT_ATA.bDevice]	; DPT_ATA contains up to date device information for IDE drives
+%ifdef USE_UNDOC_INTEL
+	eSALC	; Clear AL using CF (from TEST above)
+	eAAD	g_szDeviceTypeValues_Displacement
+%else
+	mov		al, g_szDeviceTypeValues_Displacement
+	mul		ah
+%endif ; USE_UNDOC_INTEL
+%endif ; MODULE_SERIAL
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+	%if (COUNT_OF_ALL_IDE_DEVICES * 2 * g_szDeviceTypeValues_Displacement) > 255
+		%error "The USE_UNDOC_INTEL block in .PushDeviceType needs to be removed (would cause an overflow)!"
+	%endif
+%endif
+
+	shr		ax, 1	; Divide by 2 since IDEVARS.bDevice is multiplied by 2
+	add		ax, g_szDeviceTypeValues
+	push	ax
+	; Fall to .PushIRQ
+
+;--------------------------------------------------------------------
+; .PushIRQ
+;	Parameters:
+;		DS:DI:	Ptr to DPT
+;		CS:BX:	Ptr to IDEVARS
+;	Returns:
+;		Nothing (falls to next push below)
+;	Corrupts registers:
+;		AX
 ;--------------------------------------------------------------------
 .PushIRQ:
@@ -127,7 +140,8 @@
 	cbw
 	push	ax
+	; Fall to .PushResetStatus
 
 ;--------------------------------------------------------------------
-; PushResetStatus
+; .PushResetStatus
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 491)
@@ -327,5 +327,5 @@
 HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL:
 	eMOVZX	ax, dl
-	call	Char_ChangeCaseInAL	; Upper case drive letter to lower case keystroke
+	xor		al, 32	; Upper case drive letter to lower case keystroke
 	jmp		SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX
 
@@ -376,5 +376,5 @@
 	call	Char_IsLowerCaseLetterInAL
 	jnc		SHORT .KeystrokeIsNotValidHotkey
-	call	Char_ChangeCaseInAL		; We want to print upper case letters
+	xor		al, 32					; We want to print upper case letters
 
 	; Clear HD First flag to assume Floppy Drive hotkey
Index: trunk/XTIDE_Universal_BIOS/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ; GNU General Public License for more details.
-; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html		
-;		
+; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+;
 
 %ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
@@ -24,17 +24,4 @@
 ; Section containing code
 SECTION .text
-
-; POST drive detection strings
-g_szDashForZero:	db	"- ",NULL	; Required by Display Library
-g_szRomAt:			db	LF,CR
-					db	"%s @ %x",LF,CR						; -=XTIDE ... =- @ Segment
-					db	"%s",LF,CR							; version string 
-					db  "Released under GNU GPL v2",LF,CR	
-					db	LF,CR,NULL
-%ifdef MODULE_BOOT_MENU
-g_szBootMenuTitle:	db	"%s%c",LF,CR						; -=XTIDE ... =- and null (eaten)
-					db	"%s",NULL							; version string
-%endif
-g_szDriveName:		db	"%z",LF,CR,NULL
 
 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
@@ -47,5 +34,5 @@
 g_szDetectOuter:		db	"%s at %s: ",NULL
 %ifdef MODULE_SERIAL
-g_szDetectCOM:			db  "COM%c%s",NULL
+g_szDetectCOM:			db	"COM%c%s",NULL
 g_szDetectCOMAuto:		db	" Detect",NULL
 g_szDetectCOMSmall:		db	"/%u%u00",NULL					; IDE Master at COM1/9600:
@@ -53,11 +40,25 @@
 %endif
 g_szDetectEnd:
-g_szDetectPort:			db	"%x",NULL					   	; IDE Master at 1F0h:
+g_szDetectPort:			db	"%x",NULL						; IDE Master at 1F0h:
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 	%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
-		%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
-	%endif
-%endif
+		%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
+	%endif
+%endif
+
+
+; POST drive detection strings
+g_szDashForZero:	db	"- ",NULL	; Required by Display Library
+g_szRomAt:			db	LF,CR
+					db	"%s @ %x",LF,CR						; -=XTIDE ... =- @ Segment
+					db	"%s",LF,CR							; version string
+					db	"Released under GNU GPL v2",LF,CR
+					db	LF,CR,NULL
+%ifdef MODULE_BOOT_MENU
+g_szBootMenuTitle:	db	"%s%c",LF,CR						; -=XTIDE ... =- and null (eaten)
+					db	"%s",NULL							; version string
+%endif
+g_szDriveName:		db	"%z",LF,CR,NULL
 
 
@@ -70,5 +71,4 @@
 
 %ifdef MODULE_HOTKEYS
-
 ; Hotkey Bar strings
 g_szFDD:		db	"FDD [%c]",NULL			; "FDD [A]"
@@ -81,5 +81,4 @@
 
 %ifdef MODULE_BOOT_MENU
-
 ; Boot Menu Floppy Disk strings
 ;
@@ -89,14 +88,14 @@
 ;
 g_szFddStart:
-g_szFddUnknown:	db	"Unknown",NULL
-g_szFddSizeOr:	db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
-g_szFddSize:	db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
-g_szFddThreeHalf:		db  "3",ONE_HALF,NULL
+g_szFddUnknown:		db	"Unknown",NULL
+g_szFddSizeOr:		db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
+g_szFddSize:		db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
+g_szFddThreeHalf:	db	"3",ONE_HALF,NULL
 g_szFddEnd:
-g_szFddFiveQuarter:		db  "5",ONE_QUARTER,NULL
+g_szFddFiveQuarter:	db	"5",ONE_QUARTER,NULL
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 	%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
-		%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
+		%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within Strings.asm"
 	%endif
 %endif
@@ -123,15 +122,16 @@
 %endif
 
+
 g_szDeviceTypeValues:
-g_szDeviceTypeValues_16bit:		db		" 16",NULL
-g_szDeviceTypeValues_32bit:		db		" 32",NULL
-g_szDeviceTypeValues_8bit:		db		"  8",NULL
-g_szDeviceTypeValues_XTIDEr1:	db		"D8 ",NULL	; Dual 8-bit
-g_szDeviceTypeValues_XTIDEr2:	db		"X8 ",NULL	; A0<->A3 swapped 8-bit
-g_szDeviceTypeValues_XTCFpio8:	db		"T8 ",NULL	; True 8-bit
-g_szDeviceTypeValues_XTCFdma:	db		"8MA",NULL	; DMA 8-bit
-g_szDeviceTypeValues_XTCFmem:	db		"M8 ",NULL	; Memory Mapped 8-bit
-g_szDeviceTypeValues_JrIde:		db		"M8 ",NULL
-g_szDeviceTypeValues_Serial:	db		"SER",NULL
+g_szDeviceTypeValues_16bit:		db	" 16",NULL
+g_szDeviceTypeValues_32bit:		db	" 32",NULL
+g_szDeviceTypeValues_8bit:		db	"  8",NULL
+g_szDeviceTypeValues_XTIDEr1:	db	"D8 ",NULL	; Dual 8-bit
+g_szDeviceTypeValues_XTIDEr2:	db	"X8 ",NULL	; A0<->A3 swapped 8-bit
+g_szDeviceTypeValues_XTCFpio8:	db	"T8 ",NULL	; True 8-bit
+g_szDeviceTypeValues_XTCFdma:	db	"8MA",NULL	; DMA 8-bit
+g_szDeviceTypeValues_XTCFmem:	db	"M8 ",NULL	; Memory Mapped 8-bit
+g_szDeviceTypeValues_JrIde:		db	"M8 ",NULL
+g_szDeviceTypeValues_Serial:	db	"SER",NULL
 
 g_szDeviceTypeValues_Displacement equ (g_szDeviceTypeValues_32bit - g_szDeviceTypeValues)
@@ -172,6 +172,6 @@
 %endif
 
-g_szSelectionTimeout:	db		DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
-
+
+g_szSelectionTimeout:	db	DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
 
 
@@ -180,6 +180,6 @@
 g_szCapacityNum:		db	"%5-u.%u %ciB",NULL
 g_szInformation:		db	"%s",LF,CR
-	db	"Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
-	db	   "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
+	db	"Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
+	db	"%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
 
 
@@ -199,5 +199,5 @@
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 	%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
-		%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
+		%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within Strings.asm"
 	%endif
 %endif
@@ -221,5 +221,5 @@
 ;  * There can only be 32 of these (0-31).
 ;  * Keeping the list short is good - this translates to a table in the compressed version.
-;    An error will be reported if a character or format is no longer being used by any 
+;    An error will be reported if a character or format is no longer being used by any
 ;    strings above.
 ;  * Please keep items sequential for ease of further editing.
Index: trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 491)
@@ -13,5 +13,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -20,11 +20,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ; GNU General Public License for more details.
-; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html		
-;		
+; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+;
 
 %ifdef MODULE_STRINGS_COMPRESSED_PRECOMPRESS
@@ -34,4 +34,52 @@
 ; Section containing code
 SECTION .text
+
+; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
+; To support an optimization in that code, these strings must start on the same 256 byte page,
+; which is checked at assembly time below.
+;
+g_szDetectStart:
+g_szDetectMaster:		; db	"Master",NULL
+                 		; db	 4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
+                 		  db	 53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
+
+g_szDetectSlave:		; db	"Slave ",NULL
+                		; db	 53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
+                		  db	 59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
+
+g_szDetectOuter:		; db	"%s at %s: ",NULL
+                		; db	 25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
+                		  db	 3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
+
+%ifdef MODULE_SERIAL
+g_szDetectCOM:			; db	"COM%c%s",NULL
+              			; db	 43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
+              			  db	 49h,  55h,  53h,  3ch,  1dh                      ; compressed
+
+g_szDetectCOMAuto:		; db	" Detect",NULL
+                  		; db	 20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
+                  		  db	 20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
+
+g_szDetectCOMSmall:		; db	"/%u%u00",NULL					; IDE Master at COM1/9600:
+                   		; db	 2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
+                   		  db	 2ah,  35h,  35h,  33h,  13h                      ; compressed
+
+g_szDetectCOMLarge:		; db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
+                   		; db	 2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
+                   		  db	 2ah,  35h,  29h,  35h,  91h                      ; compressed
+
+%endif
+g_szDetectEnd:
+g_szDetectPort:			; db	"%x",NULL						; IDE Master at 1F0h:
+               			; db	 25h,  78h,  00h    ; uncompressed
+               			  db	 17h                ; compressed
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
+%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within Strings.asm"
+%endif
+%endif
+
 
 ; POST drive detection strings
@@ -48,11 +96,11 @@
 	  db	 3dh,  20h, 0c6h,  37h,  39h                            ; compressed
 
-	; db	"%s",LF,CR							; version string 
+	; db	"%s",LF,CR							; version string
 	; db	 25h,  73h,  0ah,  0dh    ; uncompressed
 	  db	 3dh,  39h                ; compressed
 
-	; db  "Released under GNU GPL v2",LF,CR	
-	; db   52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
-	  db   58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
+	; db	"Released under GNU GPL v2",LF,CR
+	; db	 52h,  65h,  6ch,  65h,  61h,  73h,  65h,  64h,  20h,  75h,  6eh,  64h,  65h,  72h,  20h,  47h,  4eh,  55h,  20h,  47h,  50h,  4ch,  20h,  76h,  32h,  0ah,  0dh    ; uncompressed
+	  db	 58h,  6bh,  72h,  6bh,  67h,  79h,  6bh, 0eah,  7bh,  74h,  6ah,  6bh, 0f8h,  4dh,  54h, 0dbh,  4dh,  56h, 0d2h,  7ch,  2ch,  39h                                  ; compressed
 
 	; db	LF,CR,NULL
@@ -75,51 +123,4 @@
 
 
-; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
-; To support an optimization in that code, these strings must start on the same 256 byte page,
-; which is checked at assembly time below.
-;
-g_szDetectStart:
-g_szDetectMaster:		; db	"Master",NULL
-                 		; db	 4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
-                 		  db	 53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
-
-g_szDetectSlave:		; db	"Slave ",NULL
-                		; db	 53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
-                		  db	 59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
-
-g_szDetectOuter:		; db	"%s at %s: ",NULL
-                		; db	 25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
-                		  db	 3dh,  20h,  67h, 0fah,  3dh,  40h,  00h                            ; compressed
-
-%ifdef MODULE_SERIAL
-g_szDetectCOM:			; db  "COM%c%s",NULL
-              			; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
-              			  db   49h,  55h,  53h,  3ch,  1dh                      ; compressed
-
-g_szDetectCOMAuto:		; db	" Detect",NULL
-                  		; db	 20h,  44h,  65h,  74h,  65h,  63h,  74h,  00h    ; uncompressed
-                  		  db	 20h,  4ah,  6bh,  7ah,  6bh,  69h, 0bah          ; compressed
-
-g_szDetectCOMSmall:		; db	"/%u%u00",NULL					; IDE Master at COM1/9600:
-                   		; db	 2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
-                   		  db	 2ah,  35h,  35h,  33h,  13h                      ; compressed
-
-g_szDetectCOMLarge:		; db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
-                   		; db	 2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
-                   		  db	 2ah,  35h,  29h,  35h,  91h                      ; compressed
-
-%endif
-g_szDetectEnd:
-g_szDetectPort:			; db	"%x",NULL					   	; IDE Master at 1F0h:
-               			; db	 25h,  78h,  00h    ; uncompressed
-               			  db	 17h                ; compressed
-
-
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
-%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
-%endif
-%endif
-
 
 ; Boot loader strings
@@ -143,5 +144,4 @@
 
 %ifdef MODULE_HOTKEYS
-
 ; Hotkey Bar strings
 g_szFDD:		; db	"FDD [%c]",NULL			; "FDD [A]"
@@ -172,5 +172,4 @@
 
 %ifdef MODULE_BOOT_MENU
-
 ; Boot Menu Floppy Disk strings
 ;
@@ -180,29 +179,29 @@
 ;
 g_szFddStart:
-g_szFddUnknown:	; db	"Unknown",NULL
-               	; db	 55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
-               	  db	 5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
-
-g_szFddSizeOr:	; db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
-              	; db	 35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
-              	  db	 2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
-
-g_szFddSize:	; db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
-            	; db	 25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
-            	  db	 3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
-
-g_szFddThreeHalf:		; db  "3",ONE_HALF,NULL
-                 		; db   33h, 0abh,  00h    ; uncompressed
-                 		  db   2dh,  02h          ; compressed
+g_szFddUnknown:		; db	"Unknown",NULL
+               		; db	 55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
+               		  db	 5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
+
+g_szFddSizeOr:		; db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
+              		; db	 35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
+              		  db	 2eh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
+
+g_szFddSize:		; db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
+            		; db	 25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
+            		  db	 3dh,  26h,  27h,  20h,  35h,  20h,  71h,  6fh,  88h                      ; compressed
+
+g_szFddThreeHalf:	; db	"3",ONE_HALF,NULL
+                 	; db	 33h, 0abh,  00h    ; uncompressed
+                 	  db	 2dh,  02h          ; compressed
 
 g_szFddEnd:
-g_szFddFiveQuarter:		; db  "5",ONE_QUARTER,NULL
-                   		; db   35h, 0ach,  00h    ; uncompressed
-                   		  db   2eh,  01h          ; compressed
+g_szFddFiveQuarter:	; db	"5",ONE_QUARTER,NULL
+                   	; db	 35h, 0ach,  00h    ; uncompressed
+                   	  db	 2eh,  01h          ; compressed
 
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 %if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
-%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
+%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within Strings.asm"
 %endif
 %endif
@@ -238,44 +237,45 @@
 %endif
 
+
 g_szDeviceTypeValues:
-g_szDeviceTypeValues_16bit:		; db		" 16",NULL
-                           		; db		 20h,  31h,  36h,  00h    ; uncompressed
-                           		  db		 20h,  2bh,  0fh          ; compressed
-
-g_szDeviceTypeValues_32bit:		; db		" 32",NULL
-                           		; db		 20h,  33h,  32h,  00h    ; uncompressed
-                           		  db		 20h,  2dh,  0ch          ; compressed
-
-g_szDeviceTypeValues_8bit:		; db		"  8",NULL
-                          		; db		 20h,  20h,  38h,  00h    ; uncompressed
-                          		  db		 20h,  20h,  10h          ; compressed
-
-g_szDeviceTypeValues_XTIDEr1:	; db		"D8 ",NULL	; Dual 8-bit
-                             	; db		 44h,  38h,  20h,  00h    ; uncompressed
-                             	  db		 4ah,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_XTIDEr2:	; db		"X8 ",NULL	; A0<->A3 swapped 8-bit
-                             	; db		 58h,  38h,  20h,  00h    ; uncompressed
-                             	  db		 5eh,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_XTCFpio8:	; db		"T8 ",NULL	; True 8-bit
-                              	; db		 54h,  38h,  20h,  00h    ; uncompressed
-                              	  db		 5ah,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_XTCFdma:	; db		"8MA",NULL	; DMA 8-bit
-                             	; db		 38h,  4dh,  41h,  00h    ; uncompressed
-                             	  db		 30h,  53h,  87h          ; compressed
-
-g_szDeviceTypeValues_XTCFmem:	; db		"M8 ",NULL	; Memory Mapped 8-bit
-                             	; db		 4dh,  38h,  20h,  00h    ; uncompressed
-                             	  db		 53h,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_JrIde:		; db		"M8 ",NULL
-                           		; db		 4dh,  38h,  20h,  00h    ; uncompressed
-                           		  db		 53h,  30h,  00h          ; compressed
-
-g_szDeviceTypeValues_Serial:	; db		"SER",NULL
-                            	; db		 53h,  45h,  52h,  00h    ; uncompressed
-                            	  db		 59h,  4bh,  98h          ; compressed
+g_szDeviceTypeValues_16bit:		; db	" 16",NULL
+                           		; db	 20h,  31h,  36h,  00h    ; uncompressed
+                           		  db	 20h,  2bh,  0fh          ; compressed
+
+g_szDeviceTypeValues_32bit:		; db	" 32",NULL
+                           		; db	 20h,  33h,  32h,  00h    ; uncompressed
+                           		  db	 20h,  2dh,  0ch          ; compressed
+
+g_szDeviceTypeValues_8bit:		; db	"  8",NULL
+                          		; db	 20h,  20h,  38h,  00h    ; uncompressed
+                          		  db	 20h,  20h,  10h          ; compressed
+
+g_szDeviceTypeValues_XTIDEr1:	; db	"D8 ",NULL	; Dual 8-bit
+                             	; db	 44h,  38h,  20h,  00h    ; uncompressed
+                             	  db	 4ah,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTIDEr2:	; db	"X8 ",NULL	; A0<->A3 swapped 8-bit
+                             	; db	 58h,  38h,  20h,  00h    ; uncompressed
+                             	  db	 5eh,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTCFpio8:	; db	"T8 ",NULL	; True 8-bit
+                              	; db	 54h,  38h,  20h,  00h    ; uncompressed
+                              	  db	 5ah,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_XTCFdma:	; db	"8MA",NULL	; DMA 8-bit
+                             	; db	 38h,  4dh,  41h,  00h    ; uncompressed
+                             	  db	 30h,  53h,  87h          ; compressed
+
+g_szDeviceTypeValues_XTCFmem:	; db	"M8 ",NULL	; Memory Mapped 8-bit
+                             	; db	 4dh,  38h,  20h,  00h    ; uncompressed
+                             	  db	 53h,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_JrIde:		; db	"M8 ",NULL
+                           		; db	 4dh,  38h,  20h,  00h    ; uncompressed
+                           		  db	 53h,  30h,  00h          ; compressed
+
+g_szDeviceTypeValues_Serial:	; db	"SER",NULL
+                            	; db	 53h,  45h,  52h,  00h    ; uncompressed
+                            	  db	 59h,  4bh,  98h          ; compressed
 
 
@@ -317,8 +317,8 @@
 %endif
 
-g_szSelectionTimeout:	; db		DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
-                     	; db		0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
-                     	  db		 31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
-
+
+g_szSelectionTimeout:	; db	DOUBLE_BOTTOM_LEFT_CORNER,DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL,"%ASelection in %2-u s",NULL
+                     	; db	0c8h, 0b5h,  25h,  41h,  53h,  65h,  6ch,  65h,  63h,  74h,  69h,  6fh,  6eh,  20h,  69h,  6eh,  20h,  25h,  32h,  2dh,  75h,  20h,  73h,  00h    ; uncompressed
+                     	  db	 31h,  32h,  3bh,  59h,  6bh,  72h,  6bh,  69h,  7ah,  6fh,  75h, 0f4h,  6fh, 0f4h,  3ah,  20h, 0b9h                                              ; compressed
 
 
@@ -337,11 +337,11 @@
                 		  db	 3dh,  39h                ; compressed
 
-	; db	"Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
+	; db	"Addr. ",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,"IRQ",SINGLE_VERTICAL,"Reset",LF,CR
 	; db	 41h,  64h,  64h,  72h,  2eh,  20h, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh    ; uncompressed
 	  db	 47h,  6ah,  6ah,  78h,  29h,  20h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  39h          ; compressed
 
-	; db	   "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
-	; db	    25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
-	  db	    3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
+	; db	"%s",SINGLE_VERTICAL,"%5-u",SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",NULL
+	; db	 25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
+	  db	 3dh,  23h,  36h,  23h,  3dh,  23h,  20h,  34h,  23h,  18h                                                                            ; compressed
 
 
@@ -374,5 +374,5 @@
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
 %if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
-%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
+%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within Strings.asm"
 %endif
 %endif
@@ -396,5 +396,5 @@
 ;  * There can only be 32 of these (0-31).
 ;  * Keeping the list short is good - this translates to a table in the compressed version.
-;    An error will be reported if a character or format is no longer being used by any 
+;    An error will be reported if a character or format is no longer being used by any
 ;    strings above.
 ;  * Please keep items sequential for ease of further editing.
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -67,6 +67,15 @@
 AccessDPT_GetDeviceControlByteToAL:
 %ifdef MODULE_IRQ
+
+%ifndef USE_UNDOC_INTEL
 	xor		al, al
-	test	BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ
+%endif
+
+	test	BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ	; Clears CF
+
+%ifdef USE_UNDOC_INTEL
+	eSALC	; Clears AL using CF while preserving flags
+%endif
+
 	jnz		SHORT .EnableDeviceIrq
 	or		al, FLG_DEVCONTROL_nIEN	; Disable IRQ
@@ -74,5 +83,5 @@
 %else
 	mov		al, FLG_DEVCONTROL_nIEN	; Disable IRQ
-%endif
+%endif ; MODULE_IRQ
 	ret
 
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 491)
@@ -81,14 +81,13 @@
 AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSIandTranslateModeInDX:
 	call	AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI
-	; Fall to AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBH
+	; Fall to AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBHandTranslateModeInDX
 
 AtaGeometry_GetLCHStoAXBLBHfromPCHSinAXBLBHandTranslateModeInDX:
 	; Check if user defined translate mode
-	test	dx, dx
-	jnz		SHORT .CheckIfLargeTranslationWanted
+	dec		dx						; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
+	jns		SHORT .CheckIfLargeTranslationWanted
 	MIN_U	ax, MAX_LCHS_CYLINDERS	; TRANSLATEMODE_NORMAL maximum cylinders
 	inc		dx
 .CheckIfLargeTranslationWanted:
-	dec		dx						; Set ZF if TRANSLATEMODE_LARGE
 	jz		SHORT ConvertPCHfromAXBLtoRevisedEnhancedCHinAXBL
 	dec		dx						; Set ZF if TRANSLATEMODE_ASSISTED_LBA
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 491)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -33,5 +33,5 @@
 BootVars_Initialize:
 %ifdef MODULE_8BIT_IDE
-	mov		WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_1
+	mov		WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_DETECTION_SEED
 %endif
 
@@ -72,24 +72,2 @@
 
 %endif ; MODULE_HOTKEYS
-
-
-%ifdef MODULE_8BIT_IDE
-;--------------------------------------------------------------------
-; BootVars_GetNextXTCFportToDetectToDX
-;	Parameters:
-;		ES:		BDA Segment
-;	Returns:
-;		DX:		Next XT-CF port to detect
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-BootVars_GetNextXTCFportToDetectToDX:
-	mov		dx, [es:BOOTVARS.wNextXTCFportToScan]
-	test	dl, dl
-	jz		SHORT .NextOneIs240hor340h
-	add		WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_3 - XTCF_BASE_PORT_2
-	ret
-.NextOneIs240hor340h:
-	mov		BYTE [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_2 & 0FFh	; 40h
-	ret		
-%endif ; MODULE_8BIT_IDE
Index: trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- trunk/XTIDE_Universal_BIOS/makefile	(revision 490)
+++ trunk/XTIDE_Universal_BIOS/makefile	(revision 491)
@@ -34,4 +34,5 @@
 # USE_386                     Use instructions supported by 386 and later                          #
 # USE_AT                      Use features supported on AT and later systems (not available on XT) #
+# USE_UNDOC_INTEL             Optimizations for Intel CPU:s - do NOT use on NEC V20/V30/Sony CPU:s #
 #                                                                                                  #
 ####################################################################################################
@@ -99,5 +100,5 @@
 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
 DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
-DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
+DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 USE_UNDOC_INTEL RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
 
 DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
@@ -108,5 +109,5 @@
 DEFINES_386_8K = $(DEFINES_AT) USE_386
 
-DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS 
+DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS
 
 
@@ -225,5 +226,5 @@
 	@perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE)
 
-unused: 
+unused:
 	@echo "All Features"
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_ALL_FEATURES) $(DEFS_XT) $(DEFS_XT_PLUS) $(DEFS_AT) $(DEFS_XT_LARGE) $(DEFS_XTPLUS_LARGE) $(DEFS_AT_LARGE) $(DEFS_XT_TINY) $(DEFS_386_8K) -o"$(TARGET)_unused.asm" -l"$(TARGET)_unused.lst"
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Configuration_FullMode.txt
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Configuration_FullMode.txt	(revision 490)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Configuration_FullMode.txt	(revision 491)
@@ -3,3 +3,3 @@
 Lite mode supports only one IDE controller (2 drives) and stores parameters to the top of the interrupt vectors (30:0h) so no Conventional memory needs to be reserved. Lite mode cannot be used if some software requires the top of interrupt vectors. Usually this is not a problem since only IBM ROM BASIC uses them.
 
-Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is required for XTIDE Universal BIOS. This would mean 129 kiB but most software should work with 65 kiB reserved.
+Tandy 1000 models with 640 kiB or less memory need to use Lite mode since the top of Conventional memory gets dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is required for XTIDE Universal BIOS. This would mean 65 kiB but most software should work with 33 kiB reserved.
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 490)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 491)
@@ -388,5 +388,5 @@
 	ja		SHORT .EnableMenuitemFromCSBX
 	jmp		SHORT .DisableMenuitemFromCSBX
-	
+
 
 ;--------------------------------------------------------------------
@@ -452,5 +452,4 @@
 .DisableIRQchannelSelection:
 	mov		bx, g_MenuitemIdeControllerIdeIRQ
-	jz		SHORT .DisableMenuitemFromCSBX
 	jmp		SHORT .DisableMenuitemFromCSBX
 
