Index: trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 218)
@@ -41,5 +41,6 @@
 	.bSize					resb	1	; 0, Size of this packet in bytes
 	.bReservedAt1			resb	1	; 1, Currently unused, must be zero
-	.wSectorCount			resb	2	; 2, Number of sectors to process (1...127)
+	.bSectorCount			resb	1	; 2, Number of sectors to process (0...127)
+	.bReservedAt3			resb	1	; 3, Currently unused, must be zero
 	.dwMemoryAddress:
 	.wOffset				resb	2	; 4, Memory offset for transfer
Index: trunk/XTIDE_Universal_BIOS/Inc/Int13h.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/Int13h.inc	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Inc/Int13h.inc	(revision 218)
@@ -45,6 +45,4 @@
 
 
-MAX_SUPPORTED_BLOCK_SIZE_IN_SECTORS		EQU		64
-
 %define TIMEOUT_AND_STATUS_TO_WAIT(timeout, status)		(((timeout)<<8) | (status))
 
Index: trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 218)
@@ -61,10 +61,8 @@
 	.bCommand				resb	1
 	.bDeviceControl			resb	1	; Offset 7 shared with PIOVARS
+							resb	1
 
 	; Parameters for 48-bit LBA
-	.wSectorCountHighAndLbaLowExt:
-	.bSectorCountHighExt	resb	1
 	.bLbaLowExt				resb	1	; LBA48 31...24
-
 	.wLbaMiddleAndHighExt:
 	.bLbaMiddleExt			resb	1	; LBA48 39...32
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm	(revision 218)
@@ -54,5 +54,5 @@
 ;		BH:		Drive Select byte for Drive and Head Select Register
 ;		DS:		Segment to RAMVARS
-;		ES:SI:	Ptr to buffer to receive 512-byte IDE Information
+;		ES:SI:	Ptr to normalized buffer to receive 512-byte IDE Information
 ;		CS:BP:	Ptr to IDEVARS
 ;	Returns:
@@ -80,5 +80,5 @@
 ;		BH:		Default system timer ticks for timeout (can be ignored)
 ;		BL:		IDE Status Register bit to poll after command
-;		ES:SI:	Ptr to buffer (for data transfer commands)
+;		ES:SI:	Ptr to normalized buffer (for data transfer commands)
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
 ;		SS:BP:	Ptr to IDEPACK
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 218)
@@ -128,5 +128,5 @@
 
 	; Output Sector Address High (only used by LBA48)
-	mov		ax, [bp+IDEPACK.wSectorCountHighAndLbaLowExt]
+	eMOVZX	ax, BYTE [bp+IDEPACK.bLbaLowExt]
 	mov		cx, [bp+IDEPACK.wLbaMiddleAndHighExt]
 	call	OutputSectorCountAndAddress
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 218)
@@ -5,10 +5,11 @@
 ; This struct must not be larger than IDEPACK without INTPACK.
 struc PIOVARS
-	.wBlocksLeft			resb	2
-	.wBlockSize				resb	2	; Block size in WORDs (256...32768)
-	.wDataPort				resb	2
-	.bSectorsInLastBlock:	resb	1
-							resb	1	; Offset 7 = IDEPACK.bDeviceControl
-	.fnXfer					resb	2	; Offset to transfer function
+	.wWordsInBlock			resb	2	; 0, Block size in WORDs
+	.wWordsLeft				resb	2	; 2, WORDs left to transfer
+	.wWordsDone				resb	2	; 4, Number of sectors xferred
+							resb	1	; 6, 
+							resb	1	; 7, IDEPACK.bDeviceControl
+	.wDataPort				resb	2	; 8, IDE Data Port
+	.fnXfer					resb	2	; 10, Offset to transfer function
 endstruc
 
@@ -22,16 +23,17 @@
 ;		AL:		IDE command that was used to start the transfer
 ;				(all PIO read and write commands including Identify Device)
-;		ES:SI:	Ptr to destination buffer or source data
+;		ES:SI:	Ptr to normalized data buffer
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
 ;		SS:BP:	Ptr to IDEPACK
 ;	Returns:
 ;		AH:		INT 13h Error Code
+;		CX:		Number of successfully transferred sectors
 ;		CF:		Cleared if success, Set if error
 ;	Corrupts registers:
-;		AL, BX, CX, DX, SI, ES
+;		AL, BX, DX, SI, ES
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
 IdeTransfer_StartWithCommandInAL:
-	mov		ah, [bp+IDEPACK.bSectorCountHighExt]
+	mov		ah, [bp+IDEPACK.bSectorCount]
 
 	; Are we reading or writing?
@@ -43,8 +45,6 @@
 	; Prepare to read data to ESSI
 	mov		bx, g_rgfnPioRead
-	mov		al, [bp+IDEPACK.bSectorCount]
-	call	InitializePiovarsInSSBPwithSectorCountInAX
+	call	InitializePiovarsInSSBPwithSectorCountInAH
 	xchg	si, di
-	call	Registers_NormalizeESDI
 	jmp		SHORT ReadFromDrive
 
@@ -52,7 +52,5 @@
 .PrepareToWriteDataFromESSI:
 	mov		bx, g_rgfnPioWrite
-	mov		al, [bp+IDEPACK.bSectorCount]
-	call	InitializePiovarsInSSBPwithSectorCountInAX
-	call	Registers_NormalizeESSI
+	call	InitializePiovarsInSSBPwithSectorCountInAH
 	; Fall to WriteToDrive
 
@@ -66,8 +64,9 @@
 ;	Returns:
 ;		AH:		BIOS Error code
+;		CX:		Number of successfully transferred sectors
 ;		CF:		0 if transfer succesfull
 ;				1 if any error
 ;	Corrupts registers:
-;		AL, BX, CX, DX, SI, ES
+;		AL, BX, DX, SI, ES
 ;--------------------------------------------------------------------
 WriteToDrive:
@@ -75,44 +74,33 @@
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
 	call	IdeWait_PollStatusFlagInBLwithTimeoutInBH
-	jc		SHORT .ReturnWithTransferErrorInAH
-ALIGN JUMP_ALIGN
-.WriteNextBlock:
+	jc		SHORT ReturnWithTransferErrorInAH
+
+ALIGN JUMP_ALIGN
+.WriteNextBlockToDrive:
+	mov		cx, [bp+PIOVARS.wWordsInBlock]
 	mov		dx, [bp+PIOVARS.wDataPort]
-	dec		WORD [bp+PIOVARS.wBlocksLeft]		; Transferring last (possibly partial) block?
-	jz		SHORT .XferLastBlock				;  If so, jump to transfer
-	mov		cx, [bp+PIOVARS.wBlockSize]			; Load block size in WORDs
-	call	[bp+PIOVARS.fnXfer]					; Transfer full block
-
-	; Normalize pointer when necessary
-	mov		ax, si
-	shr		ax, 1								; WORD offset
-	add		ax, [bp+PIOVARS.wBlockSize]
-	jns		SHORT .WaitUntilReadyToTransferNextBlock
-	call	Registers_NormalizeESSI
-
-ALIGN JUMP_ALIGN
-.WaitUntilReadyToTransferNextBlock:
-%ifdef USE_186
-	push	.WriteNextBlock
-	jmp		IdeWait_IRQorDRQ
-%else
-	call	IdeWait_IRQorDRQ
-	jnc		SHORT .WriteNextBlock
-%endif
-.ReturnWithTransferErrorInAH:
-	ret
-
-ALIGN JUMP_ALIGN
-.XferLastBlock:
-	xor		cx, cx
+	cmp		[bp+PIOVARS.wWordsLeft], cx
+	jbe		SHORT .WriteLastBlockToDrive
+	call	[bp+PIOVARS.fnXfer]
+
+	; Wait until ready for next block and check for errors
+	call	IdeWait_IRQorDRQ					; Wait until ready to transfer
+	jc		SHORT ReturnWithTransferErrorInAH
+
+	; Increment number of successfully written WORDs
+	mov		ax, [bp+PIOVARS.wWordsInBlock]
+	sub		[bp+PIOVARS.wWordsLeft], ax
+	add		[bp+PIOVARS.wWordsDone], ax
+	jmp		SHORT .WriteNextBlockToDrive
+
+ALIGN JUMP_ALIGN
+.WriteLastBlockToDrive:
+	mov		cx, [bp+PIOVARS.wWordsLeft]
+	call	[bp+PIOVARS.fnXfer]					; Transfer possibly partial block
+
+	; Check for errors in last block
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
-	mov		ch, [bp+PIOVARS.bSectorsInLastBlock]; CX = Partial block size in WORDs
-%ifdef USE_186
-	push	IdeWait_IRQorStatusFlagInBLwithTimeoutInBH
-	jmp		[bp+PIOVARS.fnXfer]
-%else
-	call	[bp+PIOVARS.fnXfer]					; Transfer possibly partial block
-	jmp		IdeWait_IRQorStatusFlagInBLwithTimeoutInBH	; Check for errors
-%endif
+	call	IdeWait_PollStatusFlagInBLwithTimeoutInBH
+	jmp		SHORT ReturnWithTransferErrorInAH
 
 
@@ -126,8 +114,9 @@
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
 ;		AH:		BIOS Error code
+;		CX:		Number of successfully transferred sectors
 ;		CF:		0 if transfer succesfull
 ;				1 if any error
 ;	Corrupts registers:
-;		AL, BX, CX, DX, SI, ES
+;		AL, BX, DX, SI, ES
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -136,42 +125,51 @@
 	xchg	di, si								; DS:DI now points DPT
 	call	IdeWait_IRQorDRQ					; Wait until ready to transfer
-	jc		SHORT WriteToDrive.ReturnWithTransferErrorInAH
+	jc		SHORT ReturnWithTransferErrorInAH
 	xchg	si, di								; ES:DI now points buffer
 
-	; Transfer full or last (possible partial) block
+ALIGN JUMP_ALIGN
+.ReadNextBlockFromDrive:
+	mov		cx, [bp+PIOVARS.wWordsInBlock]
 	mov		dx, [bp+PIOVARS.wDataPort]
-	dec		WORD [bp+PIOVARS.wBlocksLeft]
-	jz		SHORT .XferLastBlock
-	mov		cx, [bp+PIOVARS.wBlockSize]			; Load block size in WORDs
-	call	[bp+PIOVARS.fnXfer]					; Transfer full block
-
-	; Normalize pointer when necessary
-	mov		ax, di
-	shr		ax, 1								; WORD offset
-	add		ax, [bp+PIOVARS.wBlockSize]
-	jns		SHORT ReadFromDrive
-%ifdef USE_186
-	push	ReadFromDrive
-	jmp		Registers_NormalizeESDI
-%else
-	call	Registers_NormalizeESDI
-	jmp		SHORT ReadFromDrive					; Loop while blocks left
-%endif
-
-
-ALIGN JUMP_ALIGN
-.XferLastBlock:
-	xor		cx, cx
-	mov		ch, [bp+PIOVARS.bSectorsInLastBlock]; CX = Partial block size in WORDs
+	cmp		[bp+PIOVARS.wWordsLeft], cx
+	jbe		SHORT .ReadLastBlockFromDrive
+	call	[bp+PIOVARS.fnXfer]
+
+	; Wait until ready for next block and check for errors
+	xchg	di, si								; DS:DI now points DPT
+	call	IdeWait_IRQorDRQ					; Wait until ready to transfer
+	jc		SHORT ReturnWithTransferErrorInAH
+	xchg	si, di								; ES:DI now points buffer
+
+	; Increment number of successfully read WORDs
+	mov		ax, [bp+PIOVARS.wWordsInBlock]
+	sub		[bp+PIOVARS.wWordsLeft], ax
+	add		[bp+PIOVARS.wWordsDone], ax
+	jmp		SHORT .ReadNextBlockFromDrive
+
+ALIGN JUMP_ALIGN
+.ReadLastBlockFromDrive:
+	mov		cx, [bp+PIOVARS.wWordsLeft]
 	call	[bp+PIOVARS.fnXfer]					; Transfer possibly partial block
+
+	; Check for errors in last block
 	mov		di, si								; DS:DI now points DPT
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
-	jmp		IdeWait_PollStatusFlagInBLwithTimeoutInBH
-
-
-;--------------------------------------------------------------------
-; InitializePiovarsInSSBPwithSectorCountInAX
-;	Parameters:
-;		AX:		Number of sectors to transfer (1...65535)
+	call	IdeWait_PollStatusFlagInBLwithTimeoutInBH
+
+	; Return number of successfully read sectors
+ReturnWithTransferErrorInAH:
+	mov		cx, [bp+PIOVARS.wWordsDone]
+	jc		SHORT .ConvertTransferredWordsInCXtoSectors
+	add		cx, [bp+PIOVARS.wWordsLeft]			; Never sets CF
+.ConvertTransferredWordsInCXtoSectors:
+	xchg	cl, ch
+	ret
+
+
+;--------------------------------------------------------------------
+; InitializePiovarsInSSBPwithSectorCountInAH
+;	Parameters:
+;		AH:		Number of sectors to transfer (1...128)
 ;		BX:		Offset to transfer function lookup table
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
@@ -183,21 +181,12 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-InitializePiovarsInSSBPwithSectorCountInAX:
-	; Store number of blocks to transfer
-	eMOVZX	cx, BYTE [di+DPT_ATA.bSetBlock]		; Block size in sectors
-	xor		dx, dx		; DX:AX = Sectors to transfer (1...65535)
-	div		cx			; AX = Full blocks to transfer
-	test	dx, dx
-	mov		dh, cl		; DH = Full block size if no partial blocks to transfer
-	jz		SHORT .NoPartialBlocksToTransfer
-	inc		ax			; Partial block
-	mov		dh, dl		; DH = Size of partial block in sectors
-.NoPartialBlocksToTransfer:
-	mov		[bp+PIOVARS.wBlocksLeft], ax
-	mov		[bp+PIOVARS.bSectorsInLastBlock], dh
-
-	; Store block size in WORDs
-	xchg	ch, cl		; CX = Block size in WORDs
-	mov		[bp+PIOVARS.wBlockSize], cx
+InitializePiovarsInSSBPwithSectorCountInAH:
+	; Store sizes
+	xor		al, al
+	mov		[bp+PIOVARS.wWordsLeft], ax
+	cbw
+	mov		[bp+PIOVARS.wWordsDone], ax			; Zero
+	mov		ah, [di+DPT_ATA.bSetBlock]
+	mov		[bp+PIOVARS.wWordsInBlock], ax
 
 	; Get transfer function based on bus type
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 218)
@@ -40,7 +40,6 @@
 Idepack_ConvertDapToIdepackAndIssueCommandFromAH:
 	mov		[bp+IDEPACK.bCommand], ah
-	mov		ax, [es:si+DAP.wSectorCount]
+	mov		al, [es:si+DAP.bSectorCount]
 	mov		[bp+IDEPACK.bSectorCount], al
-	mov		[bp+IDEPACK.bSectorCountHighExt], ah
 
 	mov		al, [es:si+DAP.qwLBA]		; LBA byte 0
@@ -66,5 +65,5 @@
 ;	Parameters:
 ;		AH:		IDE command to issue
-;		AL:		Number of sectors to transfer (1...255, 0=256)
+;		AL:		Number of sectors to transfer
 ;		BH:		Timeout ticks
 ;		BL:		IDE Status Register flag to wait after command
@@ -73,7 +72,8 @@
 ;				Bits 5...0:	Starting sector number (1...63)
 ;		DH:		Starting head number (0...255)
-;		ES:SI:	Ptr to data buffer
 ;		DS:DI:	Ptr to DPT (in RAMVARS segment)
-;		SS:BP:	Ptr to IDEPACK
+;		SS:BP:	Ptr to IDEPACK (containing INTPACK)
+;	Parameters on INTPACK:
+;		ES:BX:	Ptr to data buffer
 ;	Returns:
 ;		AH:		INT 13h Error Code
@@ -84,15 +84,9 @@
 ALIGN JUMP_ALIGN
 Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH:
+	mov		[bp+IDEPACK.bSectorCount], al
 	mov		[bp+IDEPACK.bCommand], ah
 
-	xor		ah, ah
-	cmp		ah, al
-	cmc
-	adc		ah, ah
-
-	mov		[bp+IDEPACK.bSectorCount], al
-	mov		[bp+IDEPACK.bSectorCountHighExt], ah
-
 	push	bx
+	call	PrepareBuffer_ToESSIforOldInt13hTransfer
 	call	Address_OldInt13hAddressToIdeAddress
 	call	AccessDPT_GetDriveSelectByteToAL
@@ -135,5 +129,4 @@
 	mov		[bp+IDEPACK.wSectorCountAndLbaLow], dx
 	mov		[bp+IDEPACK.wLbaMiddleAndHigh], cx
-	mov		BYTE [bp+IDEPACK.bSectorCountHighExt], 0
 
 	; Drive and Head select byte
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 218)
@@ -53,5 +53,4 @@
 ;ALIGN JUMP_ALIGN
 AH24h_SetBlockSize:
-	MIN_U	al, MAX_SUPPORTED_BLOCK_SIZE_IN_SECTORS
 	push	ax
 	xchg	dx, ax			; DL = Block size (Sector Count Register)
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 218)
@@ -31,5 +31,4 @@
 	mov		ah, [cs:bx+g_rgbReadCommandLookup]
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
-	mov		si, [bp+IDEPACK.intpack+INTPACK.bx]
 %ifdef USE_186
 	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 218)
@@ -55,5 +55,5 @@
 	cmp		BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE
 	jb		SHORT AH42h_ReturnWithInvalidFunctionError
-	cmp		WORD [es:si+DAP.wSectorCount], BYTE 0
+	cmp		WORD [es:si+DAP.bSectorCount], BYTE 0
 	je		SHORT AH42h_ReturnWithInvalidFunctionError
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/PrepareBuffer.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/PrepareBuffer.asm	(revision 218)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/PrepareBuffer.asm	(revision 218)
@@ -0,0 +1,49 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Functions for preparing data buffer for transfer.
+
+; Section containing code
+SECTION .text
+
+;---------------------------------------------------------------------
+; PrepareBuffer_ToESSIforOldInt13hTransfer
+;	Parameters:
+;		AL:		Number of sectors to transfer
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		ES:BX:	Ptr to data buffer
+;	Returns:
+;		ES:SI:	Ptr to normalized data buffer
+;		Exits INT 13h if error
+;	Corrupts registers:
+;		BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+PrepareBuffer_ToESSIforOldInt13hTransfer:
+	; Normalize buffer pointer
+	mov		bx, [bp+IDEPACK.intpack+INTPACK.bx]	; Load offset
+	mov		si, bx
+	eSHR_IM	bx, 4								; Divide offset by 16
+	add		bx, [bp+IDEPACK.intpack+INTPACK.es]
+	mov		es, bx								; Segment normalized
+	and		si, BYTE 0Fh						; Offset normalized
+
+	; Check if valid number of sectors
+	test	al, al
+	js		SHORT .CheckZeroOffsetFor128Sectors
+	jz		SHORT .InvalidNumberOfSectorsRequested
+	ret		; Continue with transfer
+
+ALIGN JUMP_ALIGN
+.CheckZeroOffsetFor128Sectors:
+	cmp		al, 128
+	ja		SHORT .InvalidNumberOfSectorsRequested
+	mov		ah, RET_HD_BOUNDARY
+	test	si, si								; Offset must be zero to xfer 128 sectors
+	jnz		SHORT .CannotAlignPointerProperly
+	ret		; Continue with transfer
+
+.InvalidNumberOfSectorsRequested:
+	mov		ah, RET_HD_INVALID
+.CannotAlignPointerProperly:
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 217)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 218)
@@ -210,4 +210,5 @@
 	%include "Address.asm"			; For sector address translations
 	%include "CommandLookup.asm"	; For getting correct transfer command
+	%include "PrepareBuffer.asm"	; For buffer pointer normalization
 	%include "Int13h.asm"			; For Int 13h, Disk functions
 	%include "AH0h_HReset.asm"		; Required by Int13h_Jump.asm
