Index: /trunk/Assembly_Library/Src/AssemblyLibrary.asm
===================================================================
--- /trunk/Assembly_Library/Src/AssemblyLibrary.asm	(revision 102)
+++ /trunk/Assembly_Library/Src/AssemblyLibrary.asm	(revision 103)
@@ -71,6 +71,6 @@
 		%include "Bit.asm"
 	%endif
+	%include "Registers.asm"
 	%include "Memory.asm"
-	%include "Registers.asm"
 	%include "Size.asm"
 	%ifndef EXCLUDE_SORT_UTILS
Index: /trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
===================================================================
--- /trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 102)
+++ /trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	DialogFile.asm
 ; Project name	:	Assembly Library
-; Created date	:	6.9.2010
-; Last update	:	18.11.2010
-; Author		:	Tomi Tilli
 ; Description	:	Displays file dialog.
 
@@ -49,5 +45,5 @@
 .ItemSelectedFromCX:
 	call	LoadItemStringBufferToESDI
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	call	ItemLineSplitter_GetLineToDSSIandLengthToCXfromStringInDSSIwithIndexInCX
 	jmp		ParseSelectionFromItemLineInDSSI
@@ -132,5 +128,5 @@
 	call	RemoveLastLFandTerminateESDIwithNull
 
-	call	Registers_CopySSBPtoDSSI
+	Registers_CopySSBPtoDSSI
 	xor		ax, ax
 	call	Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX
@@ -202,5 +198,5 @@
 ALIGN JUMP_ALIGN
 .ClearDLifInRootDirectory:
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	call	Directory_WriteCurrentPathToDSSI
 	mov		dl, [si]
@@ -378,5 +374,5 @@
 ALIGN JUMP_ALIGN
 SortDirectoryContentsStringFromESDIwithCountInCX:
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	call	.AddDirectoryContentsStringLengthToDI
 	mov		bx, .FileStringComparator
Index: /trunk/Assembly_Library/Src/Util/Bit.asm
===================================================================
--- /trunk/Assembly_Library/Src/Util/Bit.asm	(revision 102)
+++ /trunk/Assembly_Library/Src/Util/Bit.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	Bit.asm
 ; Project name	:	Assembly Library
-; Created date	:	3.9.2010
-; Last update	:	3.9.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for bit handling.
 
@@ -51,9 +47,9 @@
 	shr		ax, 1
 	jz		SHORT .LastBitInCF
-	adc		cx, BYTE 0
+	adc		cl, ch
 	jmp		SHORT .BitScanLoop
 ALIGN JUMP_ALIGN
 .LastBitInCF:
-	adc		cx, BYTE 0
+	adc		cl, ch
 
 	pop		ax
Index: /trunk/Assembly_Library/Src/Util/Memory.asm
===================================================================
--- /trunk/Assembly_Library/Src/Util/Memory.asm	(revision 102)
+++ /trunk/Assembly_Library/Src/Util/Memory.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	Memory.asm
 ; Project name	:	Assembly Library
-; Created date	:	14.7.2010
-; Last update	:	24.10.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for memory access.
 
@@ -26,5 +22,5 @@
 
 	shr		cx, 1			; Operate with WORDs for performance
-	jcxz	%%HandleRemainingByte
+	jz	%%HandleRemainingByte
 	%1		%2w
 %%HandleRemainingByte:
@@ -70,5 +66,5 @@
 	push	di
 	push	ax
-	call	Registers_CopySSBPtoESDI
+	Registers_CopySSBPtoESDI
 	call	Memory_ZeroESDIwithSizeInCX
 	pop		ax
Index: /trunk/Assembly_Library/Src/Util/Registers.asm
===================================================================
--- /trunk/Assembly_Library/Src/Util/Registers.asm	(revision 102)
+++ /trunk/Assembly_Library/Src/Util/Registers.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	Registers.asm
 ; Project name	:	Assembly Library
-; Created date	:	24.10.2010
-; Last update	:	6.12.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for register operations.
 
@@ -90,31 +86,27 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Registers_CopySSBPtoESDI:
+%macro Registers_CopySSBPtoESDI 0
 	push	ss
 	pop		es
 	mov		di, bp
-	ret
+%endmacro
 
-ALIGN JUMP_ALIGN
-Registers_CopySSBPtoDSSI:
+%macro Registers_CopySSBPtoDSSI 0
 	push	ss
 	pop		ds
 	mov		si, bp
-	ret
+%endmacro
 
-ALIGN JUMP_ALIGN
-Registers_CopyDSSItoESDI:
+%macro Registers_CopyDSSItoESDI 0
 	push	ds
 	pop		es
 	mov		di, si
-	ret
+%endmacro
 
-ALIGN JUMP_ALIGN
-Registers_CopyESDItoDSSI:
+%macro Registers_CopyESDItoDSSI 0
 	push	es
 	pop		ds
 	mov		si, di
-	ret
+%endmacro
 
 
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm	(revision 102)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	BiosFile.asm
 ; Project name	:	XTIDE Univeral BIOS Configurator v2
-; Created date	:	10.10.2010
-; Last update	:	6.12.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for loading and saving BIOS image file.
 
@@ -105,5 +101,5 @@
 	push	cx
 
-	call	Registers_CopyESDItoDSSI	; File name in DS:SI
+	Registers_CopyESDItoDSSI	; File name in DS:SI
 	push	cs
 	pop		es
@@ -161,5 +157,5 @@
 	call	Buffers_GenerateChecksum
 	call	Buffers_GetFileBufferToESDI
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	xor		dx, dx
 	mov		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm	(revision 102)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	Menuitem.asm
 ; Project name	:	XTIDE Universal BIOS Configurator v2
-; Created date	:	5.10.2010
-; Last update	:	19.11.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for accessing MENUITEM structs.
 
@@ -36,5 +32,5 @@
 ALIGN JUMP_ALIGN
 Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI:
-	call	Registers_CopyDSSItoESDI
+	Registers_CopyDSSItoESDI
 
 	mov		cx, DIALOG_INPUT_size
@@ -49,5 +45,5 @@
 	cmp		ax, BYTE NO_ITEM_SELECTED
 	je		SHORT .NothingToChange
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	call	Menuitem_StoreValueFromAXtoMenuitemInDSSI
 .NothingToChange:
@@ -67,5 +63,5 @@
 ALIGN JUMP_ALIGN
 Menuitem_ActivateHexInputForMenuitemInDSSI:
-	call	Registers_CopyDSSItoESDI
+	Registers_CopyDSSItoESDI
 
 	mov		cx, WORD_DIALOG_IO_size
@@ -86,5 +82,5 @@
 ALIGN JUMP_ALIGN
 Menuitem_ActivateUnsignedInputForMenuitemInDSSI:
-	call	Registers_CopyDSSItoESDI
+	Registers_CopyDSSItoESDI
 
 	mov		cx, WORD_DIALOG_IO_size
@@ -104,5 +100,5 @@
 	je		SHORT .NothingToChange
 	mov		ax, [si+WORD_DIALOG_IO.wReturnWord]
-	call	Registers_CopyESDItoDSSI
+	Registers_CopyESDItoDSSI
 	call	Menuitem_StoreValueFromAXtoMenuitemInDSSI
 .NothingToChange:
Index: /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm	(revision 102)
+++ /trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm	(revision 103)
@@ -1,7 +1,3 @@
-; File name		:	MenuitemPrint.asm
 ; Project name	:	XTIDE Universal BIOS Configurator v2
-; Created date	:	5.10.2010
-; Last update	:	5.12.2010
-; Author		:	Tomi Tilli
 ; Description	:	Functions for printing MENUITEM name and value.
 
@@ -105,5 +101,5 @@
 .FormatValueStringFromItemInDSSItoBufferInSSBP:
 	push	es
-	call	Registers_CopySSBPtoESDI
+	Registers_CopySSBPtoESDI
 	mov		al, '['
 	stosb
