Index: trunk/Assembly_Library/Src/AssemblyLibrary.asm
===================================================================
--- trunk/Assembly_Library/Src/AssemblyLibrary.asm	(revision 101)
+++ 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 101)
+++ 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 101)
+++ 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 101)
+++ 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 101)
+++ 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
 
 
