Index: /trunk/Assembly_Library/Src/Keyboard/Keyboard.asm
===================================================================
--- /trunk/Assembly_Library/Src/Keyboard/Keyboard.asm	(revision 144)
+++ /trunk/Assembly_Library/Src/Keyboard/Keyboard.asm	(revision 145)
@@ -159,5 +159,5 @@
 	je		SHORT .Backspace
 	jcxz	.RejectCharacter
-	test	al, al								; Clear ZF and CF
+	clc											; Clear CF (ZF is already cleared)
 	ret
 
Index: /trunk/Assembly_Library/Src/String/Char.asm
===================================================================
--- /trunk/Assembly_Library/Src/String/Char.asm	(revision 144)
+++ /trunk/Assembly_Library/Src/String/Char.asm	(revision 145)
@@ -116,7 +116,5 @@
 	cmp		al, '9'					; Decimal digit
 	jbe		SHORT .ConvertToDecimalDigit
-	sub		al, 'a'-10				; Convert to hexadecimal integer
-	stc
-	ret
+	sub		al, 'a'-'0'-10			; Convert to hexadecimal integer
 ALIGN JUMP_ALIGN
 .ConvertToDecimalDigit:
Index: /trunk/Assembly_Library/makefile
===================================================================
--- /trunk/Assembly_Library/makefile	(revision 144)
+++ /trunk/Assembly_Library/makefile	(revision 145)
@@ -50,5 +50,5 @@
 # Assembler preprocessor defines.                               #
 #################################################################
-DEFINES = 
+DEFINES =
 DEFINES_XT = ELIMINATE_CGA_SNOW
 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
@@ -69,5 +69,5 @@
 IHEADERS = $(HEADERS:%=-I%)
 
-# Path + target file to be build
+# Path + target file to be built
 TARGET = $(BUILD_DIR)/$(PROG)
 
@@ -107,17 +107,17 @@
 # Make clean debug and release versions
 all: clean at xtplus xt
-	@echo All build!
+	@echo All done!
 
 at:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
-	@echo AT version "$(TARGET)_at.$(EXTENSION)" build.
+	@echo AT version "$(TARGET)_at.$(EXTENSION)" built.
 
 xtplus:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
-	@echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
+	@echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.
 
 xt:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.$(EXTENSION)"
-	@echo XT version "$(TARGET)_xt.$(EXTENSION)" build.
+	@echo XT version "$(TARGET)_xt.$(EXTENSION)" built.
 
 clean:
Index: /trunk/Configurator/Src/BiosFile.asm
===================================================================
--- /trunk/Configurator/Src/BiosFile.asm	(revision 144)
+++ /trunk/Configurator/Src/BiosFile.asm	(revision 145)
@@ -1,7 +1,3 @@
-; File name		:	EEPROM.asm
 ; Project name	:	XTIDE Univeral BIOS Configurator
-; Created date	:	20.4.2010
-; Last update	:	21.4.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for loading and saving BIOS image file.
 
@@ -154,18 +150,17 @@
 ;				Cleared if supported size
 ;	Corrupts registers:
-;		DX
+;		Nothing
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 BiosFile_GetFileSizeToCX:
-	mov		cx, [si+DTA.dwFileSize]
-	mov		dx, [si+DTA.dwFileSize+2]
-	test	dx, dx						; More than 65535 bytes?
+	mov		cx, [si+DTA.dwFileSize+2]	; High word of file size to CX
+	test	cx, cx						; File larger than 65535 bytes? (clears CF)
+	mov		cx, [si+DTA.dwFileSize]		; Low word of file size to CX
 	jnz		SHORT .TooLargeFile
 	cmp		cx, MAX_EEPROM_SIZE			; Too large?
 	ja		SHORT .TooLargeFile
-	clc
-	ret
-.TooLargeFile:
 	stc
+.TooLargeFile:							; CF is always cleared when jumping to here
+	cmc									; So we invert it
 	ret
 
Index: /trunk/Configurator/Src/MenuPageItem.asm
===================================================================
--- /trunk/Configurator/Src/MenuPageItem.asm	(revision 144)
+++ /trunk/Configurator/Src/MenuPageItem.asm	(revision 145)
@@ -1,7 +1,3 @@
-; File name		:	MenuPageItem.asm
 ; Project name	:	XTIDE Univeral BIOS Configurator
-; Created date	:	15.4.2010
-; Last update	:	1.5.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions to access MENUPAGEITEM structs.
 
@@ -363,6 +359,6 @@
 MainPageItem_ActivateSubmenuForGettingLookupValueWithoutMarkingUnsaved:
 	call	MainPageItem_ActivateSubmenu
-	cmp		cx, BYTE 0
-	jl		SHORT .Return						; User cancellation
+	test	cx, cx								; Clears CF
+	js		SHORT .Return						; User cancellation
 	push	si
 	mov		si, [di+MENUPAGEITEM.pSubMenuPage]	; DS:SI points to value MENUPAGE
@@ -374,7 +370,5 @@
 	pop		si
 	stc											; Changes so redraw
-	ret
 .Return:
-	clc
 	ret
 
Index: /trunk/Configurator/Src/Menupages/FlashMenu.asm
===================================================================
--- /trunk/Configurator/Src/Menupages/FlashMenu.asm	(revision 144)
+++ /trunk/Configurator/Src/Menupages/FlashMenu.asm	(revision 145)
@@ -1,7 +1,3 @@
-; File name		:	FlashMenu.asm
 ; Project name	:	XTIDE Univeral BIOS Configurator
-; Created date	:	29.4.2010
-; Last update	:	2.5.2010
-; Author		:	Tomi Tilli
 ; Description	:	Flash menu.
 
@@ -143,7 +139,5 @@
 	mov		[g_cfgVars+CFGVARS.bPageSize], al
 	stc
-	ret
 .Cancel:
-	clc
 	ret
 
@@ -306,5 +300,5 @@
 ;	Corrupts registers:
 ;		AX, BX, CX, DX
-;--------------------------------------------------------------------	
+;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 FlashMenu_FlashAllPagesBeforeUpdate:
Index: /trunk/Configurator/makefile
===================================================================
--- /trunk/Configurator/makefile	(revision 144)
+++ /trunk/Configurator/makefile	(revision 145)
@@ -59,5 +59,5 @@
 IHEADERS += -I.
 
-# Path + target file to be build
+# Path + target file to be built
 TARGET = $(BUILD_DIR)\$(PROG).com
 
@@ -93,5 +93,5 @@
 ############################################
 
-.PHONY: all clean build
+.PHONY: all clean build release
 
 # Make clean debug and release versions
@@ -99,5 +99,5 @@
 	@$(MAKE) clean
 	@$(MAKE) build
-	@echo All build!
+	@echo All done!
 
 # Clean
@@ -109,3 +109,8 @@
 build:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) -l"$(BUILD_DIR)\$(PROG).lst" -o"$(TARGET)"
-	@echo "$(TARGET)" build.
+	@echo "$(TARGET)" built.
+
+release: build
+	@echo Compressing with UPX...
+	@upx -qq --8086 --ultra-brute $(TARGET)
+	@echo Done! $(TARGET) is ready for release.
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 145)
@@ -158,13 +158,10 @@
 	cmp		dl, al								; Above last supported?
 	jae		SHORT .DriveNotHandledByThisBIOS
-	cmp		dl, ah								; Below first supported?
-	jb		SHORT .DriveNotHandledByThisBIOS
-	xchg	ax, di
+	cmp		ah, dl								; Below first supported?
+	ja		SHORT .DriveNotHandledByThisBIOS
 	stc
-	ret
 ALIGN JUMP_ALIGN
 .DriveNotHandledByThisBIOS:
 	xchg	ax, di
-	clc
 	ret
 
Index: /trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- /trunk/XTIDE_Universal_BIOS/makefile	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS/makefile	(revision 145)
@@ -80,5 +80,5 @@
 IHEADERS = $(HEADERS:%=-I%)
 
-# Path + target file to be build
+# Path + target file to be built
 TARGET = $(BUILD_DIR)/$(PROG)
 
@@ -118,17 +118,17 @@
 # Make clean debug and release versions
 all: clean at xtplus xt
-	@echo All build!
+	@echo All done!
 
 at:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.bin"
-	@echo AT version "$(TARGET)_at.bin" build.
+	@echo AT version "$(TARGET)_at.bin" built.
 
 xtplus:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.bin"
-	@echo XT plus version "$(TARGET)_xtp.bin" build.
+	@echo XT plus version "$(TARGET)_xtp.bin" built.
 
 xt:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET)_xt.bin"
-	@echo XT version "$(TARGET)_xt.bin" build.
+	@echo XT version "$(TARGET)_xt.bin" built.
 
 clean:
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm	(revision 145)
@@ -68,5 +68,5 @@
 
 ;--------------------------------------------------------------------
-; Buffers_NewBiosWithSizeInCXandSourceInAXhasBeenLoadedForConfiguration
+; Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
 ;	Parameters:
 ;		AX:		EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 145)
@@ -49,6 +49,5 @@
 	inc		bx
 	loop	.CheckNextEepromSize
-	clc		; None of the supported EEPROMs are large enough
-	ret
+	ret		; Return with CF cleared (none of the supported EEPROMs are large enough)
 ALIGN JUMP_ALIGN
 .ReturnEepromSizeInCX:
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 145)
@@ -218,8 +218,6 @@
 	call	Dialogs_DisplayErrorFromCSDX
 	stc
-	ret
-ALIGN JUMP_ALIGN
+ALIGN JUMP_ALIGN, ret
 .ImageFitsInSelectedEeprom:
-	clc
 	ret
 
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile	(revision 144)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/makefile	(revision 145)
@@ -58,5 +58,5 @@
 # Assembler preprocessor defines.                               #
 #################################################################
-DEFINES = 
+DEFINES =
 DEFINES_XT = ELIMINATE_CGA_SNOW
 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
@@ -77,5 +77,5 @@
 IHEADERS = $(HEADERS:%=-I%)
 
-# Path + target file to be build
+# Path + target file to be built
 TARGET = $(BUILD_DIR)/$(PROG)
 
@@ -111,23 +111,28 @@
 ############################################
 
-.PHONY: all at xtplus xt clean
+.PHONY: all at xtplus xt clean release
 
 # Make clean debug and release versions
 all: clean xt
-	@echo All build!
+	@echo All done!
 
 at:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -l"$(TARGET)_at.lst" -o"$(TARGET)_at.$(EXTENSION)"
-	@echo AT version "$(TARGET)_at.$(EXTENSION)" build.
+	@echo AT version "$(TARGET)_at.$(EXTENSION)" built.
 
 xtplus:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -l"$(TARGET)_xtp.lst" -o"$(TARGET)_xtp.$(EXTENSION)"
-	@echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
+	@echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" built.
 
 xt:
 	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -l"$(TARGET)_xt.lst" -o"$(TARGET).$(EXTENSION)"
-	@echo XT version "$(TARGET).$(EXTENSION)" build.
+	@echo XT version "$(TARGET).$(EXTENSION)" built.
 
 clean:
 	@$(RM) $(BUILD_DIR)\*.*
 	@echo Deleted "(*.*)" from "$(BUILD_DIR)/"
+
+release: xt
+	@echo Compressing with UPX...
+	@upx -qq --8086 --ultra-brute $(TARGET).$(EXTENSION)
+	@echo Done! XT version is ready for release.
