Index: trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 165)
@@ -45,6 +45,6 @@
 ; Bit definitions for DPT.bFlagsHigh
 FLGH_DPT_REVERSED_A0_AND_A3		EQU	(1<<0)	; XTIDE mod, Address lines 0 and 3 reversed
-FLGH_DPT_SERIAL_DEVICE			EQU	(1<<1)	; Serial Port Device
-FLGH_DPT_BLOCK_MODE_SUPPORTED	EQU	(1<<2)	; Use block transfer commands
+FLGH_DPT_BLOCK_MODE_SUPPORTED	EQU	(1<<1)	; Use block transfer commands (must be bit 1!)
+FLGH_DPT_SERIAL_DEVICE			EQU	(1<<2)	; Serial Port Device
 FLGH_DPT_INTERRUPT_IN_SERVICE	EQU	(1<<3)	; Set when waiting for IRQ
 FLGH_DPT_RESET_nDRDY			EQU	(1<<4)	; Drive ready to accept commands
Index: trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Inc/EBIOS.inc	(revision 165)
@@ -0,0 +1,56 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Equates used in Enhanced INT 13h functions (EBIOS).
+%ifndef EBIOS_INC
+%define EBIOS_INC
+
+; EBIOS specification returned by INT 13h, AH=41h
+EBIOS_VERSION						EQU	21h		; 21h = EDD version 1.1
+
+; Support bits returned by INT 13h, AH=41h
+ENHANCED_DRIVE_ACCESS_SUPPORT		EQU	(1<<0)	; 41h, 42h, 43h 44h, 47h and 48h are available
+DRIVE_LOCKING_AND_EJECTING_SUPPORT	EQU	(1<<1)	; 41h, 45h, 46h, 48h, 49h are available and INT 15h, AH=52h
+ENHANDED_DISK_DRIVE_SUPPORT			EQU	(1<<2)	; 41h, 48h, 4Eh are available (EDD)
+
+
+; Extended Drive Information returned by AH=48h
+struc EDRIVE_INFO
+	.wSize					resb	2	; 0, Size of this buffer, at least 26
+	.wFlags					resb	2	; 2, Information flags
+	.dwCylinders			resb	4	; 4, Total number of addressable cylinders
+	.dwHeads				resb	4	; 8, Total number of addressable heads
+	.dwSectorsPerTrack		resb	4	; 12, Number of sectors per track
+	.qwTotalSectors			resb	8	; 16, Total number of addressable sectors
+	.wSectorSize			resb	2	; 24, Number of bytes per sector
+
+	.fpEDDparams			resb	8	; 26, Optional pointer to Enhanced Disk Drive (EDD) configuration parameters
+endstruc
+
+MINIMUM_EDRIVEINFO_SIZE		EQU		26	; 26 bytes does not include EDD pointer
+
+; Flags for EDRIVE_INFO.wFlags
+FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS				EQU	(1<<0)
+FLG_CHS_INFORMATION_IS_VALID						EQU	(1<<1)
+FLG_REMOVABLE_DRIVE									EQU	(1<<2)
+FLG_WRITE_WITH_VERIFY_SUPPORTED						EQU	(1<<3)
+FLG_CHANGE_LINE_SUPPORT								EQU	(1<<4)	; Removable media only
+FLG_LOCKABLE										EQU	(1<<5)	; Removable media only
+FLG_NO_MEDIA_PRESENT_AND_CHS_SET_TO_MAX				EQU	(1<<6)	; Removable media only
+
+
+; Disk Address Packet for read, write and verify functions
+struc DAP
+	.bSize					resb	1	; 0, Size of this packet in bytes
+	.bReservedAt1			resb	1	; 1, Currently unused, must be zero
+	.wSectorCount:
+	.bSectorCount			resb	1	; 2, Number of sectors to process (1...127)
+	.bReservedAt3			resb	1	; 3, Currently unused, must be zero
+	.dwMemoryAddress:
+	.wOffset				resb	2	; 4, Memory offset for transfer
+	.wSegment				resb	2	; 6, Memory segment for transfer
+	.qwLBA					resb	8	; 8, Starting sector for transfer
+endstruc
+
+MINIMUM_DAP_SIZE			EQU		16
+
+
+%endif ; EBIOS_INC
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootInfo.asm	(revision 165)
@@ -38,5 +38,5 @@
 .StoreSectorCount:
 	push	bx
-	call	AtaID_GetTotalSectorCount		; Get to BX:DX:AX
+	call	AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
 	mov		cx, bx							; Now in CX:DX:AX
 	pop		bx
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 165)
@@ -19,4 +19,43 @@
 	mov		bp, sp
 	jmp		ax
+
+
+;--------------------------------------------------------------------
+; Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+;	Parameters:
+;		AH:		IDE command to issue
+;		BH:		Timeout ticks
+;		BL:		IDE Status Register flag to wait after command
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		ES:SI:	Ptr to DAP (EBIOS Disk Address Packet)
+;		SS:BP:	Ptr to IDEPACK
+;	Returns:
+;		AH:		INT 13h Error Code
+;		CF:		Cleared if success, Set if error
+;	Corrupts registers:
+;		AL, BX, CX, DX, SI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Idepack_ConvertDapToIdepackAndIssueCommandFromAH:
+	mov		[bp+IDEPACK.bCommand], ah
+	mov		ax, [es:si+DAP.wSectorCount]
+	mov		[bp+IDEPACK.bSectorCount], al
+	mov		[bp+IDEPACK.bSectorCountHighExt], ah	; Always zero
+
+	mov		al, [es:si+DAP.qwLBA]		; LBA byte 0
+	mov		[bp+IDEPACK.bLbaLow], al
+	mov		ax, [es:si+DAP.qwLBA+1]		; LBA bytes 1 and 2
+	mov		[bp+IDEPACK.wLbaMiddleAndHigh], ax
+	mov		ah, [es:si+DAP.qwLBA+3]		; LBA byte 3, LBA28 bits 24...27
+	mov		[bp+IDEPACK.bLbaLowExt], ah
+	mov		cx, [es:si+DAP.qwLBA+4]		; LBA bytes 4 and 5
+	mov		[bp+IDEPACK.wLbaMiddleAndHighExt], cx
+
+	and		ah, 0Fh						; Limit bits for LBA28
+	call	AccessDPT_GetDriveSelectByteToAL
+	or		al, ah
+	mov		[bp+IDEPACK.bDrvAndHead], al
+	les		si, [es:si+DAP.dwMemoryAddress]
+	jmp		SHORT GetDeviceControlByteToIdepackAndStartTransfer
 
 
@@ -56,7 +95,8 @@
 	pop		bx
 
+GetDeviceControlByteToIdepackAndStartTransfer:
 	call	AccessDPT_GetDeviceControlByteToAL
 	mov		[bp+IDEPACK.bDeviceControl], al
-	jmp		Device_OutputCommandWithParameters
+	jmp		Device_OutputCommandWithParameters	
 
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 165)
@@ -33,9 +33,22 @@
 
 	; Jump to correct BIOS function
-	cmp		ah, 25h						; Valid BIOS function?
-	ja		SHORT Int13h_UnsupportedFunction
 	eMOVZX	bx, ah
 	shl		bx, 1
+	cmp		ah, 25h						; Possible EBIOS function?
+	ja		SHORT .JumpToEbiosFunction
 	jmp		[cs:bx+g_rgw13hFuncJump]	; Jump to BIOS function
+
+	; Jump to correct EBIOS function
+ALIGN JUMP_ALIGN
+.JumpToEbiosFunction:
+	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE	; Full mode?
+	jz		SHORT Int13h_UnsupportedFunction
+	test	BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA		; LBA supported?
+	jz		SHORT Int13h_UnsupportedFunction
+	cmp		ah, 48h						; Above last valid function?
+	ja		SHORT Int13h_UnsupportedFunction
+	sub		bx, 41h<<1					; BX = Offset to EBIOS jump table
+	jl		SHORT Int13h_UnsupportedFunction
+	jmp		[cs:bx+g_rgwEbiosFunctionJumpTable]
 
 
@@ -227,39 +240,14 @@
 	dw	AH24h_HandlerForSetMultipleBlocks				; 24h, Set Multiple Blocks (PS/1)
 	dw	AH25h_HandlerForGetDriveInformation				; 25h, Get Drive Information (PS/1)
-;	dw	Int13h_UnsupportedFunction						; 26h,
-;	dw	Int13h_UnsupportedFunction						; 27h,
-;	dw	Int13h_UnsupportedFunction						; 28h,
-;	dw	Int13h_UnsupportedFunction						; 29h,
-;	dw	Int13h_UnsupportedFunction						; 2Ah,
-;	dw	Int13h_UnsupportedFunction						; 2Bh,
-;	dw	Int13h_UnsupportedFunction						; 2Ch,
-;	dw	Int13h_UnsupportedFunction						; 2Dh,
-;	dw	Int13h_UnsupportedFunction						; 2Eh,
-;	dw	Int13h_UnsupportedFunction						; 2Fh,
-;	dw	Int13h_UnsupportedFunction						; 30h,
-;	dw	Int13h_UnsupportedFunction						; 31h,
-;	dw	Int13h_UnsupportedFunction						; 32h,
-;	dw	Int13h_UnsupportedFunction						; 33h,
-;	dw	Int13h_UnsupportedFunction						; 34h,
-;	dw	Int13h_UnsupportedFunction						; 35h,
-;	dw	Int13h_UnsupportedFunction						; 36h,
-;	dw	Int13h_UnsupportedFunction						; 37h,
-;	dw	Int13h_UnsupportedFunction						; 38h,
-;	dw	Int13h_UnsupportedFunction						; 39h,
-;	dw	Int13h_UnsupportedFunction						; 3Ah,
-;	dw	Int13h_UnsupportedFunction						; 3Bh,
-;	dw	Int13h_UnsupportedFunction						; 3Ch,
-;	dw	Int13h_UnsupportedFunction						; 3Dh,
-;	dw	Int13h_UnsupportedFunction						; 3Eh,
-;	dw	Int13h_UnsupportedFunction						; 3Fh,
-;	dw	Int13h_UnsupportedFunction						; 40h,
-;	dw	Int13h_UnsupportedFunction						; 41h, Check if Extensions Present (EBIOS)*
-;	dw	Int13h_UnsupportedFunction						; 42h, Extended Read Sectors (EBIOS)*
-;	dw	Int13h_UnsupportedFunction						; 43h, Extended Write Sectors (EBIOS)*
-;	dw	Int13h_UnsupportedFunction						; 44h, Extended Verify Sectors (EBIOS)*
-;	dw	Int13h_UnsupportedFunction						; 45h, Lock and Unlock Drive (EBIOS)***
-;	dw	Int13h_UnsupportedFunction						; 46h, Eject Media Request (EBIOS)***
-;	dw	Int13h_UnsupportedFunction						; 47h, Extended Seek (EBIOS)*
-;	dw	Int13h_UnsupportedFunction						; 48h, Get Extended Drive Parameters (EBIOS)*
+
+g_rgwEbiosFunctionJumpTable:
+	dw	AH41h_HandlerForCheckIfExtensionsPresent		; 41h, Check if Extensions Present (EBIOS)*
+	dw	AH42h_HandlerForExtendedReadSectors				; 42h, Extended Read Sectors (EBIOS)*
+	dw	AH43h_HandlerForExtendedWriteSectors			; 43h, Extended Write Sectors (EBIOS)*
+	dw	AH44h_HandlerForExtendedVerifySectors			; 44h, Extended Verify Sectors (EBIOS)*
+	dw	Int13h_UnsupportedFunction						; 45h, Lock and Unlock Drive (EBIOS)***
+	dw	Int13h_UnsupportedFunction						; 46h, Eject Media Request (EBIOS)***
+	dw	AH47h_HandlerForExtendedSeek					; 47h, Extended Seek (EBIOS)*
+	dw	AH48h_HandlerForGetExtendedDriveParameters		; 48h, Get Extended Drive Parameters (EBIOS)*
 ;	dw	Int13h_UnsupportedFunction						; 49h, Get Extended Disk Change Status (EBIOS)***
 ;	dw	Int13h_UnsupportedFunction						; 4Ah, Initiate Disk Emulation (Bootable CD-ROM)
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm	(revision 165)
@@ -22,7 +22,32 @@
 ALIGN JUMP_ALIGN
 AH25h_HandlerForGetDriveInformation:
+	mov		si, [bp+IDEPACK.intpack+INTPACK.bx]
+%ifdef USE_186
+	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	; Fall to AH25h_GetDriveInformationToBufferInESSIfromDriveInDL
+%else
+	call	AH25h_GetDriveInformationToBufferInESSIfromDriveInDL
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+%endif
+
+
+;--------------------------------------------------------------------
+; AH25h_GetDriveInformationToBufferInESSIfromDriveInDL
+;	Parameters:
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		ES:SI:	Ptr to buffer to receive 512-byte drive information
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		CF:		0 if succesfull, 1 if error
+;	Corrupts registers:
+;		AL, BX, CX, DX
+;--------------------------------------------------------------------
+AH25h_GetDriveInformationToBufferInESSIfromDriveInDL:
+	push	es
 	push	bp
+	push	di
+	push	si
 
-	mov		si, [bp+IDEPACK.intpack+INTPACK.bx]
 	call	AccessDPT_GetDriveSelectByteToAL
 	mov		bh, al
@@ -31,4 +56,7 @@
 	call	Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
 
+	pop		si
+	pop		di
 	pop		bp
-	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	pop		es
+	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 165)
@@ -15,5 +15,5 @@
 ;		SS:BP:	Ptr to IDEPACK
 ;	Parameters on INTPACK:
-;		AL:		Number of sectors to read (1...255)
+;		AL:		Number of sectors to read (1...127)
 ;		CH:		Cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9 and 8
@@ -29,9 +29,9 @@
 AH2h_HandlerForReadDiskSectors:
 	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
-	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+	jle		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
 
-	mov		ah, COMMAND_READ_SECTORS	; Load sector mode command
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
-	eCMOVNZ	ah, COMMAND_READ_MULTIPLE	; Load block mode command
+	xor		bx, bx
+	call	CommandLookup_OrOldInt13hIndexToBL
+	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]
@@ -55,2 +55,3 @@
 	mov		ah, RET_HD_INVALID
 	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 165)
@@ -15,5 +15,5 @@
 ;		SS:BP:	Ptr to IDEREGS_AND_INTPACK
 ;	Parameters on INTPACK:
-;		AL:		Number of sectors to write
+;		AL:		Number of sectors to write (1...127)
 ;		CH:		Cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9 and 8
@@ -28,9 +28,9 @@
 AH3h_HandlerForWriteDiskSectors:
 	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
-	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+	jle		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
 
-	mov		ah, COMMAND_WRITE_SECTORS	; Load sector mode command
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
-	eCMOVNZ	ah, COMMAND_WRITE_MULTIPLE	; Load block mode command
+	xor		bx, bx
+	call	CommandLookup_OrOldInt13hIndexToBL
+	mov		ah, [cs:bx+g_rgbWriteCommandLookup]
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
 	mov		si, [bp+IDEPACK.intpack+INTPACK.bx]
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 165)
@@ -15,5 +15,5 @@
 ;		SS:BP:	Ptr to INTPACK
 ;	Parameters on INTPACK in SS:BP:
-;		AL:		Number of sectors to verify
+;		AL:		Number of sectors to verify (1...127)
 ;		CH:		Cylinder number, bits 7...0
 ;		CL:		Bits 7...6: Cylinder number bits 9 and 8
@@ -27,5 +27,5 @@
 AH4h_HandlerForVerifyDiskSectors:
 	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
-	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+	jle		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
 
 	mov		ah, COMMAND_VERIFY_SECTORS
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm	(revision 165)
@@ -0,0 +1,33 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=41h, Check if Extensions Present.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=41h, Check if Extensions Present.
+;
+; AH41h_HandlerForCheckIfExtensionsPresent
+;	Parameters:
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		BX:		55AAh
+;	Returns with INTPACK:
+;		AH:		Major version of EBIOS extensions
+;		BX:		55AAh
+;		CX:		Support bits
+;		CF:		0 if succesfull, 1 if error
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH41h_HandlerForCheckIfExtensionsPresent:
+	cmp		WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh
+	jne		SHORT .EbiosNotSupported
+
+	mov		WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT
+	mov		ah, EBIOS_VERSION
+	and		BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF	; Return with CF cleared
+	jmp		Int13h_ReturnFromHandlerWithoutStoringErrorCode
+.EbiosNotSupported:
+	jmp		Int13h_UnsupportedFunction
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH42h_ExtendedReadSectors.asm	(revision 165)
@@ -0,0 +1,61 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=42h, Extended Read Sectors.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=42h, Extended Read Sectors.
+;
+; AH42h_HandlerForExtendedReadSectors
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		DS:SI:	Ptr to Disk Address Packet
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		CF:		0 if succesfull, 1 if error
+;	Return with Disk Address Packet in INTPACK:
+;		.bSectorCount	Number of sectors read successfully
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH42h_HandlerForExtendedReadSectors:
+	call	AH42h_LoadDapToESSIandVerifyForTransfer
+	call	CommandLookup_GetEbiosIndexToBX
+	mov		ah, [cs:bx+g_rgbReadCommandLookup]
+	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
+%ifdef USE_186
+	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	jmp		Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+%else
+	call	Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+%endif
+
+
+;--------------------------------------------------------------------
+; AH42h_LoadDapToESSIandVerifyForTransfer
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		DS:SI:	Ptr to Disk Address Packet
+;	Returns:
+;		ES:SI:	Ptr to Disk Address Packet (DAP)
+;		Exits from INT 13h if invalid DAP
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH42h_LoadDapToESSIandVerifyForTransfer:
+	mov		es, [bp+IDEPACK.intpack+INTPACK.ds]	; ES:SI to point Disk Address Packet
+	cmp		BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE
+	jb		SHORT .DapContentsNotValid
+	cmp		BYTE [es:si+DAP.bSectorCount], 0
+	jle		SHORT .DapContentsNotValid			; Must be 1...127
+	ret
+.DapContentsNotValid:
+	jmp		AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm	(revision 165)
@@ -0,0 +1,44 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=43h, Extended Write Sectors.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=43h, Extended Write Sectors.
+;
+; AH43h_HandlerForExtendedWriteSectors
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		AL:		0 or 1 to write with verify off
+;				2 to write with verify (if supported)
+;		DS:SI:	Ptr to Disk Address Packet
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		CF:		0 if succesfull, 1 if error
+;	Return with Disk Address Packet in INTPACK:
+;		.bSectorCount	Number of sectors written successfully
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH43h_HandlerForExtendedWriteSectors:
+	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 2	; Verify requested?
+	jae		SHORT .WriteWithVerifyNotSupported
+
+	call	AH42h_LoadDapToESSIandVerifyForTransfer
+	call	CommandLookup_GetEbiosIndexToBX
+	mov		ah, [cs:bx+g_rgbWriteCommandLookup]
+	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
+%ifdef USE_186
+	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	jmp		Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+%else
+	call	Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+%endif
+
+.WriteWithVerifyNotSupported:
+	jmp		AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH44h_ExtendedVerifySectors.asm	(revision 165)
@@ -0,0 +1,36 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=44h, Extended Verify Sectors.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=44h, Extended Verify Sectors.
+;
+; AH44h_HandlerForExtendedVerifySectors
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		DS:SI:	Ptr to Disk Address Packet
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		CF:		0 if succesfull, 1 if error
+;	Return with Disk Address Packet in INTPACK:
+;		.bSectorCount	Number of sectors verified successfully
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH44h_HandlerForExtendedVerifySectors:
+	call	AH42h_LoadDapToESSIandVerifyForTransfer
+	call	CommandLookup_GetEbiosIndexToBX
+	mov		ah, [cs:bx+g_rgbVerifyCommandLookup]
+	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
+%ifdef USE_186
+	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	jmp		Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+%else
+	call	Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+%endif
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH47h_ExtendedSeek.asm	(revision 165)
@@ -0,0 +1,40 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=47h, Extended Seek.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=47h, Extended Seek.
+;
+; AH47h_HandlerForExtendedSeek
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		DS:SI:	Ptr to Disk Address Packet
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		CF:		0 if succesfull, 1 if error
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH47h_HandlerForExtendedSeek:
+	; Note that there is no Seek command for LBA48 addressing!
+	mov		es, [bp+IDEPACK.intpack+INTPACK.ds]	; ES:SI to point Disk Address Packet
+	cmp		BYTE [es:si+DAP.bSize], MINIMUM_DAP_SIZE
+	jb		SHORT .DapContentsNotValid
+
+	mov		ah, COMMAND_SEEK
+	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
+%ifdef USE_186
+	push	Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+	jmp		Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+%else
+	call	Idepack_ConvertDapToIdepackAndIssueCommandFromAH
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+%endif
+
+.DapContentsNotValid:
+	jmp		AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm	(revision 165)
@@ -0,0 +1,65 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Int 13h function AH=48h, Get Extended Drive Parameters.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int 13h function AH=48h, Get Extended Drive Parameters.
+;
+; AH48h_GetExtendedDriveParameters
+;	Parameters:
+;		SI:		Same as in INTPACK
+;		DL:		Translated Drive number
+;		DS:DI:	Ptr to DPT (in RAMVARS segment)
+;		SS:BP:	Ptr to IDEPACK
+;	Parameters on INTPACK:
+;		DS:SI:	Ptr to Extended Drive Information Table to fill
+;	Returns with INTPACK:
+;		AH:		Int 13h return status
+;		DS:SI:	Ptr to Extended Drive Information Table
+;		CF:		0 if succesfull, 1 if error
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AH48h_HandlerForGetExtendedDriveParameters:
+	; Get ATA Drive Information and total sector count from it
+	push	ds
+	pop		es			; ES now points RAMVARS segment
+	mov		si, [cs:ROMVARS.bStealSize]
+	and		si, BYTE 7Fh
+	eSHL_IM	si, 10		; Kilobytes to bytes
+	sub		si, 512		; Subtract buffer size for offset in RAMVARS
+	call	AH25h_GetDriveInformationToBufferInESSIfromDriveInDL
+	call	AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
+	xchg	cx, ax
+
+	; Point ES:DI to Destination buffer
+	mov		di, [bp+IDEPACK.intpack+INTPACK.si]
+	mov		es, [bp+IDEPACK.intpack+INTPACK.ds]
+	cmp		WORD [es:di+EDRIVE_INFO.wSize], MINIMUM_EDRIVEINFO_SIZE
+	jb		SHORT .BufferTooSmall
+
+	; Fill Extended Drive Information Table in ES:DI
+	mov		ax, MINIMUM_EDRIVEINFO_SIZE
+	stosw
+	mov		al, FLG_DMA_BOUNDARY_ERRORS_HANDLED_BY_BIOS
+	stosw
+	add		di, BYTE 12	; Skip CHS parameters
+	xchg	ax, cx
+	stosw				; LBA WORD 0
+	xchg	ax, dx
+	stosw				; LBA WORD 1
+	xchg	ax, bx
+	stosw				; LBA WORD 2
+	xor		ax, ax
+	stosw				; LBA WORD 3 always zero since 48-bit address
+	mov		ah, 512>>8
+	stosw				; Always 512-byte sectors
+
+	; Return with success
+	xor		ah, ah
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
+
+.BufferTooSmall:
+	mov		ah, RET_HD_INVALID
+	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm	(revision 165)
@@ -0,0 +1,154 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Functions for address translations.
+
+; Section containing code
+SECTION .text
+
+; Jump table for conversion functions
+ALIGN WORD_ALIGN
+g_rgfnAddressTranslation:
+	dw		DoNotConvertLCHS					; 0, ADDR_DPT_LCHS
+	dw		ConvertLCHStoPCHS					; 1, ADDR_DPT_PCHS
+	dw		ConvertLCHStoLBARegisterValues		; 2, ADDR_DPT_LBA28
+	dw		ConvertLCHStoLBARegisterValues		; 3, ADDR_DPT_LBA48
+
+
+;--------------------------------------------------------------------
+; Address_OldInt13hAddressToIdeAddress
+;	Parameters:
+;		CH:		Cylinder number, bits 7...0
+;		CL:		Bits 7...6: Cylinder number bits 9 and 8
+;				Bits 5...0:	Starting sector number (1...63)
+;		DH:		Starting head number (0...255)
+;		DS:DI:	Ptr to DPT
+;	Returns:
+;		BL:		LBA Low Register / Sector Number Register (LBA 7...0)
+;		CL:		LBA Mid Register / Low Cylinder Register (LBA 15...8)
+;		CH:		LBA High Register / High Cylinder Register (LBA 23...16)
+;		BH:		Drive and Head Register (LBA 27...24)
+;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Address_OldInt13hAddressToIdeAddress:
+	call	AccessDPT_GetAddressingModeForWordLookToBX
+	push	WORD [cs:bx+g_rgfnAddressTranslation]		; Push return address
+	; Fall to Address_ExtractLCHSparametersFromOldInt13hAddress
+
+;---------------------------------------------------------------------
+; Address_ExtractLCHSparametersFromOldInt13hAddress
+;	Parameters:
+;		CH:		Cylinder number, bits 7...0
+;		CL:		Bits 7...6: Cylinder number bits 9 and 8
+;				Bits 5...0:	Sector number
+;		DH:		Head number
+;	Returns:
+;		BL:		Sector number (1...63)
+;		BH:		Head number (0...255)
+;		CX:		Cylinder number (0...1023)
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+Address_ExtractLCHSparametersFromOldInt13hAddress:
+	mov		bl, cl				; Copy sector number...
+	and		bl, 3Fh				; ...and limit to 1...63
+	sub		cl, bl				; Remove from cylinder number high
+	eROL_IM	cl, 2				; High bits to beginning
+	mov		bh, dh				; Copy Head number
+	xchg	cl, ch				; Cylinder number now in CX
+	ret
+
+
+;---------------------------------------------------------------------
+; Converts LCHS parameters to IDE P-CHS parameters.
+; PCylinder	= (LCylinder << n) + (LHead / PHeadCount)
+; PHead		= LHead % PHeadCount
+; PSector	= LSector
+;
+; Address_ConvertLCHStoPCHS:
+;	Parameters:
+;		BL:		Sector number (1...63)
+;		BH:		Head number (0...255)
+;		CX:		Cylinder number (0...1023)
+;		DS:DI:	Ptr to Disk Parameter Table
+;	Returns:
+;		BL:		Sector number (1...63)
+;		BH:		Head number (0...15)
+;		CX:		Cylinder number (0...16382)
+;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+ConvertLCHStoPCHS:
+	; LHead / PHeadCount and LHead % PHeadCount
+	eMOVZX	ax, bh					; Copy L-CHS Head number to AX
+	div		BYTE [di+DPT.bPchsHeads]; AL = LHead / PHeadCount, AH = LHead % PHeadCount
+	mov		bh, ah					; Copy P-CHS Head number to BH
+	xor		ah, ah					; AX = LHead / PHeadCount
+
+	; (LCylinder << n) + (LHead / PHeadCount)
+	mov		dx, cx					; Copy L-CHS Cylinder number to DX
+	mov		cl, [di+DPT.bFlagsLow]	; Load shift count
+	and		cl, MASKL_DPT_CHS_SHIFT_COUNT
+	shl		dx, cl					; DX = LCylinder << n
+	add		ax, dx					; AX = P-CHS Cylinder number
+	xchg	cx, ax					; Move P-CHS Cylinder number to CX
+DoNotConvertLCHS:
+	ret
+
+
+;---------------------------------------------------------------------
+; Converts LCHS parameters to 28-bit LBA address.
+; Only 24-bits are used since LHCS to LBA28 conversion has 8.4GB limit.
+; LBA = ((cylToSeek*headsPerCyl+headToSeek)*sectPerTrack)+sectToSeek-1
+;
+; Returned address is in same registers that
+; Address_DoNotConvertLCHS and Address_ConvertLCHStoPCHS returns.
+;
+; ConvertLCHStoLBARegisterValues:
+;	Parameters:
+;		BL:		Sector number (1...63)
+;		BH:		Head number (0...255)
+;		CX:		Cylinder number (0...1023)
+;		DS:DI:	Ptr to Disk Parameter Table
+;	Returns:
+;		BL:		LBA Low Register / Sector Number Register (LBA 7...0)
+;		CL:		LBA Mid Register / Low Cylinder Register (LBA 15...8)
+;		CH:		LBA High Register / High Cylinder Register (LBA 23...16)
+;		BH:		Drive and Head Register (LBA 27...24)
+;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+ConvertLCHStoLBARegisterValues:
+	; cylToSeek*headsPerCyl (18-bit result)
+	mov		ax, cx					; Copy Cylinder number to AX
+	eMOVZX	dx, BYTE [di+DPT.bLchsHeads]
+	mul		dx						; DX:AX = cylToSeek*headsPerCyl
+
+	; +=headToSeek (18-bit result)
+	add		al, bh					; Add Head number to DX:AX
+	adc		ah, dh					; DH = Zero after previous multiplication
+	adc		dl, dh
+
+	; *=sectPerTrack (18-bit by 6-bit multiplication with 24-bit result)
+	eMOVZX	cx, BYTE [di+DPT.bPchsSectors]	; Load Sectors per Track
+	xchg	ax, dx					; Hiword to AX, loword to DX
+	mul		cl						; AX = hiword * Sectors per Track
+	mov		bh, al					; Backup hiword * Sectors per Track
+	xchg	ax, dx					; Loword back to AX
+	mul		cx						; DX:AX = loword * Sectors per Track
+	add		dl, bh					; DX:AX = (cylToSeek*headsPerCyl+headToSeek)*sectPerTrack
+
+	; +=sectToSeek-1 (24-bit result)
+	xor		bh, bh					; Sector number now in BX
+	dec		bx						; sectToSeek-=1
+	add		ax, bx					; Add to loword
+	adc		dl, bh					; Add possible carry to byte2, BH=zero
+
+	; Copy DX:AX to proper return registers
+	xchg	bx, ax					; BL = Sector Number Register (LBA 7...0)
+	mov		cl, bh					; Low Cylinder Register (LBA 15...8)
+	mov		ch, dl					; High Cylinder Register (LBA 23...16)
+	mov		bh, dh					; Drive and Head Register (LBA 27...24)
+	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm	(revision 165)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm	(revision 165)
@@ -0,0 +1,54 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Functions for loading correct transfer command.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; CommandLookup_GetEbiosIndexToBX
+; CommandLookup_OrOldInt13hIndexToBL
+;	Parameters:
+;		DS:DI:	Ptr to DPT
+;		ES:SI:	Ptr to DAP (Disk Address Packet)
+;	Returns:
+;		BX:		Index to command lookup table
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+CommandLookup_GetEbiosIndexToBX:
+	; LBA28 or LBA48 command
+	xor		bx, bx
+	mov		ax, [es:si+DAP.qwLBA+3]	; Load LBA48 bytes 3 and 4
+	and		al, ~0Fh				; Clear LBA28 bits 24...27
+	or		al, [es:si+DAP.qwLBA+5]
+	cmp		bx, ax					; Set CF if any of bits 28...47 set
+	rcl		bx, 1					; BX = 0 for LBA28, BX = 1 for LBA48
+
+	; Block mode or single sector
+ALIGN JUMP_ALIGN
+CommandLookup_OrOldInt13hIndexToBL:
+	mov		al, FLGH_DPT_BLOCK_MODE_SUPPORTED	; Bit 1
+	and		al, [di+DPT.bFlagsHigh]
+	or		bl, al					; BX = index to lookup table
+	ret
+
+
+g_rgbReadCommandLookup:
+	db		COMMAND_READ_SECTORS		; 00b, CHS or LBA28 single sector
+	db		COMMAND_READ_SECTORS_EXT	; 01b, LBA48 single sector
+	db		COMMAND_READ_MULTIPLE		; 10b, CHS or LBA28 block mode
+	db		COMMAND_READ_MULTIPLE_EXT	; 11b, LBA48 block mode
+
+g_rgbWriteCommandLookup:
+	db		COMMAND_WRITE_SECTORS
+	db		COMMAND_WRITE_SECTORS_EXT
+	db		COMMAND_WRITE_MULTIPLE
+	db		COMMAND_WRITE_MULTIPLE_EXT
+
+g_rgbVerifyCommandLookup:
+	db		COMMAND_VERIFY_SECTORS
+	db		COMMAND_VERIFY_SECTORS_EXT
+	db		COMMAND_VERIFY_SECTORS
+	db		COMMAND_VERIFY_SECTORS_EXT		
+
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 165)
@@ -25,5 +25,5 @@
 
 ;--------------------------------------------------------------------
-; AtaID_GetTotalSectorCount
+; AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI
 ;	Parameters:
 ;		ES:SI:	Ptr to 512-byte ATA information read from the drive
@@ -33,5 +33,5 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-AtaID_GetTotalSectorCount:
+AtaID_GetTotalSectorCountToBXDXAXfromAtaInfoInESSI:
 	push	ds
 
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 165)
@@ -19,4 +19,5 @@
 %include "IdeRegisters.inc"		; For ATA Registers, flags and commands
 %include "Int13h.inc"			; Equates for INT 13h functions
+%include "EBIOS.inc"			; Equates for EBIOS functions
 %include "CustomDPT.inc"		; For Disk Parameter Table
 %include "RomVars.inc"			; For ROMVARS and IDEVARS structs
@@ -171,4 +172,5 @@
 %include "DriveXlate.asm"		; For swapping drive numbers
 %include "Address.asm"			; For sector address translations
+%include "CommandLookup.asm"	; For getting correct transfer command
 %include "Int13h.asm"			; For Int 13h, Disk functions
 %include "AH0h_HReset.asm"		; Required by Int13h_Jump.asm
@@ -187,4 +189,10 @@
 %include "AH24h_HSetBlocks.asm"	; Required by Int13h_Jump.asm
 %include "AH25h_HDrvID.asm"		; Required by Int13h_Jump.asm
+%include "AH41h_CheckIfExtensionsPresent.asm"
+%include "AH42h_ExtendedReadSectors.asm"
+%include "AH43h_ExtendedWriteSectors.asm"
+%include "AH44h_ExtendedVerifySectors.asm"
+%include "AH47h_ExtendedSeek.asm"
+%include "AH48h_GetExtendedDriveParameters.asm"
 
 
Index: trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- trunk/XTIDE_Universal_BIOS/makefile	(revision 164)
+++ trunk/XTIDE_Universal_BIOS/makefile	(revision 165)
@@ -38,4 +38,6 @@
 HEADERS += Src/Handlers/
 HEADERS += Src/Handlers/Int13h/
+HEADERS += Src/Handlers/Int13h/EBIOS/
+HEADERS += Src/Handlers/Int13h/Tools/
 HEADERS += Src/Device/
 HEADERS += Src/Device/IDE/
