Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 3)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 88)
@@ -1,7 +1,3 @@
-; File name		:	BootMenuPrintCfg.asm
-; Project name	:	IDE BIOS
-; Created date	:	28.3.2010
-; Last update	:	9.4.2010
-; Author		:	Tomi Tilli
+; Project name	:	XTIDE Universal BIOS
 ; Description	:	Functions for printing drive configuration
 ;					information on Boot Menu.
@@ -20,5 +16,5 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, BX, CX, DX, SI, ES
+;		AX, BX, CX, DX, SI, DI, ES
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -27,5 +23,5 @@
 	call	BootMenuPrintCfg_GetPointers
 	call	BootMenuPrintCfg_PushAndFormatCfgString
-	jmp		BootMenuPrint_ClearOneInfoLine
+	jmp		BootMenuPrint_Newline
 
 
@@ -39,11 +35,11 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, BX, DX
+;		AX, SI, DI
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 BootMenuPrintCfg_HeaderAndChangeLine:
 	mov		si, g_szCfgHeader
-	call	PrintString_FromCS
-	jmp		BootMenuPrint_ClearOneInfoLine
+	call	PrintNullTerminatedStringFromCSSIandSetCF
+	jmp		BootMenuPrint_Newline
 
 
@@ -83,12 +79,42 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, CX, DX, SI
+;		AX, DX, SI, DI
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 BootMenuPrintCfg_PushAndFormatCfgString:
+	push	bp
+
+	mov		bp, sp
 	; Fall to first push below
 
 ;--------------------------------------------------------------------
-; BootMenuPrintCfg_PushResetStatus
+; PushAddressingMode
+;	Parameters:
+;		DS:DI:	Ptr to DPT
+;		ES:BX:	Ptr to BOOTNFO
+;		CS:SI:	Ptr to IDEVARS
+;	Returns:
+;		Nothing (jumps to next push below)
+;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+PushAddressingMode:
+	mov		dx, bx				; Backup BX to DX
+	mov		bx, MASK_DPT_ADDR	; Load addressing mode mask
+	and		bl, [di+DPT.bFlags]	; Addressing mode now in BX
+	push	WORD [cs:bx+.rgszAddressingModeString]
+	mov		bx, dx
+	jmp		SHORT .NextPush
+ALIGN WORD_ALIGN
+.rgszAddressingModeString:
+	dw		g_szLCHS
+	dw		g_szPCHS
+	dw		g_szLBA28
+	dw		g_szLBA48
+ALIGN JUMP_ALIGN
+.NextPush:
+
+;--------------------------------------------------------------------
+; PushBlockMode
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
@@ -100,59 +126,26 @@
 ;		AX
 ;--------------------------------------------------------------------
-BootMenuPrintCfg_PushResetStatus:
-	eMOVZX	ax, BYTE [di+DPT.bReset]
+PushBlockMode:
+	eMOVZX	ax, BYTE [di+DPT.bSetBlock]
 	push	ax
 
 ;--------------------------------------------------------------------
-; BootMenuPrintCfg_PushIRQ
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		ES:BX:	Ptr to BOOTNFO
-;		CS:SI:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (falls to next push below)
+; PushBusType
+;	Parameters:
+;		DS:DI:	Ptr to DPT
+;		ES:BX:	Ptr to BOOTNFO
+;		CS:SI:	Ptr to IDEVARS
+;	Returns:
+;		Nothing (jumps to next push below)
 ;	Corrupts registers:
 ;		AX, DX
 ;--------------------------------------------------------------------
-BootMenuPrintCfg_PushIRQ:
-	mov		dl, ' '						; Load space to DL
-	mov		al, [cs:si+IDEVARS.bIRQ]
-	test	al, al						; Interrupts disabled?
-	jz		SHORT .PushIrqDisabled
-	add		al, '0'						; Digit to ASCII
-	cmp		al, '9'						; Only one digit needed?
-	jbe		SHORT .PushCharacters
-
-	; Two digits needed
-	sub		al, 10						; Limit to single digit ASCII
-	mov		dl, '1'						; Load '1 to DX
-	jmp		SHORT .PushCharacters
-ALIGN JUMP_ALIGN
-.PushIrqDisabled:
-	mov		al, '-'						; Load line to AL
-	xchg	ax, dx						; Space to AL, line to DL
-ALIGN JUMP_ALIGN
-.PushCharacters:
-	push	ax
-	push	dx
-
-;--------------------------------------------------------------------
-; BootMenuPrintCfg_PushBusType
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		ES:BX:	Ptr to BOOTNFO
-;		CS:SI:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (jumps to next push below)
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-BootMenuPrintCfg_PushBusType:
+PushBusType:
 	xchg	ax, bx		; Store BX to AX
 	eMOVZX	bx, BYTE [cs:si+IDEVARS.bBusType]
 	mov		bx, [cs:bx+.rgwBusTypeValues]	; Char to BL, Int to BH	
 	eMOVZX	dx, bh
+	push	bx			; Push character
 	push	dx			; Push 8, 16 or 32
-	push	bx			; Push character
 	xchg	bx, ax		; Restore BX
 	jmp		SHORT .NextPush
@@ -167,5 +160,5 @@
 
 ;--------------------------------------------------------------------
-; BootMenuPrintCfg_PushBlockMode
+; PushIRQ
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT
@@ -175,38 +168,44 @@
 ;		Nothing (falls to next push below)
 ;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+PushIRQ:
+	mov		dl, ' '						; Load space to DL
+	mov		al, [cs:si+IDEVARS.bIRQ]
+	test	al, al						; Interrupts disabled?
+	jz		SHORT .PushIrqDisabled
+	add		al, '0'						; Digit to ASCII
+	cmp		al, '9'						; Only one digit needed?
+	jbe		SHORT .PushCharacters
+
+	; Two digits needed
+	sub		al, 10						; Limit to single digit ASCII
+	mov		dl, '1'						; Load '1 to DX
+	jmp		SHORT .PushCharacters
+ALIGN JUMP_ALIGN
+.PushIrqDisabled:
+	mov		al, '-'						; Load line to AL
+	xchg	ax, dx						; Space to AL, line to DL
+ALIGN JUMP_ALIGN
+.PushCharacters:
+	push	dx
+	push	ax
+
+;--------------------------------------------------------------------
+; PushResetStatus
+;	Parameters:
+;		DS:DI:	Ptr to DPT
+;		ES:BX:	Ptr to BOOTNFO
+;		CS:SI:	Ptr to IDEVARS
+;	Returns:
+;		Nothing (falls to next push below)
+;	Corrupts registers:
 ;		AX
 ;--------------------------------------------------------------------
-BootMenuPrintCfg_PushBlockMode:
-	eMOVZX	ax, BYTE [di+DPT.bSetBlock]
+PushResetStatus:
+	eMOVZX	ax, BYTE [di+DPT.bReset]
 	push	ax
 
 ;--------------------------------------------------------------------
-; BootMenuPrintCfg_PushAddressingMode
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		ES:BX:	Ptr to BOOTNFO
-;		CS:SI:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (jumps to next push below)
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-BootMenuPrintCfg_PushAddressingMode:
-	mov		dx, bx				; Backup BX to DX
-	mov		bx, MASK_DPT_ADDR	; Load addressing mode mask
-	and		bl, [di+DPT.bFlags]	; Addressing mode now in BX
-	push	WORD [cs:bx+.rgszAddressingModeString]
-	mov		bx, dx
-	jmp		SHORT .NextPush
-ALIGN WORD_ALIGN
-.rgszAddressingModeString:
-	dw	g_szLCHS
-	dw	g_szPCHS
-	dw	g_szLBA28
-	dw	g_szLBA48
-ALIGN JUMP_ALIGN
-.NextPush:
-
-;--------------------------------------------------------------------
 ; Prints formatted configuration string from parameters pushed to stack.
 ;
@@ -217,8 +216,7 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, CX, DX, SI
+;		AX, SI, DI
 ;--------------------------------------------------------------------
 BootMenuPrintCfg_ValuesFromStack:
 	mov		si, g_szCfgFormat
-	mov		dh, 14						; 14 bytes pushed to stack
-	jmp		PrintString_JumpToFormat
+	jmp		PrintNullTerminatedStringFromCSSIandSetCF
