Index: trunk/BIOS_Drive_Information_Tool/Src/Print.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/Print.asm	(revision 376)
+++ trunk/BIOS_Drive_Information_Tool/Src/Print.asm	(revision 424)
@@ -30,5 +30,4 @@
 ;		AX, BX, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_SetCharacterOutputToSTDOUT:
 	mov		bl, ATTRIBUTES_NOT_USED
@@ -50,5 +49,4 @@
 ;		AX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 DosCharOut:
 	xchg	dx, ax
@@ -68,10 +66,9 @@
 ;		AX, BP, SI, DI (CF remains unchanged)
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_ErrorMessageFromAHifError:
 	jnc		SHORT .NoErrors
 	eMOVZX	ax, ah
 	mov		si, g_szBiosError
-	call	Print_BiosFunctionNumberFromAXusingFormatStringInSI
+	call	Print_FormatStringFromSIwithParameterInAX
 	stc		; Keep the CF set
 ALIGN JUMP_ALIGN
@@ -82,10 +79,7 @@
 ;---------------------------------------------------------------------
 ; Print_DriveNumberFromDLusingFormatStringInSI
-; Print_VersionStringFromAXusingFormatStringInSI
-; Print_BiosFunctionNumberFromAXusingFormatStringInSI
-; Print_SectorSizeFromAXusingFormatStringInSI
 ;	Parameters:
 ;		DL:		Drive Number
-;		AX:		Function number
+;		SI:		Offset to format string
 ;	Returns:
 ;		Nothing
@@ -93,13 +87,76 @@
 ;		AX, BP, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_DriveNumberFromDLusingFormatStringInSI:
 	eMOVZX	ax, dl
-Print_VersionStringFromAXusingFormatStringInSI:
-Print_BiosFunctionNumberFromAXusingFormatStringInSI:
-Print_SectorSizeFromAXusingFormatStringInSI:
-	mov		bp, sp
-	push	ax
-	jmp		SHORT JumpToFormatNullTerminatedStringFromSI
+	; Fall to Print_FormatStringFromSIwithParameterInAX
+
+
+;---------------------------------------------------------------------
+; Print_FormatStringFromSIwithParameterInAX
+; Print_FormatStringFromSIwithParametersInAXDX
+; Print_FormatStringFromSIwithParametersInAXDXCX
+;	Parameters:
+;		AX:		Format parameter 1
+;		DX:		Format parameter 2
+;		CX:		Format parameter 3
+;		SI:		Offset to format string
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BP, DI
+;--------------------------------------------------------------------
+Print_FormatStringFromSIwithParameterInAX:
+	mov		bp, sp
+	push	ax
+	jmp		JumpToFormatNullTerminatedStringFromSI
+
+Print_FormatStringFromSIwithParametersInAXDX:
+	mov		bp, sp
+	push	ax
+	push	dx
+	jmp		JumpToFormatNullTerminatedStringFromSI
+
+Print_FormatStringFromSIwithParametersInAXDXCX:
+	mov		bp, sp
+	push	ax
+	push	dx
+	push	cx
+	jmp		SHORT JumpToFormatNullTerminatedStringFromSI
+
+
+;---------------------------------------------------------------------
+; Print_ModeFromDLandCHSfromAXBLBH
+;	Parameters:
+;		AX:		Number of L-CHS cylinders (1...1024)
+;		BL:		Number of L-CHS heads (1...255)
+;		BH:		Number of L-CHS sectors per track (1...63)
+;		DL:		CHS Translate Mode
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BP, SI, DI
+;--------------------------------------------------------------------
+Print_ModeFromDLandCHSfromAXLBH:
+	mov		bp, sp
+
+	xor		dh, dh
+	mov		si, dx
+	shl		si, 1		; Shift for WORD lookup
+	push	WORD [si+.rgszXlateModeToString]
+
+	ePUSH_T	si, g_szFormatCHS
+	push	ax			; Cylinders
+	eMOVZX	ax, bl
+	push	ax			; Heads
+	mov		al, bh
+	push	ax			; Sectors per track
+
+	mov		si, g_szXlateAndCHS
+	jmp		SHORT JumpToFormatNullTerminatedStringFromSI
+
+.rgszXlateModeToString:
+	dw		g_szNormal
+	dw		g_szLarge
+	dw		g_szLBA
 
 
@@ -115,5 +172,4 @@
 ;		AX, BP, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_CHSfromCXDXAX:
 	push	si
@@ -139,5 +195,4 @@
 ;		AX, CX, BP, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_NameFromAtaInfoInBX:
 	cld
@@ -171,5 +226,4 @@
 ;		AX, BX, BP, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_TotalSectorsFromBXDXAX:
 	ePUSH_T	di, 0
@@ -200,5 +254,4 @@
 ;		AX, BP, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_EbiosVersionFromBXandExtensionsFromCX:
 	mov		bp, sp
@@ -219,5 +272,4 @@
 ;		AX, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 JumpToFormatNullTerminatedStringFromSI:	
 	CALL_DISPLAY_LIBRARY 	FormatNullTerminatedStringFromCSSI
@@ -234,5 +286,4 @@
 ;		AX, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Print_NullTerminatedStringFromSI:
 	CALL_DISPLAY_LIBRARY	PrintNullTerminatedStringFromCSSI
