Index: trunk/BIOS_Drive_Information_Tool/Src/Main.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/Main.asm	(revision 347)
+++ trunk/BIOS_Drive_Information_Tool/Src/Main.asm	(revision 359)
@@ -7,7 +7,10 @@
 %define INCLUDE_KEYBOARD_LIBRARY
 %include "AssemblyLibrary.inc"	; Assembly Library. Must be included first!
-%include "ATA_ID.inc"
-%include "Int13h.inc"
-%include "EBIOS.inc"
+%include "Version.inc"			; From XTIDE Universal BIOS
+%include "ATA_ID.inc"			; From XTIDE Universal BIOS
+%include "Int13h.inc"			; From XTIDE Universal BIOS
+%include "EBIOS.inc"			; From XTIDE Universal BIOS
+FLG_DRVNHEAD_DRV	EQU	(1<<4)	; Required by CustomDPT.inc
+%include "CustomDPT.inc"		; From XTIDE Universal BIOS
 
 
@@ -22,4 +25,5 @@
 ; Include library and other sources
 %include "AssemblyLibrary.asm"
+%include "LbaAssist.asm"		; From XTIDE Universal BIOS
 %include "Strings.asm"
 %include "Bios.asm"
@@ -33,7 +37,5 @@
 StartBiosDriveInformationTool:
 	CALL_DISPLAY_LIBRARY	InitializeDisplayContext
-	mov		bl, ATTRIBUTES_NOT_USED
-	mov		ax, Print_DosCharOut
-	CALL_DISPLAY_LIBRARY	SetCharOutputFunctionFromAXwithAttribFlagInBL
+	call	Print_SetCharacterOutputToSTDOUT
 
 	mov		si, g_szProgramName
@@ -60,4 +62,5 @@
 	call	Print_NullTerminatedStringFromSI
 	call	Keyboard_GetKeystrokeToAXandWaitIfNecessary
+
 .DisplayFirstDrive:
 	mov		si, g_szHeaderDrive
@@ -126,12 +129,49 @@
 	mov		si, g_szLBA48
 	call	Print_NullTerminatedStringFromSI
+	mov		si, bx
 	mov		ax, [bx+ATA6.qwLBACnt]
 	mov		dx, [bx+ATA6.qwLBACnt+2]
 	mov		bx, [bx+ATA6.qwLBACnt+4]
 	call	Print_TotalSectorsFromBXDXAX
+	mov		bx, si
 .SkipLBA48:
+
+	; Print L-CHS generated by XTIDE Universal BIOS
+	mov		ax, g_szXTUBversion
+	mov		si, g_szXTUB
+	call	Print_VersionStringFromAXusingFormatStringInSI
+	call	DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX
+
 .SkipAtaInfoSinceError:
 	pop		dx
 	pop		cx
+	ret
+
+
+ALIGN JUMP_ALIGN
+DisplayXTUBcompatibilityInfoUsingAtaInfoFromDSBX:
+	test	WORD [bx+ATA1.wCaps], A1_wCaps_LBA
+	jz		SHORT .LbaNotSupported
+	test	WORD [bx+ATA6.wSetSup83], A6_wSetSup83_LBA48
+	jz		SHORT .LoadLba28SectorCount
+
+	; Load LBA48 Sector Count
+	mov		ax, [bx+ATA6.qwLBACnt]
+	mov		dx, [bx+ATA6.qwLBACnt+2]
+	mov		bx, [bx+ATA6.qwLBACnt+4]
+	jmp		SHORT .ConvertLbaToLCHS
+.LoadLba28SectorCount:
+	mov		ax, [bx+ATA1.dwLBACnt]
+	mov		dx, [bx+ATA1.dwLBACnt+2]
+	xor		bx, bx
+
+.ConvertLbaToLCHS:
+	call	LbaAssist_ConvertSectorCountFromBXDXAXtoLbaAssistedCHSinDXAXBLBH
+	LIMIT_LBA_CYLINDERS_IN_DXAX_TO_LCHS_CYLINDERS
+	xchg	cx, ax
+	eMOVZX	dx, bl
+	eMOVZX	ax, bh
+	call	Print_CHSfromCXDXAX
+.LbaNotSupported:
 	ret
 
Index: trunk/BIOS_Drive_Information_Tool/Src/Print.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/Print.asm	(revision 347)
+++ trunk/BIOS_Drive_Information_Tool/Src/Print.asm	(revision 359)
@@ -7,7 +7,23 @@
 
 ;--------------------------------------------------------------------
+; Print_SetCharacterOutputToSTDOUT
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Print_SetCharacterOutputToSTDOUT:
+	mov		bl, ATTRIBUTES_NOT_USED
+	mov		ax, DosCharOut
+	CALL_DISPLAY_LIBRARY	SetCharOutputFunctionFromAXwithAttribFlagInBL
+	ret
+
+;--------------------------------------------------------------------
 ; Use DOS standard output so strings can be redirected to a file.
 ;
-; Print_DosCharOut
+; DosCharOut
 ;	Parameters:
 ;		AL:		Character to output
@@ -20,5 +36,5 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-Print_DosCharOut:
+DosCharOut:
 	xchg	dx, ax
 	mov		ah, 02h		; DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
@@ -51,4 +67,5 @@
 ;---------------------------------------------------------------------
 ; Print_DriveNumberFromDLusingFormatStringInSI
+; Print_VersionStringFromAXusingFormatStringInSI
 ; Print_BiosFunctionNumberFromAXusingFormatStringInSI
 ; Print_SectorSizeFromAXusingFormatStringInSI
@@ -64,4 +81,5 @@
 Print_DriveNumberFromDLusingFormatStringInSI:
 	eMOVZX	ax, dl
+Print_VersionStringFromAXusingFormatStringInSI:
 Print_BiosFunctionNumberFromAXusingFormatStringInSI:
 Print_SectorSizeFromAXusingFormatStringInSI:
Index: trunk/BIOS_Drive_Information_Tool/Src/Strings.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/Strings.asm	(revision 347)
+++ trunk/BIOS_Drive_Information_Tool/Src/Strings.asm	(revision 359)
@@ -6,5 +6,5 @@
 SECTION .data
 
-g_szProgramName:	db	"BIOS Drive Information Tool v1.0.0",LF,CR
+g_szProgramName:	db	"BIOS Drive Information Tool v1.0.1",LF,CR
 					db	"(C) 2012 by XTIDE Universal BIOS Team",LF,CR
 					db	"Released under GNU GPL v2",LF,CR
@@ -22,4 +22,7 @@
 g_szLBA48:			db	" LBA48 sectors: ",NULL
 
+g_szXTUB:			db	"XTIDE Universal BIOS %s generates following L-CHS...",LF,CR,NULL
+g_szXTUBversion:	db	ROM_VERSION_STRING	; This one is NULL terminated
+
 g_szOldInfoHeader:	db	"Old INT 13h information from AH=08h and AH=15h...",LF,CR,NULL
 					;	Cylinders
