Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 241)
@@ -16,53 +16,22 @@
 ;	Returns:
 ;		ES:BX:	Ptr to BOOTNFO (if successful)
-;		CF:		Cleared if BOOTNFO created succesfully
-;				Set if any error
 ;	Corrupts registers:
-;		AX, BX, CX, DX
+;		AX, BX, CX, DX, DI, SI
 ;--------------------------------------------------------------------
 BootInfo_CreateForHardDisk:
-	call	BootInfo_GetOffsetToBX		; ES:BX now points to new BOOTNFO
-	; Fall to .StoreSectorCount
+	call	BootInfo_ConvertDPTtoBX		; ES:BX now points to new BOOTNFO
+	push	bx							; Preserve for return
 
-;--------------------------------------------------------------------
-; .StoreSectorCount
-;	Parameters:
-;		ES:BX:	Ptr to BOOTNFO
-;		ES:SI:	Ptr to 512-byte ATA information read from the drive
-;		DS:DI:	Ptr to Disk Parameter Table
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, CX, DX
-;--------------------------------------------------------------------
-.StoreSectorCount:
-	push	bx
-	call	AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
-	mov		cx, bx							; Now in CX:DX:AX
-	pop		bx
-	mov		[es:bx+BOOTNFO.twSectCnt], ax
-	mov		[es:bx+BOOTNFO.twSectCnt+2], dx
-	mov		[es:bx+BOOTNFO.twSectCnt+4], cx
-	; Fall to .StoreDriveName
+	mov		di, bx						; Starting pointer at beginning of structure
 
-;--------------------------------------------------------------------
-; .StoreDriveName
-;	Parameters:
-;		ES:BX:	Ptr to BOOTNFO
-;		ES:SI:	Ptr to 512-byte ATA information read from the drive
-;		DS:DI:	Ptr to Disk Parameter Table
-;	Returns:
-;		CF:		Cleared if variables stored succesfully
-;				Set if any error
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-.StoreDriveName:
-	push	ds
-	push	si
-	push	di
+;
+; Store Drive Name
+;		
+	push	ds							; Preserve RAMVARS
+	push	si							; Preserve SI for call to GetTotalSectorCount...
 
-	push	es
+	push	es							; ES copied to DS
 	pop		ds
+
 	add		si, BYTE ATA1.strModel		; DS:SI now points drive name
 	lea		di, [bx+BOOTNFO.szDrvName]	; ES:DI now points to name destination
@@ -74,12 +43,25 @@
 	loop	.CopyNextWord
 	xor		ax, ax						; Zero AX and clear CF
-	stosb								; Terminate with NULL
+	stosw								; Terminate with NULL
 
-	pop		di
 	pop		si
 	pop		ds
+
+;
+; Store Sector Count
+;
+	call	AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
+
+	stosw
+	xchg	ax, dx
+	stosw
+	xchg	ax, bx
+	stosw
+
+	pop		bx
+		
 	ret
 
-
+		
 ;--------------------------------------------------------------------
 ; Finds BOOTNFO for drive and returns total sector count.
@@ -87,6 +69,5 @@
 ; BootInfo_GetTotalSectorCount
 ;	Parameters:
-;		DL:		Drive number
-;		DS:		RAMVARS segment
+;		DS:DI:		DPT Pointer
 ;	Returns:
 ;		BX:DX:AX:	48-bit sector count
@@ -97,5 +78,5 @@
 BootInfo_GetTotalSectorCount:
 	push	ds
-	call	BootInfo_GetOffsetToBX
+	call	BootInfo_ConvertDPTtoBX
 	LOAD_BDA_SEGMENT_TO	ds, ax
 	mov		ax, [bx+BOOTNFO.twSectCnt]
@@ -107,10 +88,9 @@
 
 ;--------------------------------------------------------------------
-; Returns offset to BOOTNFO for wanted drive.
+; Returns offset to BOOTNFO based on DPT pointer.
 ;
-; BootInfo_GetOffsetToBX
+; BootInfo_ConvertDPTtoBX
 ;	Parameters:
-;		DL:		Drive number
-;		DS:		RAMVARS segment
+;		DS:DI:	DPT Pointer
 ;	Returns:
 ;		BX:		Offset to BOOTNFO struct
@@ -119,10 +99,10 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-BootInfo_GetOffsetToBX:
-	mov		bl, dl						; Copy drive number to BL
-	mov		al, BOOTNFO_size			; Size of struct
-	sub		bl, [RAMVARS.bFirstDrv]		; Drive number to index
-	mul		bl							; AX = Offset inside BOOTNFO array
-	add		ax, BOOTVARS.rgBootNfo		; Add offset to BOOTNFO array
-	xchg	bx, ax						; Move result to BX
-	ret
+BootInfo_ConvertDPTtoBX:
+	mov		ax, di
+	sub		ax, RAMVARS_size				; subtract off base of DPTs
+	mov		bl, DPT_BOOTNFO_SIZE_MULTIPLIER	; BOOTNFO's are a whole number multiple of DPT size
+	mul		bl								
+	add		ax, BOOTVARS.rgBootNfo			; add base of BOOTNFO
+	xchg	ax, bx
+	ret			
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm	(revision 241)
@@ -22,7 +22,7 @@
 	call	BootMenu_Enter			; Get selected menuitem index to CX
 	call	BootMenuPrint_ClearScreen
-	cmp		cx, BYTE NO_ITEM_SELECTED
-	je		SHORT BootMenu_DisplayAndReturnSelection	; Clear screen and display menu
-	; Fall to BootMenu_GetDriveToDXforMenuitemInCX
+	call	BootMenu_GetDriveToDXforMenuitemInCX
+	jnc		BootMenu_DisplayAndReturnSelection
+	ret
 
 ;--------------------------------------------------------------------
@@ -30,18 +30,31 @@
 ;	Parameters:
 ;		CX:		Index of menuitem selected from Boot Menu
-;		DS:		RAMVARS segment
 ;	Returns:
 ;		DX:		Drive number to be used for booting
-;	Corrupts registers:
-;		CX
-;--------------------------------------------------------------------
+;		DS:		RAMVARS segment
+;       CF:     Set: There is a selected menu item, DL is valid
+;               Clear: There is no selected menu item, DL is not valid
+;	Corrupts registers:
+;		CX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS:
+	call	RamVars_GetSegmentToDS
+;;; fall-through
+						
 ALIGN JUMP_ALIGN
 BootMenu_GetDriveToDXforMenuitemInCX:
-	mov		dx, cx					; Copy menuitem index to DX
-	call	FloppyDrive_GetCountToCX
-	cmp		dx, cx					; Floppy drive?
-	jb		SHORT .ReturnFloppyDriveInDX
-	sub		dx, cx					; Remove floppy drives from index
-	or		dl, 80h
+	cmp		cl, NO_ITEM_HIGHLIGHTED
+	je		SHORT .ReturnFloppyDriveInDX	; Clear CF if branch taken
+
+	mov		dl, cl							; Copy menuitem index to DX
+	call	FloppyDrive_GetCountToCX
+	cmp		dl, cl							; Floppy drive?
+	jb		SHORT .ReturnFloppyDriveInDX	; Set CF if branch taken
+	or		cl, 80h							; Or 80h into CL before the sub
+											; to cause CF to be set after
+											; and result has high order bit set
+	sub		dl, cl							; Remove floppy drives from index
+
 .ReturnFloppyDriveInDX:
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 241)
@@ -25,11 +25,11 @@
 
 MENUEVENT_InitializeMenuinitFromDSSI equ  (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler)
-MENUEVENT_ExitMenu equ  (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler)
+MENUEVENT_ExitMenu equ  (BootMenuEvent_EventCompleted - BootMenuEvent_Handler)
 MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler)
 MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler)
 MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler)
 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler)
-MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler)
-MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler)
+MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - BootMenuEvent_Handler)
+MENUEVENT_RefreshItemFromCX equ (BootMenuPrint_RefreshItem - BootMenuEvent_Handler)
 ;
 ; Note that there is no entry for MENUEVENT_IdleProcessing.  If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined,
@@ -49,13 +49,13 @@
 ALIGN WORD_ALIGN
 .rgfnEventSpecificHandlers:
-	dw		.InitializeMenuinitFromDSSI	; MENUEVENT.InitializeMenuinitFromDSSI
-	dw		.EventCompleted				; MENUEVENT.ExitMenu
-	dw		.EventNotHandled			; MENUEVENT.IdleProcessing
-	dw		.ItemHighlightedFromCX		; MENUEVENT.ItemHighlightedFromCX
-	dw		.ItemSelectedFromCX			; MENUEVENT.ItemSelectedFromCX
-	dw		.KeyStrokeInAX				; MENUEVENT.KeyStrokeInAX
-	dw		BootMenuPrint_TitleStrings	; MENUEVENT.RefreshTitle
-	dw		.RefreshInformation			; MENUEVENT.RefreshInformation
-	dw		.RefreshItemFromCX			; MENUEVENT.RefreshItemFromCX
+	dw		.InitializeMenuinitFromDSSI			; MENUEVENT.InitializeMenuinitFromDSSI
+	dw		BootMenuEvent_EventCompleted		; MENUEVENT.ExitMenu
+	dw		.EventNotHandled					; MENUEVENT.IdleProcessing
+	dw		.ItemHighlightedFromCX				; MENUEVENT.ItemHighlightedFromCX
+	dw		.ItemSelectedFromCX					; MENUEVENT.ItemSelectedFromCX
+	dw		.KeyStrokeInAX						; MENUEVENT.KeyStrokeInAX
+	dw		BootMenuPrint_TitleStrings			; MENUEVENT.RefreshTitle
+	dw		BootMenuPrint_RefreshInformation	; MENUEVENT.RefreshInformation
+	dw		BootMenuPrint_RefreshItem			; MENUEVENT.RefreshItemFromCX
 
 %endif
@@ -103,7 +103,6 @@
 .ItemHighlightedFromCX:
 	push	cx
-	call	RamVars_GetSegmentToDS
+	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS		
 	call	DriveXlate_Reset
-	call	BootMenu_GetDriveToDXforMenuitemInCX
 	call	DriveXlate_SetDriveToSwap
 
@@ -134,5 +133,5 @@
 	call	BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
 	cmp		ax, [bp+MENUINIT.wItems]
-	jae		SHORT .EventCompleted	; Invalid key
+	jae		SHORT BootMenuEvent_EventCompleted	; Invalid key
 	CALL_MENU_LIBRARY HighlightItemFromAX
 	; Fall to .ItemSelectedFromCX
@@ -144,50 +143,7 @@
 .ItemSelectedFromCX:
 	CALL_MENU_LIBRARY Close
-.EventCompleted:
+		
+BootMenuEvent_EventCompleted:
 	stc
 	ret
 
-
-; Parameters:
-;	CX:			Index of item to refresh
-;	Cursor has been positioned to the beginning of item line
-ALIGN JUMP_ALIGN
-.RefreshItemFromCX:
-	xor		bl, bl		; will result in SF being clear in .RefreshItemOrInformation...
-	SKIP2B  dx			; dx corrupted below by BootMenu_GetDriveToDXforMenuitemInCX
-	; Fall to .RefreshInformation
-
-; Parameters:
-;	CX:			Index of highlighted item
-;	Cursor has been positioned to the beginning of first line
-; NO ALIGN - in the shadow of SKIP2B
-.RefreshInformation:
-	mov		bl,040h		;  will result in SF being set in .RefreshItemOrInformation...
-	; Fall to .RefreshItemOrInformationWithJumpTableInCSBX
-
-;--------------------------------------------------------------------
-; RefreshItemOrInformationWithJumpTableInCSBX
-;	Parameters:
-;		CX: 	Index of selected menuitem
-;		CS:BX:	Ptr to ITEM_TYPE_REFRESH jump table
-;	Returns:
-;		CF:		set since event processed
-;--------------------------------------------------------------------
-.RefreshItemOrInformationWithJumpTableInCSBX:
-	cmp		cl, NO_ITEM_HIGHLIGHTED
-	je		SHORT .EventCompleted
-
-	call	RamVars_GetSegmentToDS
-	call	BootMenu_GetDriveToDXforMenuitemInCX
-	or		bl,dl				;  or drive number with bit from .RefreshItemFromCX or .RefreshInformation
-	shl		bl,1				;  drive letter high order bit to CF, Item/Information bit to SF
-	jc		SHORT BootMenuPrint_HardDiskMenuitem
-	; fall through to BootMenuEvent_FallThroughToFloppyMenuitem
-
-;;;
-;;; Fall-through (to BootMenuPrint_FloppyMenuitem)
-;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem)
-;;;
-ALIGN JUMP_ALIGN
-BootMenuEvent_FallThroughToFloppyMenuitem:
-	; fall through to BootMenuPrint_FloppyMenuitem
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm	(revision 241)
@@ -5,57 +5,47 @@
 SECTION .text
 
-;;;
-;;; Fall-through from BootMenuEvent.asm!
-;;; BootMenuPrint_FloppyMenuitem must be the first routine in this file
-;;; (checked at assembler time with the code after BootMenuPrint_FloppyMenuitem)
-;;;
-;--------------------------------------------------------------------
-; BootMenuPrint_FloppyMenuitem
+;--------------------------------------------------------------------
+; BootMenuPrint_RefreshItem
+; 
 ;	Parameters:
 ;		DL:		Untranslated Floppy Drive number
-;       SF:		set for Information, clear for Item
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DX, SI, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_FloppyMenuitem:
-	js		short BootMenuPrint_FloppyMenuitemInformation
-	call	PrintDriveNumberAfterTranslationFromDL
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BootMenuPrint_RefreshItem:
+	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
+	jnc		BootMenuEvent_EventCompleted			; if no menu item selected, out we go
+		
 	push	bp
 	mov		bp, sp
-	mov		si, g_szFDLetter
-	ePUSH_T	ax, g_szFloppyDrv
-	add		dl, 'A'
-	push	dx					; Drive letter
+
+	call	RamVars_IsDriveHandledByThisBIOS				
+	jnc		.notOurs
+
+	call	FindDPT_ForDriveNumber					; if it is one of ours, print the string in bootnfo
+	call	BootInfo_ConvertDPTtoBX
+	mov		si, g_szDriveNumBOOTNFO					; special g_szDriveNum that prints from BDA
+	jmp		.go
+		
+.notOurs:
+	mov		si,g_szDriveNum									
+	mov		bx,g_szForeignHD						; assume a hard disk for the moment
+		
+	test	dl,80h											
+	js		.go
+	mov		bl,((g_szFloppyDrv)-$$ & 0xff)			; and revisit the earlier assumption...
+		
+.go:
+	mov		ax, dx									; preserve DL for the floppy drive letter addition
+	call	DriveXlate_ToOrBack
+	push	dx										; translated drive number
+	push	bx										; sub string
+	add		al, 'A'									; floppy drive letter (we always push this although
+	push	ax										; the hard disks don't ever use it, but it does no harm)
+		
 	jmp		short BootMenuPrint_FormatCSSIfromParamsInSSBP
-
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-%if BootMenuPrint_FloppyMenuitem <> BootMenuEvent_FallThroughToFloppyMenuitem
-%error "BootMenuPrint.asm must follow BootMenuEvent.asm, and BootMenuPrint_FloppyMenuitem must be the first routine in BootMenuPrint.asm"
-%endif
-%endif
-		
-;--------------------------------------------------------------------
-; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
-;	Parameters:
-;		BX:DX:AX:	Sector count
-;	Returns:
-;		Size in stack
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
-	pop		si		; Pop return address
-	call	Size_ConvertSectorCountInBXDXAXtoKiB
-	mov		cx, BYTE_MULTIPLES.kiB
-	call	Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
-	push	ax		; Size in magnitude
-	push	cx		; Tenths
-	push	dx		; Magnitude character
-	jmp		si
-
 
 ;--------------------------------------------------------------------
@@ -77,5 +67,4 @@
 	mov		si, ROMVARS.szVersion
 	; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
-
 
 ;--------------------------------------------------------------------
@@ -102,57 +91,4 @@
 		
 ;--------------------------------------------------------------------
-; BootMenuPrint_HardDiskMenuitem
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:		RAMVARS segment
-;       SF:		set for Information, clear for Item		
-;	Returns:
-;		CF:		Set since menu event handled
-;	Corrupts registers:
-;		AX, BX, SI, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_HardDiskMenuitem:
-	js		short BootMenuPrint_HardDiskMenuitemInformation
-	call	PrintDriveNumberAfterTranslationFromDL
-	call	RamVars_IsDriveHandledByThisBIOS
-	jnc		SHORT .HardDiskMenuitemForForeignDrive
-	; Fall to .HardDiskMenuitemForOurDrive
-
-;--------------------------------------------------------------------
-; .HardDiskMenuitemForOurDrive
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event handled
-;	Corrupts registers:
-;		AX, BX, SI, DI
-;--------------------------------------------------------------------
-.HardDiskMenuitemForOurDrive:
-	call	BootInfo_GetOffsetToBX
-	lea		si, [bx+BOOTNFO.szDrvName]
-	xor		bx, bx			; BDA segment
-	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
-	stc
-	ret
-
-;--------------------------------------------------------------------
-; BootMenuPrint_HardDiskMenuitemForForeignDrive
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event handled
-;	Corrupts registers:
-;		AX, SI, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-.HardDiskMenuitemForForeignDrive:
-	mov		si, g_szforeignHD
-	jmp		SHORT BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
-
-
-;--------------------------------------------------------------------
 ; BootMenuPrint_FloppyMenuitemInformation
 ;	Parameters:
@@ -165,39 +101,28 @@
 ;--------------------------------------------------------------------
 
-FloppyTypes:
-.rgbCapacityMultiplier equ 20	        ; Multiplier to reduce word sized values to byte size
-.rgbCapacity:
-	db		360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
-	db		1200  / FloppyTypes.rgbCapacityMultiplier    ;  type 2
-	db		720   / FloppyTypes.rgbCapacityMultiplier    ;  type 3
-	db		1440  / FloppyTypes.rgbCapacityMultiplier    ;  type 4
-	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
-	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
-
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-%if g_szFddFiveQuarter <> g_szFddThreeHalf+g_szFddThreeFive_Displacement
-%error "FddThreeFive_Displacement incorrect"
-%endif
-%endif
-		
-ALIGN JUMP_ALIGN
-BootMenuPrint_FloppyMenuitemInformation:
-	call	BootMenuPrint_ClearInformationArea
-	call	FloppyDrive_GetType			; Get Floppy Drive type to BX
+ALIGN JUMP_ALIGN
+BootMenuPrint_RefreshInformation:
+	CALL_MENU_LIBRARY ClearInformationArea		
+		
+	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
+	jnc		BootMenuEvent_EventCompleted				; if no menu selection, abort
 
 	push	bp
 	mov		bp, sp
-	ePUSH_T	ax, g_szCapacity
-		
-	mov		si, g_szFddSizeOr	        ; .PrintXTFloppyType
-	test	bx, bx						; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)		
-	jz		SHORT .output
-
-	mov		si, g_szFddUnknown	        ; .PrintUnknownFloppyType
+
+	test	dl, dl										; are we a hard disk?
+	js		BootMenuPrint_HardDiskRefreshInformation		
+		
+	call	FloppyDrive_GetType							; Get Floppy Drive type to BX
+
+	mov		cx, g_szFddSizeOr	        				; .PrintXTFloppyType
+	test	bx, bx										; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)		
+	jz		SHORT BootMenuPrint_HardDiskRefreshInformation.output
+
+	mov		cl, (g_szFddUnknown - $$) & 0xff	        ; .PrintUnknownFloppyType
 	cmp		bl, FLOPPY_TYPE_35_ED
-	ja		SHORT .output
+	ja		SHORT BootMenuPrint_HardDiskRefreshInformation.output
 		
 	; Fall to .PrintKnownFloppyType
-
 
 ;--------------------------------------------------------------------
@@ -223,19 +148,13 @@
 ;--------------------------------------------------------------------
 .PrintKnownFloppyType:
-	mov		si, g_szFddSize
-		
-	mov		ax, g_szFddThreeHalf
+	mov		cl, (g_szFddSize - $$) & 0xff
+	push	cx
+		
+	mov		cl, (g_szFddThreeHalf - $$) & 0xff
 	cmp		bl, FLOPPY_TYPE_525_HD
 	ja		.ThreeHalf
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-%if g_szFddThreeFive_Displacement = 2 		
-	inc		ax						; compressed string case
-	inc		ax
-%else
-	add		ax, g_szFddThreeFive_Displacement
-%endif
-%endif
+	mov		cl, (g_szFddFiveQuarter - $$) & 0xff
 .ThreeHalf:		
-	push	ax						; "5 1/4" or "3 1/2"
+	push	cx											; "5 1/4" or "3 1/2"
 
 	mov		al,FloppyTypes.rgbCapacityMultiplier
@@ -243,6 +162,67 @@
 	push	ax
 
+	jmp		short BootMenuPrint_HardDiskRefreshInformation.output
+
+
+;--------------------------------------------------------------------
+; Prints Hard Disk Menuitem information strings.
+;
+; BootMenuPrint_HardDiskMenuitemInformation
+;	Parameters:
+;		DL:		Untranslated Hard Disk number
+;		DS:		RAMVARS segment
+;	Returns:
+;		CF:		Set since menu event was handled successfully
+;	Corrupts registers:
+;		BX, CX, DX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BootMenuPrint_HardDiskRefreshInformation:		
+	call	RamVars_IsDriveHandledByThisBIOS
+	jnc		SHORT .HardDiskMenuitemInfoForForeignDrive
+	call	FindDPT_ForDriveNumber						; DS:DI to point DPT
+	; Fall to .HardDiskMenuitemInfoForOurDrive
+
+;--------------------------------------------------------------------
+; .HardDiskMenuitemInfoForOurDrive
+;	Parameters:
+;		DL:		Untranslated Hard Disk number
+;		DS:DI:	Ptr to DPT
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, DX, SI, DI, ES
+;--------------------------------------------------------------------
+.HardDiskMenuitemInfoForOurDrive:
+	ePUSH_T	ax, g_szSizeDual
+		
+	; Get and push L-CHS size
+	call	AH15h_GetSectorCountToDXAX
+	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
+
+	; Get and push total LBA size
+	call	BootInfo_GetTotalSectorCount
+	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat		
+	jmp		BootMenuPrintCfg_ForOurDrive
+				
+;--------------------------------------------------------------------
+; .HardDiskMenuitemInfoForForeignDrive
+;	Parameters:
+;		DL:		Untranslated Hard Disk number
+;		DS:		RAMVARS segment
+;	Returns:
+;		CF:		Set since menu event was handled successfully
+;	Corrupts registers:
+;		AX, BX, CX, DX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.HardDiskMenuitemInfoForForeignDrive:
+	call	DriveXlate_ToOrBack
+	call	AH15h_GetSectorCountFromForeignDriveToDXAX
+	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
+
 ALIGN JUMP_ALIGN		
 .output:
+	mov		si, g_szCapacity
 ;;; fall-through
 
@@ -263,96 +243,6 @@
 	stc				; Successfull return from menu event
 	pop		bp
-	ret		
-
-		
-;--------------------------------------------------------------------
-; Prints Hard Disk Menuitem information strings.
-;
-; BootMenuPrint_HardDiskMenuitemInformation
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event was handled successfully
-;	Corrupts registers:
-;		BX, CX, DX, SI, DI, ES
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_HardDiskMenuitemInformation:
-	call	RamVars_IsDriveHandledByThisBIOS
-	jnc		SHORT .HardDiskMenuitemInfoForForeignDrive
-	call	FindDPT_ForDriveNumber		; DS:DI to point DPT
-	; Fall to .HardDiskMenuitemInfoForOurDrive
-
-;--------------------------------------------------------------------
-; .HardDiskMenuitemInfoForOurDrive
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:DI:	Ptr to DPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI, DI, ES
-;--------------------------------------------------------------------
-.HardDiskMenuitemInfoForOurDrive:
-	push	di
-	ePUSH_T	ax, BootMenuPrintCfg_ForOurDrive	; Return from BootMenuPrint_FormatCSSIfromParamsInSSBP
-	push	bp
-	mov		bp, sp
-	ePUSH_T	ax, g_szCapacity
-
-	; Get and push L-CHS size
-	mov		[RAMVARS.bTimeoutTicksLeft], dl		; Store drive number
-	call	AH15h_GetSectorCountToDXAX
-	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
-
-	; Get and push total LBA size
-	mov		dl, [RAMVARS.bTimeoutTicksLeft]		; Restore drive number
-	call	BootInfo_GetTotalSectorCount
-	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
-
-	mov		si, g_szSizeDual
-	jmp		SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
-
-
-;--------------------------------------------------------------------
-; .HardDiskMenuitemInfoForForeignDrive
-;	Parameters:
-;		DL:		Untranslated Hard Disk number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event was handled successfully
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-.HardDiskMenuitemInfoForForeignDrive:
-	push	bp
-	mov		bp, sp
-	ePUSH_T	ax, g_szCapacity
-
-	call	DriveXlate_ToOrBack
-	call	AH15h_GetSectorCountFromForeignDriveToDXAX
-	call	ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
-
-	mov		si, g_szSizeSingle
- 	jmp		SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
-
-		
-;--------------------------------------------------------------------
-; BootMenuPrint_ClearInformationArea
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CF:		Set
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_ClearInformationArea:
-	CALL_MENU_LIBRARY ClearInformationArea
-	stc
 	ret
-
+		
 		
 ;--------------------------------------------------------------------
@@ -373,29 +263,4 @@
 	CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH
 	ret
-
-		
-;--------------------------------------------------------------------
-; PrintDriveNumberAfterTranslationFromDL
-;	Parameters:
-;		DL:		Untranslated Floppy Drive number
-;		DS:		RAMVARS segment
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-PrintDriveNumberAfterTranslationFromDL:
-	mov		ax, dx
-	call	DriveXlate_ToOrBack
-	xchg	dx, ax				; Restore DX, WORD to print in AL
-	xor		ah, ah
-	push	bp
-	mov		bp, sp
-	mov		si, g_szDriveNum
-	push	ax
-		
-BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:	
-	jmp		SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
 
 
@@ -510,5 +375,7 @@
 	push	cx			; Key attribute for last space
 	mov		si, g_szHotkey
-	jmp		SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
+		
+BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:	
+	jmp		SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
 
 
@@ -528,6 +395,41 @@
 
 
-		
-
-
-		
+;--------------------------------------------------------------------
+; ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
+;	Parameters:
+;		BX:DX:AX:	Sector count
+;	Returns:
+;		Size in stack
+;	Corrupts registers:
+;		AX, BX, CX, DX, SI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
+	pop		si						; Pop return address
+	ePUSH_T	cx, g_szCapacityNum		; Push format substring
+	call	Size_ConvertSectorCountInBXDXAXtoKiB
+	mov		cx, BYTE_MULTIPLES.kiB
+	call	Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
+	push	ax						; Size in magnitude
+	push	cx						; Tenths
+	push	dx						; Magnitude character
+	jmp		si
+
+
+FloppyTypes:
+.rgbCapacityMultiplier equ 20	        ; Multiplier to reduce word sized values to byte size
+.rgbCapacity:
+	db		360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
+	db		1200  / FloppyTypes.rgbCapacityMultiplier    ;  type 2
+	db		720   / FloppyTypes.rgbCapacityMultiplier    ;  type 3
+	db		1440  / FloppyTypes.rgbCapacityMultiplier    ;  type 4
+	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
+	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
+
+
+
+
+		
+
+
+		
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 241)
@@ -12,6 +12,5 @@
 ; BootMenuPrintCfg_ForOurDrive
 ;	Parameters:
-;		DS:		Segment to DPT
-;		Stack:	Offset to DPT
+;		DS:DI:		Pointer to DPT
 ;	Returns:
 ;		Nothing
@@ -21,25 +20,7 @@
 ALIGN JUMP_ALIGN
 BootMenuPrintCfg_ForOurDrive:
-	mov		si, g_szCfgHeader
-	call	BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
-	pop		di
 	eMOVZX	ax, BYTE [di+DPT.bIdevarsOffset]
 	xchg	si, ax						; CS:SI now points to IDEVARS
 	; Fall to .PushAndFormatCfgString
-
-;--------------------------------------------------------------------
-; PushAndFormatCfgString
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:SI:	Ptr to IDEVARS
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DX, SI, DI
-;--------------------------------------------------------------------
-.PushAndFormatCfgString:
-	push	bp
-	mov		bp, sp
-	; Fall to first push below
 
 ;--------------------------------------------------------------------
@@ -114,5 +95,6 @@
 ;--------------------------------------------------------------------
 .PushIRQ:
-	eMOVZX	ax, BYTE [cs:si+IDEVARS.bIRQ]
+	mov		al, BYTE [cs:si+IDEVARS.bIRQ]
+	cbw
 	push	ax
 
@@ -129,5 +111,5 @@
 .PushResetStatus:
 	mov		al, [di+DPT.bFlagsHigh]
-	and		ax, MASKH_DPT_RESET
+	and		al, MASKH_DPT_RESET			;  ah already zero from last push
 	push	ax
 
@@ -142,5 +124,4 @@
 ;--------------------------------------------------------------------
 .PrintValuesFromStack:
-	mov		si, g_szCfgFormat
-	jmp		BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
+	jmp		BootMenuPrint_HardDiskRefreshInformation.output
 
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm	(revision 241)
@@ -22,5 +22,4 @@
 	mov		si, g_szReadError
 		
-BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:		
 	jmp		short BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
 		
@@ -54,5 +53,5 @@
 
 	mov		si, g_szTryToBoot
-	jmp		short BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay		
+	jmp		short BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay		
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 241)
@@ -8,7 +8,4 @@
 ; Section containing code
 SECTION .text
-
-; POST drive detection strings
-g_szRomAt:		db	"%s @ %x",LF,CR,NULL
 
 ; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
@@ -29,7 +26,29 @@
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
 %if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
-%error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
-%endif
-%endif				
+%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
+%endif
+%endif
+
+; Boot Menu menuitem strings
+; 
+; The following strings are used by BootMenuPrint_* routines.
+; To support optimizations in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;		
+g_szBootMenuPrintStart:	
+g_szDriveNum:			db	"%x %s",NULL
+g_szDriveNumBOOTNFO:	db	"%x %z",NULL
+g_szFloppyDrv:			db	"Floppy Drive %c",NULL
+g_szBootMenuPrintEnd:	
+g_szForeignHD:			db	"Foreign Hard Disk",NULL
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
+%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
+%endif
+%endif
+
+; POST drive detection strings
+g_szRomAt:		db	"%s @ %x",LF,CR,NULL
 				
 ; Boot loader strings
@@ -44,19 +63,32 @@
 g_szRomBoot:	db	"ROM Boot",NULL
 g_szHotkey:		db	"%A%c%c%A%s%A ",NULL
-
-
-; Boot Menu menuitem strings
-g_szDriveNum:	db	"%x ",NULL
-g_szFDLetter:	db	"%s %c",NULL
-g_szFloppyDrv:	db	"Floppy Drive",NULL
-g_szforeignHD:	db	"Foreign Hard Disk",NULL
-
+				
 ; Boot Menu information strings
-g_szCapacity:	db	"Capacity : ",NULL
-g_szSizeSingle:	db	"%s%u.%u %ciB",NULL
-g_szSizeDual:	db	"%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
-g_szCfgHeader:	db	"Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
-g_szCfgFormat:	db	"%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
-		
+g_szCapacity:			db	"Capacity : %s",NULL
+g_szCapacityNum:		db	"%5-u.%u %ciB",NULL		
+g_szSizeDual:			db	"%s /%s",LF,CR
+	db	"Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
+	db	   "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
+
+; Boot Menu Floppy Disk strings
+; 
+; The following strings are used by BootMenuPrint_RefreshInformation
+; To support optimizations in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;				
+g_szFddStart:	
+g_szFddUnknown:	db	"Unknown",NULL
+g_szFddSizeOr:	db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
+g_szFddSize:	db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
+g_szFddThreeHalf:		db  "3",ONE_HALF,NULL
+g_szFddEnd:		
+g_szFddFiveQuarter:		db  "5",ONE_QUARTER,NULL
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
+%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
+%endif
+%endif						
+
 g_szAddressingModes:					
 g_szLCHS:		db	"L-CHS",NULL
@@ -83,12 +115,4 @@
 %endif		
 		
-g_szFddUnknown:	db	"%sUnknown",NULL
-g_szFddSizeOr:	db	"%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
-g_szFddSize:	db	"%s%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
-
-g_szFddThreeHalf:		db  "3",ONE_HALF,NULL
-g_szFddFiveQuarter:		db  "5",ONE_QUARTER,NULL		
-g_szFddThreeFive_Displacement equ (g_szFddFiveQuarter - g_szFddThreeHalf)
-
 g_szBusTypeValues:		
 g_szBusTypeValues_8Dual:		db		"D8 ",NULL
@@ -152,5 +176,5 @@
 ;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER
 ;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
-;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL		
+;$translate{ord('0')} = 20;
 ;
 ; Formats begin immediately after the last Translated character (they are in the same table)
@@ -167,5 +191,6 @@
 ;$format{"2-u"} = 28;        # must be even
 ;$format{"A"}   = 29;        # n/a
-;$format{"s"}   = 30;        # n/a		
+;$format{"s"}   = 30;        # n/a, normal string from DS
+;$format{"z"}   = 31;        # n/a, boot string from BDA
 ;
 ; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
Index: trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 241)
@@ -17,4 +17,80 @@
 SECTION .text
 
+; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
+; To support an optimization in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;
+g_szDetectStart:		
+g_szDetectMaster:		; db	"Master",NULL 
+                 		; db	 4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
+                 		  db	 53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
+
+g_szDetectSlave:		; db	"Slave ",NULL
+                		; db	 53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
+                		  db	 59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
+
+g_szDetectOuter:		; db	"IDE %s at %s: ",NULL
+                		; db	 49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
+                		  db	 4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
+
+g_szDetectPort:			; db	"%x",NULL					   	; IDE Master at 1F0h:
+               			; db	 25h,  78h,  00h    ; uncompressed
+               			  db	 19h                ; compressed
+
+g_szDetectCOM:			; db  "COM%c%s",NULL            
+              			; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
+              			  db   49h,  55h,  53h,  35h,  1eh                      ; compressed
+
+g_szDetectCOMAuto:		; db	" Auto",NULL
+                  		; db	 20h,  41h,  75h,  74h,  6fh,  00h    ; uncompressed
+                  		  db	 20h,  47h,  7bh,  7ah, 0b5h          ; compressed
+
+g_szDetectCOMSmall:		; db	"/%u%u00",NULL					; IDE Master at COM1/9600:
+                   		; db	 2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
+                   		  db	 2ah,  37h,  37h,  34h,  14h                      ; compressed
+
+g_szDetectEnd:
+g_szDetectCOMLarge:		; db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
+                   		; db	 2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
+                   		  db	 2ah,  37h,  29h,  37h,  91h                      ; compressed
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
+%error "g_szDetect* strings must start on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
+%endif
+%endif
+
+; Boot Menu menuitem strings
+; 
+; The following strings are used by BootMenuPrint_* routines.
+; To support optimizations in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;		
+g_szBootMenuPrintStart:	
+g_szDriveNum:			; db	"%x %s",NULL
+             			; db	 25h,  78h,  20h,  25h,  73h,  00h    ; uncompressed
+             			  db	 39h,  20h,  1eh                      ; compressed
+
+g_szDriveNumBOOTNFO:	; db	"%x %z",NULL
+                    	; db	 25h,  78h,  20h,  25h,  7ah,  00h    ; uncompressed
+                    	  db	 39h,  20h,  1fh                      ; compressed
+
+g_szFloppyDrv:			; db	"Floppy Drive %c",NULL
+              			; db	 46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  20h,  25h,  63h,  00h    ; uncompressed
+              			  db	 4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0ebh,  15h                            ; compressed
+
+g_szBootMenuPrintEnd:	
+g_szForeignHD:			; db	"Foreign Hard Disk",NULL
+              			; db	 46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
+              			  db	 4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szBootMenuPrintStart-$$) & 0xff00) <> ((g_szBootMenuPrintEnd-$$) & 0xff00)
+%error "g_szBootMenuPrint* strings must start on the same 256 byte page, required by the BootMenuPrint_* routines.  Please move this block up or down within strings.asm"
+%endif
+%endif
+
 ; POST drive detection strings
 g_szRomAt:		; db	"%s @ %x",LF,CR,NULL
@@ -23,49 +99,4 @@
 
 
-; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
-; To support an optimization in that code, these strings must start on the same 256 byte page, 
-; which is checked at assembly time below.
-;
-g_szDetectStart:		
-g_szDetectMaster:		; db	"Master",NULL 
-                 		; db	 4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
-                 		  db	 53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
-
-g_szDetectSlave:		; db	"Slave ",NULL
-                		; db	 53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
-                		  db	 59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
-
-g_szDetectOuter:		; db	"IDE %s at %s: ",NULL
-                		; db	 49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
-                		  db	 4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
-
-g_szDetectPort:			; db	"%x",NULL					   	; IDE Master at 1F0h:
-               			; db	 25h,  78h,  00h    ; uncompressed
-               			  db	 19h                ; compressed
-
-g_szDetectCOM:			; db  "COM%c%s",NULL            
-              			; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
-              			  db   49h,  55h,  53h,  35h,  1eh                      ; compressed
-
-g_szDetectCOMAuto:		; db	" Auto",NULL
-                  		; db	 20h,  41h,  75h,  74h,  6fh,  00h    ; uncompressed
-                  		  db	 20h,  47h,  7bh,  7ah, 0b5h          ; compressed
-
-g_szDetectCOMSmall:		; db	"/%u%u00",NULL					; IDE Master at COM1/9600:
-                   		; db	 2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
-                   		  db	 2ah,  37h,  37h,  34h,  14h                      ; compressed
-
-g_szDetectEnd:
-g_szDetectCOMLarge:		; db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
-                   		; db	 2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
-                   		  db	 2ah,  37h,  29h,  37h,  91h                      ; compressed
-
-
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
-%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
-%error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
-%endif
-%endif				
-
 ; Boot loader strings
 g_szTryToBoot:			; db	"Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
@@ -104,44 +135,60 @@
 
 
-
-; Boot Menu menuitem strings
-g_szDriveNum:	; db	"%x ",NULL
-             	; db	 25h,  78h,  20h,  00h    ; uncompressed
-             	  db	 39h,  00h                ; compressed
-
-g_szFDLetter:	; db	"%s %c",NULL
-             	; db	 25h,  73h,  20h,  25h,  63h,  00h    ; uncompressed
-             	  db	 3eh,  20h,  15h                      ; compressed
-
-g_szFloppyDrv:	; db	"Floppy Drive",NULL
-              	; db	 46h,  6ch,  6fh,  70h,  70h,  79h,  20h,  44h,  72h,  69h,  76h,  65h,  00h    ; uncompressed
-              	  db	 4ch,  72h,  75h,  76h,  76h, 0ffh,  4ah,  78h,  6fh,  7ch, 0abh                ; compressed
-
-g_szforeignHD:	; db	"Foreign Hard Disk",NULL
-              	; db	 46h,  6fh,  72h,  65h,  69h,  67h,  6eh,  20h,  48h,  61h,  72h,  64h,  20h,  44h,  69h,  73h,  6bh,  00h    ; uncompressed
-              	  db	 4ch,  75h,  78h,  6bh,  6fh,  6dh, 0f4h,  4eh,  67h,  78h, 0eah,  4ah,  6fh,  79h, 0b1h                      ; compressed
-
-
 ; Boot Menu information strings
-g_szCapacity:	; db	"Capacity : ",NULL
-             	; db	 43h,  61h,  70h,  61h,  63h,  69h,  74h,  79h,  20h,  3ah,  20h,  00h    ; uncompressed
-             	  db	 49h,  67h,  76h,  67h,  69h,  6fh,  7ah, 0ffh,  40h,  00h                ; compressed
-
-g_szSizeSingle:	; db	"%s%u.%u %ciB",NULL
-               	; db	 25h,  73h,  25h,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
-               	  db	 3eh,  37h,  29h,  37h,  20h,  35h,  6fh,  88h                                  ; compressed
-
-g_szSizeDual:	; db	"%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
-             	; db	 25h,  73h,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  20h,  2fh,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  0ah,  0dh,  00h    ; uncompressed
-             	  db	 3eh,  38h,  29h,  37h,  20h,  35h,  6fh, 0c8h,  2ah,  38h,  29h,  37h,  20h,  35h,  6fh,  48h,  1bh                                                                                        ; compressed
-
-g_szCfgHeader:	; db	"Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
-              	; db	 41h,  64h,  64h,  72h,  2eh, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh,  00h    ; uncompressed
-              	  db	 47h,  6ah,  6ah,  78h,  29h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  1bh                ; compressed
-
-g_szCfgFormat:	; db	"%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
-              	; db	 25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
-              	  db	 3eh,  23h,  38h,  23h,  3eh,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
-
+g_szCapacity:			; db	"Capacity : %s",NULL
+             			; db	 43h,  61h,  70h,  61h,  63h,  69h,  74h,  79h,  20h,  3ah,  20h,  25h,  73h,  00h    ; uncompressed
+             			  db	 49h,  67h,  76h,  67h,  69h,  6fh,  7ah, 0ffh, 0c0h,  1eh                            ; compressed
+
+g_szCapacityNum:		; db	"%5-u.%u %ciB",NULL		
+                		; db	 25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
+                		  db	 38h,  29h,  37h,  20h,  35h,  6fh,  88h                                        ; compressed
+
+g_szSizeDual:			; db	"%s /%s",LF,CR
+             			; db	 25h,  73h,  20h,  2fh,  25h,  73h,  0ah,  0dh    ; uncompressed
+             			  db	 3eh,  20h,  2ah,  3eh,  3bh                      ; compressed
+
+	; db	"Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",SINGLE_VERTICAL,  "IRQ",SINGLE_VERTICAL,"Reset",LF,CR
+	; db	 41h,  64h,  64h,  72h,  2eh, 0b3h,  42h,  6ch,  6fh,  63h,  6bh, 0b3h,  42h,  75h,  73h, 0b3h,  49h,  52h,  51h, 0b3h,  52h,  65h,  73h,  65h,  74h,  0ah,  0dh    ; uncompressed
+	  db	 47h,  6ah,  6ah,  78h,  29h,  23h,  48h,  72h,  75h,  69h,  71h,  23h,  48h,  7bh,  79h,  23h,  4fh,  58h,  57h,  23h,  58h,  6bh,  79h,  6bh,  7ah,  3bh          ; compressed
+
+	; db	   "%s",SINGLE_VERTICAL, "%5-u",SINGLE_VERTICAL, "%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x" ,NULL
+	; db	    25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
+	  db	    3eh,  23h,  38h,  23h,  3eh,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
+
+
+; Boot Menu Floppy Disk strings
+; 
+; The following strings are used by BootMenuPrint_RefreshInformation
+; To support optimizations in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;				
+g_szFddStart:	
+g_szFddUnknown:	; db	"Unknown",NULL
+               	; db	 55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
+               	  db	 5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h          ; compressed
+
+g_szFddSizeOr:	; db	"5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
+              	; db	 35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
+              	  db	 2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                ; compressed
+
+g_szFddSize:	; db	"%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
+            	; db	 25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
+            	  db	 3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                      ; compressed
+
+g_szFddThreeHalf:		; db  "3",ONE_HALF,NULL
+                 		; db   33h, 0abh,  00h    ; uncompressed
+                 		  db   2dh,  02h          ; compressed
+
+g_szFddEnd:		
+g_szFddFiveQuarter:		; db  "5",ONE_QUARTER,NULL
+                   		; db   35h, 0ach,  00h    ; uncompressed
+                   		  db   2fh,  01h          ; compressed
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szFddStart-$$) & 0xff00) <> ((g_szFddEnd-$$) & 0xff00)
+%error "g_szFdd* strings must start on the same 256 byte page, required by the BootMenuPrint_RefreshInformation routines for floppy drives.  Please move this block up or down within strings.asm"
+%endif
+%endif						
 
 g_szAddressingModes:					
@@ -180,27 +227,4 @@
 %endif
 %endif		
-
-g_szFddUnknown:	; db	"%sUnknown",NULL
-               	; db	 25h,  73h,  55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
-               	  db	 3eh,  5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h                ; compressed
-
-g_szFddSizeOr:	; db	"%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
-              	; db	 25h,  73h,  35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
-              	  db	 3eh,  2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                      ; compressed
-
-g_szFddSize:	; db	"%s%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
-            	; db	 25h,  73h,  25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
-            	  db	 3eh,  3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                            ; compressed
-
-
-g_szFddThreeHalf:		; db  "3",ONE_HALF,NULL
-                 		; db   33h, 0abh,  00h    ; uncompressed
-                 		  db   2dh,  02h          ; compressed
-
-g_szFddFiveQuarter:		; db  "5",ONE_QUARTER,NULL		
-                   		; db   35h, 0ach,  00h    ; uncompressed
-                   		  db   2fh,  01h          ; compressed
-
-g_szFddThreeFive_Displacement equ (g_szFddFiveQuarter - g_szFddThreeHalf)
 
 g_szBusTypeValues:		
@@ -289,5 +313,5 @@
 ;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER    [StringsCompress Processed]
 ;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL    [StringsCompress Processed]
-;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL		    [StringsCompress Processed]
+;$translate{ord('0')} = 20;    [StringsCompress Processed]
 ;
 ; Formats begin immediately after the last Translated character (they are in the same table)
@@ -304,5 +328,6 @@
 ;$format{"2-u"} = 28;        # must be even    [StringsCompress Processed]
 ;$format{"A"}   = 29;        # n/a    [StringsCompress Processed]
-;$format{"s"}   = 30;        # n/a		    [StringsCompress Processed]
+;$format{"s"}   = 30;        # n/a, normal string from DS    [StringsCompress Processed]
+;$format{"z"}   = 31;        # n/a, boot string from BDA    [StringsCompress Processed]
 ;
 ; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
@@ -358,4 +383,5 @@
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A)    ; 29
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s)    ; 30
+        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_z)    ; 31
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
@@ -390,21 +416,46 @@
 %error "DisplayFormatCompressed_Format_s is out of range of DisplayFormatCompressed_BaseFormatOffset"
 %endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_z || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_z > 255
+%error "DisplayFormatCompressed_Format_z is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
 %endif
 
 ;; translated usage stats
-;; total translated: 
+;; 33:1
+;; 32:31
+;; 181:1
+;; 53:2
+;; 48:2
+;; 200:1
+;; 46:3
+;; 179:8
+;; 44:1
+;; 50:2
+;; 51:3
+;; 47:3
+;; 52:1
+;; 172:2
+;; 34:3
+;; 49:1
+;; 56:5
+;; 45:3
+;; 175:1
+;; 171:2
+;; 54:1
+;; total translated: 21
 
 ;; format usage stats
 ;; A:4
 ;; 2-u:1
-;; 5-u:3
-;; x:6
-;; s:15
+;; 5-u:2
+;; x:7
+;; s:13
 ;; 5-x:1
 ;; nl:6
 ;; 2-I:1
-;; c:7
-;; u:9
-;; total format: 10
+;; c:5
+;; u:6
+;; z:1
+;; total format: 11
 
 ;; alphabet usage stats
@@ -417,5 +468,5 @@
 ;; 64,@:1
 ;; 65,A:4
-;; 66,B:11
+;; 66,B:9
 ;; 67,C:4
 ;; 68,D:10
@@ -456,5 +507,5 @@
 ;; 103,g:2
 ;; 104,h:
-;; 105,i:11
+;; 105,i:9
 ;; 106,j:
 ;; 107,k:4
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 239)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 241)
@@ -31,4 +31,5 @@
 ;--------------------------------------------------------------------
 .StealMemoryForRAMVARS:
+	mov		ax, LITE_MODE_RAMVARS_SEGMENT
 	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
 	jz		SHORT .InitializeRamvars	; No need to steal RAM
@@ -39,23 +40,20 @@
 	mov		ax, [BDA.wBaseMem]
 	eSHL_IM	ax, 6						; Segment to first stolen kB (*=40h)
+	; Fall to .InitializeRamvars
+
+;--------------------------------------------------------------------
+; .InitializeRamvars
+;	Parameters:
+;		AX:		RAMVARS segment
+;	Returns:
+;		DS:		RAMVARS segment
+;	Corrupts registers:
+;		AX, CX, DI, ES
+;--------------------------------------------------------------------
+.InitializeRamvars:
 	mov		ds, ax
-	mov		WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
-	; Fall to .InitializeRamvars
-
-;--------------------------------------------------------------------
-; .InitializeRamvars
-;	Parameters:
-;		Nothing
-;	Returns:
-;		DS:		RAMVARS segment
-;	Corrupts registers:
-;		AX, CX, DI, ES
-;--------------------------------------------------------------------
-.InitializeRamvars:
-	call	RamVars_GetSegmentToDS
+	mov		es, ax
 	mov		cx, RAMVARS_size
 	xor		di, di
-	push	ds
-	pop		es
 	call	Memory_ZeroESDIwithSizeInCX
 	mov		WORD [RAMVARS.wSignature], RAMVARS_SIGNATURE
