Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 294)
@@ -26,26 +26,26 @@
 
 	call	RamVars_GetSegmentToDS
-		
+
 	call	DriveXlate_ToOrBack
 	mov		[RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl
-		
+
 	call	FindDPT_ForDriveNumberInDL				; DS:DI points to our DPT, or NULL if not our drive
 	jnc		SHORT .OurFunction						; DPT found, this is one of our drives, and thus our function
 
-	cmp		ah, 0
-	jz		short .OurFunction						; we handle all function 0h requests (resets)
+	test	ah, ah
+	jz		SHORT .OurFunction						; we handle all function 0h requests (resets)
 	cmp		ah, 8
-	jnz		SHORT Int13h_DirectCallToAnotherBios	; non-8h function, handled by foreign bios
+	jne		SHORT Int13h_DirectCallToAnotherBios	; non-8h function, handled by foreign bios
 
 %ifndef MODULE_SERIAL_FLOPPY
-; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and 
-; floppy drive counts.  Without floppy support, we handle only hard disk traffic for function 08h, 
+; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and
+; floppy drive counts.  Without floppy support, we handle only hard disk traffic for function 08h,
 ; and thus need the check below.
 ;
-	test	dl, dl								
+	test	dl, dl
 	jns		SHORT Int13h_DirectCallToAnotherBios
-%endif		
-				
-.OurFunction:	
+%endif
+
+.OurFunction:
 	; Jump to correct BIOS function
 	eMOVZX	bx, ah
@@ -141,5 +141,5 @@
 	test	dl, dl
 	js		short Int13h_UnsupportedFunction
-	mov		ah, 0
+	xor		ah, ah
 	jmp		short Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
 %endif
@@ -172,5 +172,5 @@
 %ifdef MODULE_SERIAL_FLOPPY
 	mov		al, [bp+IDEPACK.intpack+INTPACK.dl]
-Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber:	
+Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber:
 	call	Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber
 %else
@@ -191,5 +191,5 @@
 ;	Returns:
 ;		Depends on function
-;       NOTE: ES:DI needs to be returned from the previous interrupt 
+;       NOTE: ES:DI needs to be returned from the previous interrupt
 ;		      handler, for floppy DPT in function 08h
 ;	Corrupts registers:
@@ -251,9 +251,9 @@
 .HardDisk:
 	LOAD_BDA_SEGMENT_TO	ds, di
-	mov		[bx], ah		
+	mov		[bx], ah
 %else
 Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH:
 	; Store error code to BDA
-	LOAD_BDA_SEGMENT_TO	ds, di		
+	LOAD_BDA_SEGMENT_TO	ds, di
 	mov		[BDA.bHDLastSt], ah
 %endif
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm	(revision 294)
@@ -19,5 +19,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status (from drive requested in DL)
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -28,5 +28,5 @@
 %ifdef MODULE_SERIAL_FLOPPY
 ;
-; "Reset" emulatd serial floppy drives, if any.  There is nothing to actually do for this reset,
+; "Reset" emulated serial floppy drives, if any.  There is nothing to actually do for this reset,
 ; but record the proper error return code if one of these floppy drives is the drive requested.
 ;
@@ -39,5 +39,5 @@
 
 	adc		dl, al										; second drive (CF set) if present
-														; If no drive is present, this will result in ffh which 
+														; If no drive is present, this will result in ffh which
 														; won't match a drive
 	call	BackupErrorCodeFromTheRequestedDriveToBH
@@ -48,8 +48,8 @@
 	test	bl, bl										; If we were called with a floppy disk, then we are done,
 	jns		SHORT .SkipHardDiskReset					; don't do hard disks.
-		
+
 	call	ResetForeignHardDisks
 
-	; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based, 
+	; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based,
 	; such that this call must be the last in the list of reset routines called.
 	;
@@ -57,5 +57,5 @@
 	; and we need to override that value if we are xlate'd into 80h with one of our drives.
 	;
-	call	ResetHardDisksHandledByOurBIOS			
+	call	ResetHardDisksHandledByOurBIOS
 
 .SkipHardDiskReset:
@@ -139,5 +139,5 @@
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT for requested drive
-;				If DPT pointer is not available, or error result in BH won't be used anyway, 
+;				If DPT pointer is not available, or error result in BH won't be used anyway,
 ;				enter through .ErrorCodeNotUsed.
 ;		SS:BP:	Ptr to IDEPACK
@@ -148,10 +148,10 @@
 ;--------------------------------------------------------------------
 ResetHardDisksHandledByOurBIOS:
-	mov		bl, 0										; Assume Null IdevarsOffset for now, assuming foreign drive
+	xor		bl, bl										; Assume Null IdevarsOffset for now, assuming foreign drive
 	test	di, di
 	jz		.ErrorCodeNotUsed
 	mov		bl, [di+DPT.bIdevarsOffset]					; replace drive number with Idevars pointer for cmp with dl
-		
-.ErrorCodeNotUsed:										; BH will be garbage on exit if thie entry point is used, 
+
+.ErrorCodeNotUsed:										; BH will be garbage on exit if this entry point is used,
 														; but reset of all drives will still happen
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH10h_HReady.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH10h_HReady.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH10h_HReady.asm	(revision 294)
@@ -15,5 +15,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH11h_HRecal.asm	(revision 294)
@@ -15,5 +15,5 @@
 ;	Returns with INTPACK:
 ;		AH:		BIOS Error code
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -35,5 +35,5 @@
 ;	Returns:
 ;		AH:		BIOS Error code
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, CX, DX
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm	(revision 294)
@@ -14,5 +14,5 @@
 ;		SS:BP:	Ptr to IDEPACK
 ;	Returns with INTPACK:
-;		If succesfull:
+;		If successful:
 ;			AH:		Hard Disk: 3 (Hard disk accessible)
 ;                   Floppy:    1 (Floppy disk, without change detection)
@@ -28,26 +28,26 @@
 %ifdef MODULE_SERIAL_FLOPPY
 	mov		cl, 1										; 1 = floppy disk, no change detection
-				
-	test	dl,dl										; DO NOT store the sector count if this is a 
-	jns		.FloppyDrive								; floppy disk, some OS's depend on this not 
+
+	test	dl,dl										; DO NOT store the sector count if this is a
+	jns		.FloppyDrive								; floppy disk, some OS's depend on this not
 														; happening for floppies in order to boot.
 %endif
-		
+
 	call	AH15h_GetSectorCountToBXDXAX
 	mov		[bp+IDEPACK.intpack+INTPACK.cx], dx			; HIWORD to CX
 	xchg	[bp+IDEPACK.intpack+INTPACK.dx], ax			; LOWORD to DX, AL gets drive number
 
-	xor		ah, ah		
-%ifdef MODULE_SERIAL_FLOPPY				
+	xor		ah, ah
+%ifdef MODULE_SERIAL_FLOPPY
 	mov		cl, 3										; 3 = Hard Disk Accessible
 .FloppyDrive:
-		
-	call	Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber	; Store success to BDA and CF		
-	mov		BYTE [bp+IDEPACK.intpack+INTPACK.ah], cl
+
+	call	Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH_ALHasDriveNumber	; Store success to BDA and CF
+	mov		[bp+IDEPACK.intpack+INTPACK.ah], cl
 %else
-	call	Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH	; Store success to BDA and CF		
+	call	Int13h_SetErrorCodeToBdaAndToIntpackInSSBPfromAH	; Store success to BDA and CF
 	mov		BYTE [bp+IDEPACK.intpack+INTPACK.ah], 3
-%endif		
-		
+%endif
+
 	jmp		Int13h_ReturnFromHandlerWithoutStoringErrorCode
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1h_HStatus.asm	(revision 294)
@@ -23,14 +23,18 @@
 %ifdef MODULE_SERIAL_FLOPPY
 	test	dl, dl
-	jns		.HardDisk
-	mov		ah, [BDA.bFDRetST]		; Unlike for hard disks below, floppy version does not clear the status
+	js		.HardDisk
+	mov		ah, [BDA.bFDRetST]	; Unlike for hard disks below, floppy version does not clear the status
 	jmp		.done
-.HardDisk:	
+.HardDisk:
 %endif
-		
-	xchg	ah, [BDA.bHDLastSt]		; Load and clear last error
-									; Note that AH is cleared with the LOAD_BDA_SEGMENT above
-				
+
+	xchg	ah, [BDA.bHDLastSt]	; Load and clear last error (AH is cleared with the LOAD_BDA_SEGMENT_TO above)
+
 .done:
+%ifndef USE_186
 	call	Int13h_SetErrorCodeToIntpackInSSBPfromAH
 	jmp		Int13h_ReturnFromHandlerWithoutStoringErrorCode
+%else
+	push	Int13h_ReturnFromHandlerWithoutStoringErrorCode
+	jmp		Int13h_SetErrorCodeToIntpackInSSBPfromAH
+%endif
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 294)
@@ -24,5 +24,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -51,5 +51,5 @@
 ;	Returns:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, CX, DX
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 294)
@@ -18,5 +18,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 AH24h_HandlerForSetMultipleBlocks:
@@ -38,5 +38,5 @@
 ;	Returns:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, CX, DX
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 294)
@@ -18,5 +18,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -40,5 +40,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, CX, DX
@@ -53,5 +53,5 @@
 	call	AccessDPT_GetDriveSelectByteToAL
 	mov		bh, al
-	eMOVZX	ax, BYTE [di+DPT.bIdevarsOffset]
+	eMOVZX	ax, [di+DPT.bIdevarsOffset]
 	xchg	bp, ax
 	call	Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 294)
@@ -20,10 +20,10 @@
 ;				Bits 5...0:	Starting sector number (1...63)
 ;		DH:		Starting head number (0...255)
-;		ES:BX:	Pointer to buffer recieving data
+;		ES:BX:	Pointer to buffer receiving data
 ;	Returns with INTPACK:
 ;		AH:		Int 13h/40h floppy return status
 ;		AL:		Burst error length if AH returns 11h (we never return error code 11h)
 ;				Number of sectors actually read (only valid if CF set for someBIOSes)
-;		CF:		0 if successfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 294)
@@ -24,5 +24,5 @@
 ;		AH:		Int 13h/40h floppy return status
 ;		AL:		Number of sectors actually written (only valid if CF set for someBIOSes)
-;		CF:		0 if successfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 294)
@@ -23,5 +23,5 @@
 ;		AH:		Int 13h/40h floppy return status
 ;		AL:		Number of sectors actually verified (only valid if CF set for someBIOSes)
-;		CF:		0 if successfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 294)
@@ -22,5 +22,5 @@
 ;       ES:DI:  Floppy DPT (for floppies only)
 ;		AH:		Int 13h/40h floppy return status
-;		CF:		0 if successfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 AH8h_HandlerForReadDiskDriveParameters:
@@ -31,6 +31,6 @@
 	jnc		SHORT .MidGame
 	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
-		
-.OurDrive:		
+
+.OurDrive:
 	call	AH8h_GetDriveParameters
 
@@ -41,21 +41,21 @@
 %endif
 	;; fall-through
-		
-.MidGame:		
+
+.MidGame:
 	call	RamVars_GetCountOfKnownDrivesToAX		; assume hard disk for now, will discard if for floppies
 
 	test	byte [bp+IDEPACK.intpack+INTPACK.dl], 080h
 	jnz		.Done
-		
+
 	mov		[bp+IDEPACK.intpack+INTPACK.bl], bl
 
 	mov		[bp+IDEPACK.intpack+INTPACK.es], es
-	mov		[bp+IDEPACK.intpack+INTPACK.di], di		
+	mov		[bp+IDEPACK.intpack+INTPACK.di], di
 
 	call	FloppyDrive_GetCountToAX
 
-.Done:	
+.Done:
 	mov		ah, dh
-		
+
 	mov		[bp+IDEPACK.intpack+INTPACK.cx], cx
 	xchg	[bp+IDEPACK.intpack+INTPACK.dx], ax		; recover DL for BDA last status byte determination
@@ -63,5 +63,5 @@
 	xor		ah, ah
 %ifdef MODULE_SERIAL_FLOPPY
-	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber			
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH_ALHasDriveNumber
 %else
 	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
@@ -118,5 +118,5 @@
 	eSHR_IM	bl,FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION
 %endif
-%endif		
+%endif
 	ret
 
@@ -127,5 +127,5 @@
 ; So we return fixed values out of the ROM for callers who might be expecting this information.
 ;
-; On AT systems, we return the information for a 1.44 MB disk, 
+; On AT systems, we return the information for a 1.44 MB disk,
 ; and on XT systems, we return the information for a 360 KB disk.
 ;
@@ -138,6 +138,6 @@
 
 	db		1h << 1 | 0				; Offset 1: Typical values of 1 for head load time
-									;           DMA used (although it actually is not, but is more restrctive)
-	db		25h						; Offset 2: Inactiviy motor turn-off delay, 
+									;           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
 	db		02h						; Offset 3: Sector size, always 512
@@ -161,5 +161,5 @@
 	db		0f6h					; Offset 8: Fill byte for format
 	db		0fh						; Offset 9: Head setting time
-	db		08h						; Offset A: Wait for motor startpu time
+	db		08h						; Offset A: Wait for motor startup time
 
 %ifdef USE_AT
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 294)
@@ -15,5 +15,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 AH9h_HandlerForInitializeDriveParameters:
@@ -36,5 +36,5 @@
 ;	Returns:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, DX
@@ -45,13 +45,13 @@
 
 %ifdef MODULE_SERIAL
-	; 
-	; no need to do this for serial deveices, and we use the DPT_RESET flag bits
+	;
+	; no need to do this for serial devices, and we use the DPT_RESET flag bits
 	; to store the drive type for serial floppy drives (MODULE_SERIAL_FLOPPY)
 	;
 	xor		ah, ah
 	test	byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE	; Clears CF
-	jnz		.ReturnNotSuccessfull
+	jnz		.ReturnNotSuccessful
 %endif
-		
+
 	; Try to select drive and wait until ready
 	or		BYTE [di+DPT.bFlagsHigh], MASKH_DPT_RESET		; Everything uninitialized
@@ -59,5 +59,5 @@
 	mov		[bp+IDEPACK.bDrvAndHead], al
 	call	Device_SelectDrive
-	jc		SHORT .ReturnNotSuccessfull
+	jc		SHORT .ReturnNotSuccessful
 	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nDRDY	; Clear since success
 
@@ -80,8 +80,8 @@
 .InitializeBlockMode:
 	call	InitializeBlockMode
-	jc		SHORT .ReturnNotSuccessfull
+	jc		SHORT .ReturnNotSuccessful
 	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nSETBLOCK	; Keeps CF clear
 
-.ReturnNotSuccessfull:
+.ReturnNotSuccessful:
 	pop		cx
 	pop		si
@@ -96,5 +96,5 @@
 ;	Returns:
 ;		AH:		BIOS Error code
-;		CF:		Cleared if succesfull
+;		CF:		Cleared if successful
 ;				Set if any error
 ;	Corrupts registers:
@@ -121,5 +121,5 @@
 ;	Returns:
 ;		AH:		BIOS Error code
-;		CF:		Cleared if succesfull
+;		CF:		Cleared if successful
 ;				Set if any error
 ;	Corrupts registers:
@@ -146,5 +146,5 @@
 ;	Returns:
 ;		AH:		BIOS Error code
-;		CF:		Cleared if succesfull
+;		CF:		Cleared if successful
 ;				Set if any error
 ;	Corrupts registers:
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm	(revision 294)
@@ -21,5 +21,5 @@
 ;	Returns with INTPACK:
 ;		AH:		BIOS Error code
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -44,5 +44,5 @@
 ;	Returns:
 ;		AH:		BIOS Error code
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, BX, CX, DX
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm	(revision 294)
@@ -15,5 +15,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -37,5 +37,5 @@
 ;	Returns:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Corrupts registers:
 ;		AL, SI
@@ -53,7 +53,7 @@
 
 	; Initialize Master and Slave drives
-	mov		al, [di+DPT.bIdevarsOffset]			; pointer to controller we are looking to reset
-	mov		ah, 0								; initialize error code, assume success
-		
+	eMOVZX	ax, [di+DPT.bIdevarsOffset]			; (AL) pointer to controller we are looking to reset
+												; (AH) initialize error code, assume success
+
 	mov		si, IterateAndResetDrives
 	call	FindDPT_IterateAllDPTs
@@ -70,5 +70,5 @@
 ; IterateAndResetDrives: Iteration routine for use with IterateAllDPTs.
 ;
-; When a drive on the controller is found, it is reset, and the error code 
+; When a drive on the controller is found, it is reset, and the error code
 ; merged into overall error code for this controller.  Master will be reset
 ; first.  Note that the iteration will go until the end of the DPT list.
@@ -79,5 +79,5 @@
 	push	ax
 	call	AH9h_InitializeDriveForUse			; Reset Master and Slave (Master will come first in DPT list)
-	pop		ax		
+	pop		ax
 	jnc		.done
 	or		ah, (RET_HD_RESETFAIL << 1) | 1		; OR in Reset Failed error code and CF, will SHR into position later
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 294)
@@ -19,5 +19,5 @@
 ;		BX:		AA55h
 ;		CX:		Support bits
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 294)
@@ -18,5 +18,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Return with Disk Address Packet in INTPACK:
 ;		.wSectorCount	Number of sectors read successfully
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm	(revision 294)
@@ -20,5 +20,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Return with Disk Address Packet in INTPACK:
 ;		.wSectorCount	Number of sectors written successfully
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm	(revision 294)
@@ -18,5 +18,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;	Return with Disk Address Packet in INTPACK:
 ;		.wSectorCount	Number of sectors verified successfully
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm	(revision 294)
@@ -18,5 +18,5 @@
 ;	Returns with INTPACK:
 ;		AH:		Int 13h return status
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 294)
@@ -19,5 +19,5 @@
 ;		AH:		Int 13h return status
 ;		DS:SI:	Ptr to Extended Drive Information Table
-;		CF:		0 if succesfull, 1 if error
+;		CF:		0 if successful, 1 if error
 ;--------------------------------------------------------------------
 AH48h_HandlerForGetExtendedDriveParameters:
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 294)
@@ -128,9 +128,13 @@
 ConvertLCHStoLBARegisterValues:
 	; cylToSeek*headsPerCyl (18-bit result)
-	mov		ax, cx					; Copy Cylinder number to AX
-	; We could save a byte here by using CWD instead of the XOR DH, DH in eMOVZX
-	; but I'm not sure how that would affect speed.
+	mov		ax, LBA_ASSIST_SPT		; Load Sectors per Track
+	xchg	cx, ax					; Cylinder number to AX, Sectors per Track to CX
 
-	eMOVZX	dx, BYTE [di+DPT.bLbaHeads]
+%ifdef USE_386
+	movzx	dx, [di+DPT.bLbaHeads]
+%else
+	cwd
+	mov		dl, [di+DPT.bLbaHeads]
+%endif
 	mul		dx						; DX:AX = cylToSeek*headsPerCyl
 
@@ -141,5 +145,4 @@
 
 	; *=sectPerTrack (18-bit by 6-bit multiplication with 24-bit result)
-	mov		cx, LBA_ASSIST_SPT		; Load Sectors per Track
 	xchg	ax, dx					; Hiword to AX, loword to DX
 	mul		cl						; AX = hiword * Sectors per Track
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm	(revision 285)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm	(revision 294)
@@ -34,21 +34,10 @@
 	cmp		ax, BYTE 127
 	ja		SHORT InvalidNumberOfSectorsRequested
-	; Fall to GetEbiosCommandIndexToBX
 
-;--------------------------------------------------------------------
-; GetEbiosCommandIndexToBX
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		ES:SI:	Ptr to DAP (Disk Address Packet)
-;	Returns:
-;		BX:		Index to command lookup table
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-GetEbiosCommandIndexToBX:
+	; Get EBIOS command index to BX
 	; LBA28 or LBA48 command
-	xor		dx, dx
+	cwd
 	mov		al, [es:si+DAP.qwLBA+3]	; Load LBA48 byte 3 (bits 24...31)
-	and		ax, 00F0h				; Clear LBA28 bits 24...27
+	and		al, 0F0h				; Clear LBA28 bits 24...27
 	or		ax, [es:si+DAP.qwLBA+4]	; Set bits from LBA bytes 4 and 5
 	cmp		dx, ax					; Set CF if any of bits 28...47 set
