Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 567)
@@ -119,9 +119,9 @@
 	mov		dl, ROMVARS.ideVars0						; starting Idevars offset
 
-    ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd,
-    ; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from
+	; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd,
+	; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from
 	; RamVars_GetIdeControllerCountToCX was used.  Unused controllers won't make a difference, since no DPT
 	; will point to them.  Performance isn't an issue, as this is a reset operation.
-    ;
+	;
 	mov		cx, NUMBER_OF_IDEVARS
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm	(revision 567)
@@ -37,5 +37,5 @@
 ;		If successful:
 ;			AH:		Hard Disk: 3 (Hard disk accessible)
-;                   Floppy:    1 (Floppy disk, without change detection)
+;					Floppy:    1 (Floppy disk, without change detection)
 ;			CX:DX:	Total number of sectors
 ;			CF:		0
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm	(revision 567)
@@ -19,6 +19,4 @@
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 ;
-
-; Modified by JJP for XT-CFv3 support, Mar-13
 
 ; Section containing code
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 567)
@@ -31,5 +31,5 @@
 ;		SS:BP:	Ptr to IDEPACK
 ;	Returns with INTPACK:
-;       BL:     Drive Type (for floppies only)
+;		BL:		Drive Type (for serial floppies only)
 ;		CH:		Maximum cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9...8
@@ -37,5 +37,5 @@
 ;		DH:		Maximum head number (0...254)
 ;		DL:		Number of drives!!!
-;       ES:DI:  Floppy DPT (for floppies only)
+;		ES:DI:	Floppy DPT (for serial floppies only)
 ;		AH:		Int 13h/40h floppy return status
 ;		CF:		0 if successful, 1 if error
@@ -57,5 +57,5 @@
 	call	RamVars_GetCountOfKnownDrivesToAX		; assume hard disk for now, will discard if for floppies
 
-	test	byte [bp+IDEPACK.intpack+INTPACK.dl], 080h
+	test	BYTE [bp+IDEPACK.intpack+INTPACK.dl], 80h
 	jnz		SHORT .CalledForHardDrive
 
@@ -93,4 +93,5 @@
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
 ;	Returns:
+;		BL:		Drive Type (for serial floppies only)
 ;		CH:		Maximum cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9...8
@@ -98,5 +99,5 @@
 ;		DH:		Maximum head number (0...254)
 ;	Corrupts registers:
-;		AX, BX
+;		AX, BH
 ;--------------------------------------------------------------------
 AH8h_GetDriveParameters:
@@ -115,4 +116,5 @@
 ;		DS:		RAMVARS segment
 ;	Returns:
+;		BL:		Drive Type (for serial floppies only)
 ;		CH:		Maximum cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9...8
@@ -120,5 +122,5 @@
 ;		DH:		Maximum head number (0...254)
 ;	Corrupts registers:
-;		AX, BX
+;		AX, BH
 ;--------------------------------------------------------------------
 .PackReturnValues:
@@ -172,5 +174,5 @@
 
 	db		1h << 1 | 0				; Offset 1: Typical values of 1 for head load time
-									;           DMA used (although it actually is not, but is more restrictive)
+									; 			DMA used (although it actually is not, but is more restrictive)
 	db		25h						; Offset 2: Inactivity motor turn-off delay,
 									; 			Typical value of 25h for 2 second delay
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 567)
@@ -194,5 +194,5 @@
 
 
-%ifdef MODULE_FEATURE_SETS
+%ifdef MODULE_POWER_MANAGEMENT
 ;;;	InitStandbyTimer
 	; Initialize the standby timer (if supported)
@@ -206,5 +206,5 @@
 	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER
 .NoPowerManagementSupport:
-%endif ; MODULE_FEATURE_SETS
+%endif ; MODULE_POWER_MANAGEMENT
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 567)
@@ -39,5 +39,9 @@
 AH41h_HandlerForCheckIfExtensionsPresent:
 	cmp		WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh
+%ifdef USE_386
+	jne		Int13h_DirectCallToAnotherBios
+%else
 	jne		SHORT .EbiosNotSupported
+%endif
 
 	mov		BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
@@ -53,6 +57,9 @@
 	and		BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF	; Return with CF cleared
 	jmp		Int13h_ReturnFromHandlerWithoutStoringErrorCode
+
+%ifndef USE_386
 .EbiosNotSupported:
 	jmp		Int13h_DirectCallToAnotherBios
+%endif
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm	(revision 566)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm	(revision 567)
@@ -113,5 +113,5 @@
 ; Prepare_ByValidatingSectorsInALforOldInt13h
 ;	Parameters:
-;		AL:		Number of sectors to transfer
+;		AL:		Number of sectors to transfer (1...128 is valid)
 ;	Returns:
 ;		Exits INT 13h if invalid number of sectors in AL
@@ -120,13 +120,12 @@
 ;--------------------------------------------------------------------
 Prepare_ByValidatingSectorsInALforOldInt13h:
-	test	al, al
-	js		SHORT .CheckZeroOffsetFor128Sectors		; 128 or more
-	jz		SHORT InvalidNumberOfSectorsRequested	; Zero not allowed for old INT 13h
+	test	al, al								; Check if 0 < AL < 128 (Clears OF)
+	jle		SHORT .CheckIf128Sectors			; Jump if not
 	ret		; Continue with transfer
 
 ALIGN JUMP_ALIGN
-.CheckZeroOffsetFor128Sectors:
+.CheckIf128Sectors:
 	cmp		al, 128
-	ja		SHORT InvalidNumberOfSectorsRequested
+	jne		SHORT InvalidNumberOfSectorsRequested
 	test	si, si								; Offset must be zero to xfer 128 sectors
 	jnz		SHORT CannotAlignPointerProperly
