Index: trunk/Assembly_Library/Inc/Emulate.inc
===================================================================
--- trunk/Assembly_Library/Inc/Emulate.inc	(revision 154)
+++ trunk/Assembly_Library/Inc/Emulate.inc	(revision 162)
@@ -376,5 +376,5 @@
 		db	01100101b
 	%else
-		%error "Invalid segment overried passed to eSEG!"
+		%error "Invalid segment override passed to eSEG!"
 	%endif
 %endmacro
Index: trunk/Assembly_Library/Src/AssemblyLibrary.asm
===================================================================
--- trunk/Assembly_Library/Src/AssemblyLibrary.asm	(revision 154)
+++ trunk/Assembly_Library/Src/AssemblyLibrary.asm	(revision 162)
@@ -60,6 +60,6 @@
 	%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 		%include "String.asm"
+		%include "StringProcess.asm"
 	%endif
-	%include "StringProcess.asm"
 %endif
 
Index: trunk/Assembly_Library/Src/Display/CgaSnow.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/CgaSnow.asm	(revision 154)
+++ trunk/Assembly_Library/Src/Display/CgaSnow.asm	(revision 162)
@@ -31,6 +31,6 @@
 
 
-; CGA snow preventing must be kept optional so unnecerrasy overhead
-; can be prevented when building program ment for non-CGA systems.
+; CGA snow prevention must be kept optional to avoid unnecessary
+; overhead when building programs meant for non-CGA systems.
 %ifdef ELIMINATE_CGA_SNOW
 
@@ -74,6 +74,6 @@
 .StoswWithoutWaitSinceUnknownPort:
 	stosw
+	sti
 	pop		bx
-	sti
 	ret
 
Index: trunk/Assembly_Library/Src/Display/DisplayContext.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/DisplayContext.asm	(revision 154)
+++ trunk/Assembly_Library/Src/Display/DisplayContext.asm	(revision 162)
@@ -268,10 +268,10 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS	; This appears to be completely unused
-ALIGN JUMP_ALIGN
-DisplayContext_GetCharacterOutputParameterToDX:
-	mov		dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
-	ret
-%endif
+;%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS	; This appears to be completely unused
+;ALIGN JUMP_ALIGN
+;DisplayContext_GetCharacterOutputParameterToDX:
+;	mov		dx, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.wCharOutParam]
+;	ret
+;%endif
 
 
Index: trunk/Assembly_Library/Src/Display/DisplayPrint.asm
===================================================================
--- trunk/Assembly_Library/Src/Display/DisplayPrint.asm	(revision 154)
+++ trunk/Assembly_Library/Src/Display/DisplayPrint.asm	(revision 162)
@@ -25,5 +25,5 @@
 ;	For example %8-d would prepend integer with spaces so that at least
 ;	8 characters would be printed.
-; 
+;
 ; DisplayPrint_FormattedNullTerminatedStringFromCSSI
 ;	Parameters:
@@ -158,5 +158,5 @@
 	loop	.PrintNextCharacter
 
-	LOAD_BDA_SEGMENT_TO	ds, dx
+	mov		ds, cx	; Restore DS to BDA. Not needed unless DisplayPrint_CharacterFromAL changes DS.
 	pop		cx
 	pop		si
Index: trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm	(revision 154)
+++ trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm	(revision 162)
@@ -1,7 +1,3 @@
-; File name		:	Dialog.asm
 ; Project name	:	Assembly Library
-; Created date	:	6.8.2010
-; Last update	:	22.11.2010
-; Author		:	Tomi Tilli
 ; Description	:	Common functions for many dialogs.
 
@@ -235,25 +231,6 @@
 	call	MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
 	cmp		ah, dh		; Dialog taller than parent?
-	jb		SHORT .RedrawDialogAreaAndWholeParentWindow
-	jmp		SHORT .RedrawWholeParentWindow
-
-;--------------------------------------------------------------------
-; .GetParentTitleBorderCoordinatesToDX
-;	Parameters:
-;		SS:SI:	Ptr to parent MENU
-;		SS:BP:	Ptr to DIALOG
-;	Returns:
-;		DL:		Parent border column (X)
-;		DH:		Parent border row (Y)
-;	Corrupts:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-.GetParentTitleBorderCoordinatesToDX:
-	xchg	si, bp
-	call	MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
-	xchg	bp, si
-	xchg	dx, ax
-	ret
+	jnb		SHORT .RedrawWholeParentWindow
+	; Fall to .RedrawDialogAreaAndWholeParentWindow
 
 ;--------------------------------------------------------------------
@@ -268,5 +245,4 @@
 ;		AX, BX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 .RedrawDialogAreaAndWholeParentWindow:
 	push	si
@@ -286,2 +262,21 @@
 	pop		bp
 	ret
+
+;--------------------------------------------------------------------
+; .GetParentTitleBorderCoordinatesToDX
+;	Parameters:
+;		SS:SI:	Ptr to parent MENU
+;		SS:BP:	Ptr to DIALOG
+;	Returns:
+;		DL:		Parent border column (X)
+;		DH:		Parent border row (Y)
+;	Corrupts:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetParentTitleBorderCoordinatesToDX:
+	xchg	si, bp
+	call	MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
+	xchg	bp, si
+	xchg	dx, ax
+	ret
Index: trunk/Assembly_Library/Src/String/Char.asm
===================================================================
--- trunk/Assembly_Library/Src/String/Char.asm	(revision 154)
+++ trunk/Assembly_Library/Src/String/Char.asm	(revision 162)
@@ -1,7 +1,3 @@
-; File name		:	Char.asm
 ; Project name	:	Assembly Library
-; Created date	:	28.6.2010
-; Last update	:	7.9.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for handling characters.
 
@@ -18,5 +14,5 @@
 ;	Returns:
 ;		CF:		Set if character is range
-;				(Jumps to CharIsNotValid if before range)
+;				(Jumps to Char_CharIsNotValid if before range)
 ;	Corrupts registers:
 ;		Nothing
@@ -24,5 +20,5 @@
 %macro IS_BETWEEN_IMMEDIATES 3
 	cmp		%1, %2
-	jb		SHORT CharIsNotValid
+	jb		SHORT Char_CharIsNotValid
 	cmp		%1, (%3)+1				; Set CF if %1 is lesser
 %endmacro
@@ -54,8 +50,10 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_IsUpperCaseLetterInAL:
 	IS_BETWEEN_IMMEDIATES al, 'A', 'Z'
 	ret
+%endif
 
 ;--------------------------------------------------------------------
@@ -70,4 +68,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_IsHexadecimalDigitInAL:
@@ -77,4 +76,5 @@
 	IS_BETWEEN_IMMEDIATES al, 'a', 'f'
 	ret
+%endif
 
 ;--------------------------------------------------------------------
@@ -106,4 +106,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_ConvertIntegerToALfromDigitInALwithBaseInBX:
@@ -112,5 +113,5 @@
 	call	dx						; Converts to lower case
 	pop		dx
-	jnc		SHORT CharIsNotValid
+	jnc		SHORT Char_CharIsNotValid
 
 	cmp		al, '9'					; Decimal digit
@@ -120,24 +121,27 @@
 .ConvertToDecimalDigit:
 	sub		al, '0'					; Convert to decimal integer
-	; Fall to CharIsValid
-
-;--------------------------------------------------------------------
-; CharIsValid
-; CharIsNotValid
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CF:		Set for CharIsValid
-;				Cleared for CharIsNotValid
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
+	; Fall to Char_CharIsValid
+%endif
+
+;--------------------------------------------------------------------
+; Char_CharIsValid
+; Char_CharIsNotValid
+;	Parameters:
+;		Nothing
+;	Returns:
+;		CF:		Set for Char_CharIsValid
+;				Cleared for Char_CharIsNotValid
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_CharIsValid:
 	stc
 	ret
-
-ALIGN JUMP_ALIGN
-CharIsNotValid:
+%endif
+
+ALIGN JUMP_ALIGN
+Char_CharIsNotValid:
 	clc
 	ret
@@ -153,4 +157,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_ALtoLowerCaseLetter:
@@ -160,4 +165,5 @@
 .Return:
 	ret
+%endif
 
 ;--------------------------------------------------------------------
@@ -188,4 +194,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
 ALIGN JUMP_ALIGN
 Char_GetFilterFunctionToDXforNumericBaseInBX:
@@ -193,5 +200,6 @@
 	cmp		bl, 10
 	je		SHORT .Return
-	sub		dx, BYTE Char_IsDecimalDigitInAL - Char_IsHexadecimalDigitInAL
+	mov		dx, Char_IsHexadecimalDigitInAL
 .Return:
 	ret
+%endif
Index: trunk/Assembly_Library/Src/String/StringProcess.asm
===================================================================
--- trunk/Assembly_Library/Src/String/StringProcess.asm	(revision 154)
+++ trunk/Assembly_Library/Src/String/StringProcess.asm	(revision 162)
@@ -1,7 +1,3 @@
-; File name		:	StringProcess.asm
 ; Project name	:	Assembly Library
-; Created date	:	12.10.2010
-; Last update	:	7.12.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for processing characters in a string.
 
@@ -33,5 +29,5 @@
 ;		CX:		Number of characters processed
 ;		CF:		Clear if all characters processed
-;				Set if terminated by processing function				
+;				Set if terminated by processing function
 ;	Corrupts registers:
 ;		Nothing (processing function can corrupt BX,DI,ES)
@@ -91,5 +87,6 @@
 StringProcess_ConvertToWordInDIWithBaseInBX:
 	call	Char_ConvertIntegerToALfromDigitInALwithBaseInBX
-	jnc		SHORT .InvalidCharacter
+	cmc
+	jc		SHORT .InvalidCharacter
 	push	dx
 
@@ -99,11 +96,7 @@
 	jc		SHORT .Overflow
 	add		di, ax		; Add old WORD to new integer
-	jc		SHORT .Overflow
 
-	pop		dx
-	ret
 .Overflow:
 	pop		dx
 .InvalidCharacter:
-	stc					; Set CF to stop processing
 	ret
