Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 411)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 412)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;		
+;
 
 ; Section containing code
@@ -42,6 +42,6 @@
 	jmp		SHORT OutputToJrIdeRegister
 .OutputToIoMappedIde:
-%endif
-%endif
+%endif	; MODULE_JRIDE
+%endif	; MODULE_8BIT_IDE
 
 	mov		bl, IDEVARS.wPortCtrl
@@ -68,5 +68,9 @@
 	jnz		SHORT OutputALtoIOmappedIdeRegisterInDL
 
+%if JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET & 0FFh = 0
+	mov		dh, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET >> 8
+%else
 	add		dx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
+%endif
 OutputToJrIdeRegister:
 	mov		bx, dx
@@ -75,6 +79,6 @@
 ALIGN JUMP_ALIGN
 OutputALtoIOmappedIdeRegisterInDL:
-%endif
-%endif
+%endif	; MODULE_JRIDE
+%endif	; MODULE_8BIT_IDE
 
 	mov		bl, IDEVARS.wPort
@@ -116,11 +120,15 @@
 	jnz		SHORT .InputToALfromIOmappedIdeRegisterInDL
 
+%if JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET & 0FFh = 0
+	mov		dh, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET >> 8
+%else
 	add		dx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET
+%endif
 	mov		bx, dx
 	mov		al, [cs:bx]
 	ret
 .InputToALfromIOmappedIdeRegisterInDL:
-%endif
-%endif
+%endif	; MODULE_JRIDE
+%endif	; MODULE_8BIT_IDE
 	mov		bl, IDEVARS.wPort
 	call	GetIdePortToDX
@@ -172,7 +180,7 @@
 %else	; Only standard IDE devices
 	xor		bh, bh
+	add		bl, [di+DPT.bIdevarsOffset]			; CS:BX now points port address
 	xor		dh, dh
-	add		bl, [di+DPT.bIdevarsOffset]		; CS:BX now points port address
-	add		dx, [cs:bx]						; DX now has port address
+	add		dx, [cs:bx]							; DX now has port address
 	ret
 %endif
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm	(revision 411)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm	(revision 412)
@@ -3,5 +3,5 @@
 
 ;
-; XTIDE Universal BIOS and Associated Tools 
+; XTIDE Universal BIOS and Associated Tools
 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
 ;
@@ -10,11 +10,11 @@
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.		
+; GNU General Public License for more details.
 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-;				
+;
 
 ; Structure containing variables for PIO transfer functions.
@@ -93,9 +93,9 @@
 
 	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
-
-ALIGN JUMP_ALIGN
-.ReadNextBlockFromDrive:
 	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
 	jbe		SHORT .ReadLastBlockFromDrive
+
+ALIGN JUMP_ALIGN
+.ReadNextBlockFromDrive:
 	call	ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
 	call	WaitUntilReadyToTransferNextBlock
@@ -104,7 +104,7 @@
 	; Increment number of successfully read sectors
 	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
+	add		[bp+MEMPIOVARS.bSectorsDone], cl
 	sub		[bp+MEMPIOVARS.bSectorsLeft], cl
-	add		[bp+MEMPIOVARS.bSectorsDone], cl
-	jmp		SHORT .ReadNextBlockFromDrive
+	ja		SHORT .ReadNextBlockFromDrive
 
 ALIGN JUMP_ALIGN
@@ -123,5 +123,5 @@
 	lds		di, [bp+MEMPIOVARS.fpDPT]			; DPT now in DS:DI
 %ifdef USE_386
-	movzx	cx, BYTE [bp+MEMPIOVARS.bSectorsDone]
+	movzx	cx, [bp+MEMPIOVARS.bSectorsDone]
 %else
 	mov		ch, 0
@@ -158,9 +158,9 @@
 
 	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
-
-ALIGN JUMP_ALIGN
-.WriteNextBlockToDrive:
 	cmp		[bp+MEMPIOVARS.bSectorsLeft], cl
 	jbe		SHORT .WriteLastBlockToDrive
+
+ALIGN JUMP_ALIGN
+.WriteNextBlockToDrive:
 	call	WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
 	call	WaitUntilReadyToTransferNextBlock
@@ -169,7 +169,7 @@
 	; Increment number of successfully written WORDs
 	mov		cx, [bp+MEMPIOVARS.wSectorsInBlock]
+	add		[bp+MEMPIOVARS.bSectorsDone], cl
 	sub		[bp+MEMPIOVARS.bSectorsLeft], cl
-	add		[bp+MEMPIOVARS.bSectorsDone], cl
-	jmp		SHORT .WriteNextBlockToDrive
+	ja		SHORT .WriteNextBlockToDrive
 
 ALIGN JUMP_ALIGN
@@ -255,4 +255,4 @@
 
 %if JRIDE_SECTOR_ACCESS_WINDOW_SIZE <> 512
-	%error "JRIDE_SECTOR_ACCESS_WINDOW_SIZE is no longer equal to 512. MemIdeTransfer.asm needs changes."
+	%error "JRIDE_SECTOR_ACCESS_WINDOW_SIZE is no longer equal to 512. JrIdeTransfer.asm needs changes."
 %endif
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Bootmenu_SwapDrives.txt
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/Bootmenu_SwapDrives.txt	(revision 411)
+++ 	(revision )
@@ -1,1 +1,0 @@
-Some old operating systems (DOS) can only boot from Floppy Drive A (00h) or first Hard Disk (80h, usually drive C). Drive Translation can be used to modify drive numbers so that selected drive will be mapped to 00h or 80h so that it can be booted.
