Index: trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -95,4 +95,18 @@
 
 ;--------------------------------------------------------------------
+; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
+;	Parameters:
+;		DS:SI:		Ptr to MENUINIT struct to initialize
+;		SS:BP:		Ptr to DIALOG
+;	Returns:
+;		DS:SI:		Ptr to initialized MENUINIT struct
+;		CF:			Set since event processed
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero:
+	xor		ax, ax
+	; Fall to Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
+
+;--------------------------------------------------------------------
 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
 ;	Parameters:
@@ -104,5 +118,4 @@
 ;		CF:			Set since event processed
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX:
 	les		di, [bp+DIALOG.fpDialogIO]
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogDrive.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -56,6 +56,5 @@
 ALIGN JUMP_ALIGN
 .InitializeMenuinitFromDSSI:
-	xor		ax, ax
-	call	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
+	call	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
 	call	Drive_GetFlagsForAvailableDrivesToDXAX
 	mov		[bp+MENU.dwUserData], ax
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -121,6 +121,8 @@
 .rgszInfoStringLookup:
 	dw		g_szChangeDrive
+%ifndef EXCLUDE_FROM_XTIDECFG
 	dw		g_szSelectDirectory
 	dw		g_szCreateNew
+%endif
 
 .rgfnEventHandlers:
@@ -156,8 +158,7 @@
 	call	LoadItemStringBufferToESDI
 	call	SortDirectoryContentsStringFromESDIwithCountInCX
-	call	RemoveLastLFandTerminateESDIwithNull
-
+	xor		ax, ax
+	mov		[es:di-1], al							; Terminate with NULL
 	call	Registers_CopySSBPtoDSSI
-	xor		ax, ax
 	call	Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX
 	call	GetInfoLinesToCXandDialogFlagsToAX
@@ -436,21 +437,4 @@
 
 ;--------------------------------------------------------------------
-; RemoveLastLFandTerminateESDIwithNull
-;	Parameters:
-;		ES:DI:	Ptr to end of buffer to terminate
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-RemoveLastLFandTerminateESDIwithNull:
-	dec		di
-	xor		ax, ax
-	stosb
-	ret
-
-
-;--------------------------------------------------------------------
 ; GetInfoLinesToCXandDialogFlagsToAX
 ;	Parameters:
@@ -586,8 +570,10 @@
 HandleFunctionKeyFromAH:
 	call	GetDialogFlagsToAL
+%ifndef EXCLUDE_FROM_XTIDECFG
 	cmp		ah, KEY_FILEDIALOG_NEW_FILE_OR_DIR
 	je		SHORT HandleFunctionKeyForCreatingNewFileOrDirectory
 	cmp		ah, KEY_FILEDIALOG_SELECT_DIRECTORY
 	je		SHORT HandleFunctionKeyForSelectingDirectoryInsteadOfFile
+%endif
 	cmp		ah, KEY_FILEDIALOG_CHANGE_DRIVE
 	je		SHORT HandleFunctionKeyForDriveChange
@@ -607,4 +593,5 @@
 ;		All, except BP
 ;--------------------------------------------------------------------
+%ifndef EXCLUDE_FROM_XTIDECFG
 ALIGN JUMP_ALIGN
 HandleFunctionKeyForCreatingNewFileOrDirectory:
@@ -649,4 +636,5 @@
 	jz		SHORT ReturnWithoutHandlingKeystroke
 	; Fall to CloseFileDialogAfterSuccessfulSelection
+%endif ; EXCLUDE_FROM_XTIDECFG
 
 ;--------------------------------------------------------------------
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -89,19 +89,4 @@
 ProgressEventHandler:
 	jmp		[cs:bx+.rgfnEventHandlers]
-
-
-ALIGN JUMP_ALIGN
-.InitializeMenuinitFromDSSI:
-	mov		ax, NO_ITEM_HIGHLIGHTED
-	call	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
-	lds		si, [bp+DIALOG.fpDialogIO]
-	call	TimerTicks_ReadFromBdaToAX
-	mov		[si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
-
-	; 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
-	dec		WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
-	jmp		SHORT CalculateProgressNeededBeforeUpdatingCharacter
 
 
@@ -153,4 +138,18 @@
 
 
+ALIGN JUMP_ALIGN
+.InitializeMenuinitFromDSSI:
+	mov		ax, NO_ITEM_HIGHLIGHTED
+	call	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
+	lds		si, [bp+DIALOG.fpDialogIO]
+	call	TimerTicks_ReadFromBdaToAX
+	mov		[si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
+
+	; 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
+	dec		WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
+	; Fall to CalculateProgressNeededBeforeUpdatingCharacter
+
 ;--------------------------------------------------------------------
 ; CalculateProgressNeededBeforeUpdatingCharacter
@@ -163,5 +162,4 @@
 ;		AX, BX, DX, SI, DS
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 CalculateProgressNeededBeforeUpdatingCharacter:
 	call	MenuLocation_GetMaxTextLineLengthToAX
@@ -216,5 +214,4 @@
 ALIGN JUMP_ALIGN
 .RepeatProgressCharacterCXtimesFromAL:
-	jcxz	NothingToRepeat
 	JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
 
@@ -233,5 +230,4 @@
 	mov		bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue]
 	sub		bx, [si+PROGRESS_DIALOG_IO.wMinProgressValue]
-NothingToRepeat:
 	ret
 
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -55,10 +55,4 @@
 
 ALIGN JUMP_ALIGN
-.InitializeMenuinitFromDSSI:
-	xor		ax, ax
-	jmp		Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
-
-
-ALIGN JUMP_ALIGN
 .IdleProcessing:
 	xor		cx, cx						; Item 0 is used as input line
@@ -73,5 +67,5 @@
 .rgfnEventHandlers:
 istruc MENUEVENT
-	at	MENUEVENT.InitializeMenuinitFromDSSI,	dw	.InitializeMenuinitFromDSSI
+	at	MENUEVENT.InitializeMenuinitFromDSSI,	dw	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
 	at	MENUEVENT.ExitMenu,						dw	Dialog_EventExitMenu
 	at	MENUEVENT.IdleProcessing,				dw	.IdleProcessing
Index: trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -56,10 +56,4 @@
 
 ALIGN JUMP_ALIGN
-.InitializeMenuinitFromDSSI:
-	xor		ax, ax
-	jmp		Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX
-
-
-ALIGN JUMP_ALIGN
 .IdleProcessing:
 	xor		cx, cx						; Item 0 is used as input line
@@ -74,5 +68,5 @@
 .rgfnEventHandlers:
 istruc MENUEVENT
-	at	MENUEVENT.InitializeMenuinitFromDSSI,	dw	.InitializeMenuinitFromDSSI
+	at	MENUEVENT.InitializeMenuinitFromDSSI,	dw	Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithItemZero
 	at	MENUEVENT.ExitMenu,						dw	Dialog_EventExitMenu
 	at	MENUEVENT.IdleProcessing,				dw	.IdleProcessing
Index: trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -51,5 +51,6 @@
 	call	StringProcess_DSSIwithFunctionInDX
 
-	lea		ax, [bx+1]
+	xchg	bx, ax
+	inc		ax
 	eLEAVE_STRUCT	ITEM_LINE_SPLITTER_size
 	pop		di
@@ -119,19 +120,10 @@
 ProcessCharacterFromStringToSplit:
 	cmp		al, ' '
-	ja		SHORT .CheckLineLength
-	mov		di, si				; DS:DI now points start of new word
-	je		SHORT .CheckLineLength
+	jbe		SHORT .ControlCharacterOrSpace
 
-	cmp		al, LF
-	je		SHORT .ChangeToNextLine
-	cmp		al, CR
-	jne		SHORT .IgnoreUnsupportedControlCharacter
-	xor		cx, cx				; Carriage return so reset line length so far
-
-ALIGN JUMP_ALIGN
 .CheckLineLength:
 	cmp		[bp+ITEM_LINE_SPLITTER.wMaxTextLineLength], cx
 	jb		SHORT .ChangeToNextLine
-	ret		; With CF cleared
+	ret								; With CF cleared
 
 ALIGN JUMP_ALIGN
@@ -140,12 +132,20 @@
 	je		SHORT .WantedLineFound
 
-	inc		bx					; Increment line
-	xor		cx, cx				; Zero character counter (and clear CF)
-	mov		si, di				; Start from complete word
+	inc		bx						; Increment line
+	mov		si, di					; Start from complete word
 	mov		[bp+ITEM_LINE_SPLITTER.wStartOfLine], di
+.CarriageReturn:
+	xor		cx, cx					; Zero character counter (and clear CF)
 	ret
 
 ALIGN JUMP_ALIGN
-.IgnoreUnsupportedControlCharacter:
+.ControlCharacterOrSpace:
+	mov		di, si					; DS:DI now points start of new word
+	je		SHORT .CheckLineLength	; Jump if space
+	cmp		al, LF
+	je		SHORT .ChangeToNextLine
+	cmp		al, CR
+	je		SHORT .CarriageReturn	; Reset line length
+	; Unsupported control character - ignore it
 	dec		cx
 	clc
Index: trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm
===================================================================
--- trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm	(revision 602)
+++ trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm	(revision 625)
@@ -4,5 +4,5 @@
 ;
 ; XTIDE Universal BIOS and Associated Tools
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team.
 ;
 ; This program is free software; you can redistribute it and/or modify
@@ -19,37 +19,32 @@
 
 ; Strings for Progress Dialog
-g_szTimeElapsed:		db	"Time elapsed  :",NULL
-g_szTimeLeft:			db	"Estimated left:",NULL
-g_szTimeFormat:			db	" %2-u min %2-u sec",LF,CR,NULL
+g_szTimeElapsed:				db	"Time elapsed  :",NULL
+g_szTimeLeft:					db	"Estimated left:",NULL
+g_szTimeFormat:					db	" %2-u min %2-u sec",LF,CR,NULL
 
 ; Strings for Drive Dialog
-g_szDriveFormat:		db	"%c:",NULL
+g_szDriveFormat:				db	"%c:",NULL
 
 ; Strings for File Dialog
-g_szChangeDrive:		db	"F2 Change Drive",LF,CR,NULL
-g_szSelectDirectory:	db	"F3 Select Current Directory",LF,CR,NULL
-g_szCreateNew:			db	"F4 Input new File or Directory",NULL
+g_szChangeDrive:				db	"F2 Change Drive",NULL
+%ifndef EXCLUDE_FROM_XTIDECFG
+g_szSelectDirectory:			db	"F3 Select Current Directory",NULL
+g_szCreateNew:					db	"F4 Input new File or Directory",NULL
+%endif
 
-g_szSelectNewDrive:
-	db		"Select new drive.",NULL
-g_szLoadingPleaseWait:
-	db		"Loading. Please wait...",NULL
+g_szSelectNewDrive:				db	"Select new drive.",NULL
+g_szLoadingPleaseWait:			db	"Loading. Please wait...",NULL
 
-g_szEnterNewFileOrDirectory:
-	db		"Enter name for new file or directory.",NULL
+%ifndef EXCLUDE_FROM_XTIDECFG
+g_szEnterNewFileOrDirectory:	db	"Enter name for new file or directory.",NULL
+%endif
 
 FILE_STRING_LENGTH		EQU		(24+1)	; +1 = LF in directory contents string
-g_szFileFormat:
-	db		"%16S%4-u %c%cB",LF,NULL
-g_szDirectoryFormat:
-	db		"%16S%s-DIR",LF,NULL
-g_szSub:
-	db		ANGLE_QUOTE_RIGHT,"SUB",NULL
-g_szUp:
-	db		ANGLE_QUOTE_LEFT," UP",NULL
+g_szFileFormat:					db	"%16S%4-u %c%cB",LF,NULL
+g_szDirectoryFormat:			db	"%16S%s-DIR",LF,NULL
+g_szSub:						db	ANGLE_QUOTE_RIGHT,"SUB",NULL
+g_szUp:							db	ANGLE_QUOTE_LEFT," UP",NULL
 
 g_szSingleItem:			; Used by Dialog.asm for single item line
-g_szUpdir:
-	db		".."
-g_szNull:
-	db		NULL
+g_szUpdir:						db	".."
+g_szNull:						db	NULL
